在我的magento网站上,它没有在底部显示页码....在这个网站上我有大约6-7个类别,每个类别有大约50个产品
我对Magento管理面板所做的更改是:
在admin下 - >目录 - >目录 - >前端
在admin下 - >一般 - >设计 - >分页
我只是对这些进行了修改 产品页面上的页码仍未显示在此处
任何想法为什么会发生?
修改
这是我的frontend\mgstheme\luxury\template\catalog/category/view.phtml
页面
<?php
$_helper = $this->helper('catalog/output');
$_category = $this->getCurrentCategory();
$_imgHtml = '';
if ($_imgUrl = $_category->getImageUrl()) {
$_imgHtml = '<p class="category-image"><img class="img-responsive" src="' . $_imgUrl . '" alt="' . $this->escapeHtml($_category->getName()) . '" title="' . $this->escapeHtml($_category->getName()) . '" /></p>';
$_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
}
$settingDescPosition = 1;
$setting = Mage::getModel('mpanel/setting')->load($_category->getId());
if($setting){
if($setting->getRatio()!=''){
$settingDescPosition = $setting->getDescPosition();
}
}
?>
<div class="page-title category-title">
<?php if ($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
<a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
<?php endif; ?>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php $helper = $this->helper('mpanel'); ?>
<div class="custom">
<div class="container">
<span><a href="127.0.0.1/demo"><i class="fa fa-home"></i></a> / <span><a href="#">Products</a></span> / <span><strong><?php echo $this->getCurrentCategory()->getName(); ?></strong></span></span>
</div>
</div>
<?php if ($this->isContentMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php elseif ($this->isMixedMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<div id="product-list-container">
<?php echo $this->getProductListHtml() ?>
</div>
<?php else: ?>
<div id="product-list-container">
<?php echo $this->getProductListHtml() ?>
</div>
<?php endif; ?>
<?php if ($helper->acceptToUsePanel()): ?>
<?php // description position below product list ?>
<?php if($settingDescPosition==2): ?>
<div class="builder-container inline-builder">
<?php if ($_description = $this->getCurrentCategory()->getDescription()): ?>
<div class="category-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php echo $helper->getEditCategoryDescription($_category->getId()) ?>
<?php else: ?>
<div class="category-description std">
<span class="placeholder">Add description for this category</span>
</div>
<?php echo $helper->getEditCategoryDescription($_category->getId()) ?>
<?php endif; ?>
</div>
<?php endif ?>
<?php else: ?>
<?php // description position below product list ?>
<?php if($settingDescPosition==2): ?>
<?php if ($_description = $this->getCurrentCategory()->getDescription()): ?>
<div class="category-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php endif; ?>
<?php endif ?>
<?php endif; ?>
答案 0 :(得分:1)
解决
将此代码添加到view.phtml
<?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/bottom_toolbar.phtml')->toHtml(); ?>
答案 1 :(得分:0)
检查catalog.xml中是否已调用xml进行分页。 xml应如下所示
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
根据您的屏幕截图,您使用的是自定义主题,因此请重新检查所有与分页相关的文件夹中的phtml文件。
如果您仍然面临同样的问题,请参阅以下链接,以便您: https://support.webcto.eu/index.php/Knowledgebase/Article/View/43/8/paginating-not-shown-in-magento