Hi Guys,
I have created a custom module in magento and wants to show products with their URL as links.
I am trying in this way :-
for ($counter=0; $counter < count($products); $counter++)
{
$_product = Mage::getModel('catalog/product')->loadByAttribute('id',$products[$counter]->product_id);
echo $_product->getProductUrl();
}
but the $_product->getProductUrl() function always return a url which is not related to none of the loaded products.
Can you guys inspect it and let me know what I am missing?
Thanks.