skip to Main Content

I want to remove category and sub-category name from the product URL in the opencart. I have made changes in seo_url.php file. Where I have replaced

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

with

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

But still the url is not changed. Can any one suggest me what to do. I am using opencart version 2.0.3.1

2

Answers


  1. are you sure you’ve replaced all?

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

    in seo_url.php file there is 3 matches.

    Login or Signup to reply.
  2. Replace all occurrence of

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

    with

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

    to remove category from product url.
    there are only two occurence of it

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search