我想在单独的页面上显示所有带有分页的产品.此页面应在主菜单中具有"产品"的自定义链接.我不想显示opencart的内置菜单.我想要自己的链接,如家居,产品,特别优惠,关于我们.我一直在寻找,但仍然找不到合理的解决方案.我对opencart有点新意.谢谢
小智 7
文件:catalog/controller/product/category.php
1.)替换
if ($category_info) {
Run Code Online (Sandbox Code Playgroud)
至
if (($category_info) OR ($category_id==0)) {
Run Code Online (Sandbox Code Playgroud)
2.)并替换
$this->document->setTitle($category_info['name']);
$this->document->setDescription($category_info['meta_description']);
$this->document->setKeywords($category_info['meta_keyword']);
$this->data['heading_title'] = $category_info['name'];
Run Code Online (Sandbox Code Playgroud)
至
if ($category_id==0) {
$this->document->setTitle('all products');
$this->document->setDescription('all products');
$this->document->setKeywords('all products');
$this->data['heading_title'] ='all products';
$category_info['description']='';
$category_info['image']='';
} else {
$this->document->setTitle($category_info['name']);
$this->document->setDescription($category_info['meta_description']);
$this->document->setKeywords($category_info['meta_keyword']);
$this->data['heading_title'] = $category_info['name'];`
}
Run Code Online (Sandbox Code Playgroud)
您可以通过链接http://opencart.example.com/index.php?route=product/category&path=0查看所有产品和类别