Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URL not appearing correctly in browser address bar

Using Prestashop for an e-commerce website

i have three categories

-----------------------------------------------------------------
|   Categories  |   Products                                    |
-----------------------------------------------------------------
|   Clothes     |   Image 1         Image 2         Image 3     |                                   
|   Mobile      |   Image 4         Image 5         Image 6     |
|   Cars        |   Image 7         Image 8         Image 1     |
-----------------------------------------------------------------

when i HOVER/CLICKED over CATEGORIES the link generated by browser at the bottom of browser window in firefox is like this

www.website.com/Clothes-1
www.website.com/Mobiles-4
www.website.com/Cars-13

i selected Mobile Category, and link in the browser address bar is this

Address Bar (Browser ) www.website.com/Mobiles-4

------------------------------------------------------------------------
|   Categories              |   Products (Mobile)                       |
------------------------------------------------------------------------
|   Clothes                 |   Mobile 1    Mobile 2    Mobile 3        |                                   
|   Mobile (selected)       |   Mobile 4    Mobile 5    Mobile 6        |
|   Cars                    |   Mobile 7    Mobile 8    Mobile 1        |
------------------------------------------------------------------------

Now when HOVER/CLICKED over any of the mobile available in Products it generate following url

www.website.com/Mobiles/Mobile-4-34.html ( Current behaviour )

where as i feel it should generate url like this

www.website.com/Mobiles-4/Mobile-4-34.html <----------- ( Required is Mobile-4( i.e 4 is id) )

Current behaviour which also creating SEO problems ... i have tried to change settings in preferences but it does nt work at all.. also i feel prestashop framework is rewriting the url ... and i tried to programmatically update the code by prestashop framework is malfunctioning.

If some guideance or help by any fella?

like image 218
Digital Alchemist Avatar asked Nov 12 '22 21:11

Digital Alchemist


1 Answers

Prestashop standard

The default way Prestashop displays the friendly url is:

Product route: /category/id-product-name.html

Category route: /id-category

The diference between your example and the default PS 1.5 friendly-url behaviour is that in your example the id is not at the end of the product-name.

Solution

Go to Back Office->Preferences->SEO&URLs->Schema of URLs (page section)

In the Route to products field you should have: {category:/}{id}-{rewrite}{-:ean13}.html

If I understand correctly your need you should have: {id}-{category:/}{id}-{rewrite}{-:ean13}.html

Note:

The {id} part of the rewritten URL is mandatory, so you can not get read of it by changing the back-office settings.

The only way you can do that is by making/purchasing a module for that. I recommend Pretty URL.

like image 191
rhemaxos Avatar answered Nov 15 '22 01:11

rhemaxos