Magento 1.9: I am getting the same url in all the products on frontend

  • Open
  • Shiwani
    September 6, 2019 at 11:26 am #2937

    I need to show the related products below the images of all products.
    All data is showing good but the URLs is not correct Its showing same in the first related products

    How can I solve this?

  1. rohit
    Posts: 28
    September 9, 2019 at 6:53 am #2956

    Can you please share your code what your are implementing ?,  without that it will be very difficult to know what is the issue.



  2. Pankaj Sharma
    Posts: 154
    September 9, 2019 at 10:15 am #2962
    Pankaj Sharma

    Hi Shiwani,

    This issue can be resolved by using $product->getUrlPath() instead of $product->getProductUrl() in the EE of Magento.
    Also, I would like to recommend you to use function addUrlRewrite with your collection.


    Let me know if it wok for you.