Opencart显示从php文件中删除后的产品数量
我想从左栏类别菜单中隐藏产品数量,例如Opencart显示从php文件中删除后的产品数量,php,opencart,categories,Php,Opencart,Categories,我想从左栏类别菜单中隐藏产品数量,例如 > T-Shirt(36) > -Polo(10) ,我想删除括号内的数量。为此,我使用以下内容编辑了目录/controller/product/category.php文件: $this->data['categories'][] = array( //'name' => $result['name'] . ($this->config->get('config_product_co
> T-Shirt(36)
> -Polo(10)
,我想删除括号内的数量。为此,我使用以下内容编辑了目录/controller/product/category.php
文件:
$this->data['categories'][] = array(
//'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
'name' => $result['name'],
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
但是页面仍然显示数量!我应该在哪里编辑以隐藏数量?这是因为需要编辑的文件是:
catalog/controller/module/category.php
并且在之后(它在文件中出现两次):
您只需将其更改为:
'name' => $category['name'] . ' (' . $product_total . ')',
致:
不过,这也是管理员后端的一个选项,用于禁用类别计数。。。在“系统”下,然后在“设置”下,编辑您的店铺,然后选择“否”进行分类计数
'name' => $category['name'] . ' (' . $product_total . ')',
'name' => $category['name'],