Vinit Singh Vinit Singh - 1 month ago 14
PHP Question

How to remove category name from url in opencart 2.x?

I want to remove category name from url in my opencart site.
I searched for solution at many places. some are suggesting to replace

$url .= '/' . $query->row['keyword'];
with
$url = '/' . $query->row['keyword'];

in seo_url.php but the problem is still not solved when i select a product from category menu it is still showing category name in url. How to remove that category name in opencart 2.x i am using opencart 2.1
Thanks in advance.

Answer

Found the solution. Opencart stores another copy of files in system/storage/modification/catelog folder. If i delete or rename seo_url.php file from there. then it starts acception my changes.

Otherwise it will not accept any modification in seo_url.php file.