简体   繁体   English

从产品网址opencart中删除类别和子类别

[英]Remove category and subcategory from the product url opencart

I want to remove category and sub-category name from the product URL in the opencart. 我想从opencart的产品网址中删除类别和子类别名称。 I have made changes in seo_url.php file. 我对seo_url.php文件进行了更改。 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 我正在使用opencart版本2.0.3.1

are you sure you've replaced all? 您确定已经全部替换了吗?

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

in seo_url.php file there is 3 matches. 在seo_url.php文件中,有3个匹配项。

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 只有两次发生

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM