title: Magento getProductUrl function getting same url for all products
body: <p>I'm trying get product datas using <code>getmodel()</code>. My code is,</p>
  
  <pre><code>//$product_ids = $this-&gt;getproducts();
  $product_ids = array(0=&gt;1, 1=&gt;2, 2=&gt;3); 
  echo'&lt;pre&gt;';  
   $model = Mage::getModel('catalog/product');  
   foreach($product_ids as $id) {
      $data = $model-&gt;load($id); 
      echo $id;
      echo '&lt;br&gt;';
      echo $data-&gt;getProductUrl();
      echo '&lt;br&gt;';
      echo $data-&gt;getName();
      echo '&lt;br&gt;';    
   }
  </code></pre>
  
  <p>I can get the data's of each product name and url. Name is correctly displayed but the <strong>url</strong> I'm getting the same url of first product for each product in loop. But the looping is fine. </p>
  
  <p>And I tried with <code>getUrlPath()</code> it is also getting same url</p>
  
  <p>And if I directly pass the id (not in loop) then I can get the correct url. Like</p>
  
  <pre><code> $model = Mage::getModel('catalog/product')-&gt;load(2);
  echo $model-&gt;getProductUrl();
  </code></pre>
  
  <p>Is that any caching issue..? (But caching is disabled). these things make me mad.</p>
  
  <p>And If used below code then I can get the correct url (loop),</p>
  
  <pre><code>    foreach($product_ids_ids as $id) {
    $_item = Mage::getModel('catalog/product')-&gt;getCollection()
            -&gt;addAttributeToSelect('product_url')
             -&gt;addAttributeToSelect('name')
             -&gt;addAttributeToFilter('entity_id', $id)
             -&gt;load();
  
  foreach($_item as $product){
      echo $product-&gt;getProductUrl();
      echo $product-&gt;getName();
  }
  }
  </code></pre>
  
  <p>This is not making any sense. I tried reindex, checked the flat catalog -> it is not enabled. But I cannot find out what's reason. And I checked admin -> catalog -> Url rewrites having empty - No datas. May be this is the reason.</p>
  
  <p>Any one can tell the reason please ?</p>