Page 1 of 1

how do you remove category names from product urls

Posted: Sat Oct 20, 2018 8:04 pm
by funky123
hi everyone how everyone doing im new here i trying to learn but opencart 3 seem really hard to learn
does any one know how to remove category / subcatergory name from products urls ???
i need to keep my urls really short and not show my catergorys hope someone can help

Re: how do you remove category names from product urls

Posted: Sat Oct 20, 2018 9:03 pm
by opencart.my
Hi funky123, welcome!

If you have enabled SEO URLs you could have short URLs to your store product.

Example: http://yourstore.com/ipod-classic

If someone click on your product from a category page, the SEO URL will include the category's SEO URL as well:
http://yourstore.com/mp3-players/ipod-classic

But you could always omit the category's SEO URL and use http://yourstore.com/ipod-classic or share it on social media site for anyone to access your store product.

Re: how do you remove category names from product urls

Posted: Sat Oct 20, 2018 9:11 pm
by khnaz35
funky123 wrote:
Sat Oct 20, 2018 8:04 pm
hi everyone how everyone doing im new here i trying to learn but opencart 3 seem really hard to learn
does any one know how to remove category / subcatergory name from products urls ???
i need to keep my urls really short and not show my catergorys hope someone can help
Use Seo URL, enable from admin panel system /setting

On product page also use the Seo url name which you want to show

Re: how do you remove category names from product urls

Posted: Sat Oct 20, 2018 9:38 pm
by funky123
yes i got seo url turned on but what im after doing is getting rid of http://yourstore.com/mp3-players/ipod-classic
so it would read http://yourstore.com/ipod-classic

also would like to know how to get rid of http://yourstore.com/electrical/mp3-pla ... od-classic
how i get rid of electrical/mp3-players so it still read http://yourstore.com/ipod-classic

Re: how do you remove category names from product urls

Posted: Sat Oct 20, 2018 9:45 pm
by opencart.my
The only way is to not set any SEO keyword for your categories. Leave it blank so that all products under that category will have URL without category name.

Re: how do you remove category names from product urls

Posted: Sun Oct 21, 2018 8:27 am
by IP_CAM
Strip parent categories from url to avoid duplication
https://www.opencart.com/index.php?rout ... n_id=27744
---
Well, the Code used is the same, in v.2 + v.3 Versions,
only the SEARCH Path is a little different, it changed from:
catalog/controller/seo_url.php
in v.3.x Versions to:
catalog/controller/startup/seo_url.php
So, change the Path in the Extension, to make it look like:
<file path="catalog/controller/startup/seo_url.php">
to so make this work as OcMod. It's also shown on the Ext.Page,
on how to use it as VqMod.
It does NOT fully remove all categories, but only shows the first one.
Good Luck! ;)
Ernie

Re: how do you remove category names from product urls

Posted: Tue Oct 23, 2018 9:52 pm
by customrob
the guy that makes this module updated it today