Jump to content

Remove category from product url


szbstvn

Recommended Posts

Hello is possible to remove category from url?

 

example.com/category/1-product .... this work!

example.com/1-product .... go to 404

 

How can do it

(prestahop 8.1.5)

Link to comment
Share on other sites

Hi,

This isn't really possible, since if you remove the {catgory:/} element from the product URL configuration, you'll end up confusing it with the category URLs.

What you can do is replace it with a generic term, such as p/, which would give the following result in the URL configuration:

p/{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

 

Link to comment
Share on other sites

3 hours ago, ZHSoft said:

image.thumb.png.c01968bbe13e859b4c91c97e20f94fd0.png

 

* Route to products, delete the category, and support free customization.

I done but doesn't work.

ComGrafPL did it and working but if I try myself then doesn't work. Hedidnt say how 🙂 . Change route - save - Friendly url off - save - friendly url off -  save .... "Regenerate" htacces

When I try remove ".html" then (after the friendly url off - save - on save) the result is same to base situation.

Link to comment
Share on other sites

3 hours ago, ZHSoft said:

image.thumb.png.c01968bbe13e859b4c91c97e20f94fd0.png

 

* Route to products, delete the category, and support free customization.

I done but doesn't work.

ComGrafPL did it and working but if I try myself then doesn't work. Hedidnt say how 🙂 . Change route - save - Friendly url off - save - friendly url off -  save .... "Regenerate" htacces

When I try remove ".html" then (after the friendly url off - save - on save) the result is same to base situation.

Link to comment
Share on other sites

Posted (edited)
2 hours ago, Mediacom87 said:

I haven't yet installed an 8.1.5 version, I've just tested it on an 8.1.3 without any problems.

This is where I'm going to go crazy... I deleted ".html" and it has the same result as when I started topic. If I write back the ".html" then it works. Of course, "category/' is no longer included. Fortunately, at least that's good. I follow the procedure described in several places... Route modify - Freiendly URL off - save - friendly URL on - save - clear cache. Result that the page you are looking for could not be found, i.e. 404 ...

It didn't work for 8.1.4 either. After that, I upgraded to 8.1.5. That's what makes you right, and it's really because of the version. How can I report the suspected error to the development?

...

Im switch on debug:

"An exception has been thrown during the rendering of a template ("Warning: filesize(): stat failed for /XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/var/cache/dev/appParameters.php")."

When i save change in admin on SEO & URL page

Edited by szbstvn (see edit history)
Link to comment
Share on other sites

Maybe it's just new to me... I deleted the whole thing and installed 8.1.4.

1. I deleted {category:/} = works

2. I also deleted ".html" = does not work

3. I put {category:/} back without ".html" = it works.

So either one or the other can be removed, but both cannot.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...