回答
显示Alll产品在一个页面
你要显示所有产品创建单独的页面。- 创建模型文件
catalog\model\catalog\allproduct.php
并粘贴 代码这个http://pastebin.com/suF5TP3z - 创建控制器文件
catalog\controller\productallproduct.php
和下面的代码http://pastebin.com/jZq3hZyc - 糊创建视图文件
catalog\view\theme\default\template\productallproduct.tpl
和下面的代码http://pastebin.com/1HNh3x73
4粘贴 。创建语言文件catalog\language\en-gb\product\allproduct.php
和粘贴如下代码http://pastebin.com/EcyJH7F9 - 启用从后端模块,您可以看到菜单
- 创建模型文件
谢谢@KetanKp Borada –
不客气@abdul.You还可以按页进行排序,网格,列表和显示产品。 –
我的方式做了这样的事情
控制器:ControllerProductCategory
的指数函数内取代
if (isset($this->request->get['limit'])) {
$limit = $this->request->get['limit'];
} else {
$limit = $this->config->get('config_product_limit');
}
与
if (isset($this->request->get['viewall'])) {
$limit = "";
} else if (isset($this->request->get['limit'])) {
$limit = $this->config->get('config_product_limit');
} else {
$limit = $this->config->get('config_product_limit');
}
也使这一变化DIS剧中所有产品无类别过滤器
将这段代码
if ($category_info) {
$this->document->setTitle($category_info['meta_title']);
$this->document->setDescription($category_info['meta_description']);
$this->document->setKeywords($category_info['meta_keyword']);
有了这个代码
if (($category_info) || ($category_id == 0)) {
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'];
}
,并在最后创建一个新的类别,您可以将其命名为您想要的任何东西。并给出了链接像这样
https://www.yourwebsite.com/yourCategoryname?viewall=viewall?viewall=viewall
你可以把这个链接任何你想要的,它会加载所有的产品没有任何分页。
让我知道你是否仍然不明白任何东西。
我需要显示所有产品在单没有类别页面,我想在主菜单中的所有产品按钮,也可显示在MainMenu的所有种类...请帮助我如何做到这一点??? –
哥们我不在家。星期二之后会帮助你。 。 –
我建议不要对默认的主题代码和结构做任何改变。如果您已经使用自定义主题,则可以轻松创建菜单并定义包含所有产品在一个菜单或按钮下的所有类别。 让我们以这种方式解决: 例如,您有5个类别。每个类别都包含十多种产品或更多。
- 创建一个品牌(Manifacturer)。这个品牌将只包含1个类别。为它命名为“所有产品”
- 创建一个类别并将其命名为“所有产品”。
- 创建一个菜单,该菜单将显示所有产品并将菜单显示定义为类别。选择您刚创建的“所有产品”类别。
- 转到产品页面并单击编辑每个页面。点击“链接”标签和类别文本框,选择“所有产品”类别。为每个产品做这个简单的编辑。我为你效力,需要4/5秒。
- 转到主题中的“主题设置”。查找“显示产品”或“分类中的产品”设置。在每个主题中总是有预定义的显示限制,接下来是分页。做一个简单的计算吧。你店里有多少产品,50? 100?
- 设置显示限制大于您的总产品数量。
就是这样!
也许你想玩菜单css了一下。就像我之前说的,如果你已经使用了自定义主题,你不需要分叉你的核心代码,特别是默认的主题。
让我知道是否有帮助。
您的意思是没有任何分类和分页? ?检查[本](https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=3889)如果它可以帮助你,否则将很快回复你, –