Jump to content

URLs Keep Changing...


Recommended Posts

Hi everybody,

Was wondering if this is bugging anyone else.
Whenever I add/remove categories or products, some of the URLs are changing.
This is because some IDs are changing so a URL like this:

example.com/Category/272-Product-Name.html


Will show a different product, if the ID 272 now contains something else.

As I understand, the ID is the only thing that Presta is using to show the product, and the rest of the URL is just to allow search engine friendly URLs.

To me, this is a great annoyance, since I am promoting my products from some places that are not in Presta, and I now face the fact that these URLs may be invalid if I do any change to the catalog.

Is there any solution for this?
I mean, is there another way to reach the product page, one that will always be fixed (for example, just by using the product name? Like:

example.com/Category/Product-Name.html



or, by using a product ID that does not change - like the Product Reference?

example.com/Category/Reference-Product-Name.html



I mean I know I can use my own redirects, but it will still require me to do a lot of work whenever I add even a single product to the catalog. (I am adding products using the Import function only)

Link to comment
Share on other sites

  • 11 months later...

Hey. If you look at classes/link.php, right near the top of the file is the section that deals with the product and category links. You can delete/rearrange the code so that the URLs meet your requirements. Remember to make a backup of the file before you edit and also, by changing this file, you will not be able to update to newer versions of Prestashop without having the code being overwritten by the new version's link.php file.

Link to comment
Share on other sites

×
×
  • Create New...