Magento get product URL by id

on

Here, i am going to post simple Magento tweak. That is how to get the product URL by product id. Sometimes we only have the product id, That’s enough to get all the product instance.So using below code we can get the product url by id.

  $my_product = Mage::getModel('catalog/product')->load($product_id); 
  $my_product_url = $my_product->getProductUrl();  

Hope it helps someone.

Posted in Magento by .

About Gowri

I am professional web developer with 8+ years experience. PHP, jQuery, WordPress, Angular and Ionic are my key skills in web development. I am working with strong enthusiastic team with spirit. We provide all web related solution like HTML/CSS development, Web graphic design and Logo.

2 thoughts on “Magento get product URL by id

Comments are closed.