简体   繁体   English

Magento Pager没有显示在产品list.phtml中

[英]Magento Pager is not showing in product list.phtml

In magento I override product list.phtml, its working fine but pager is not showing. 在magento中,我重写了product list.phtml,它的工作正常,但没有显示寻呼机。 I already included code in xml as well as in list.phtml for pager but not showing. 我已经在xml以及list.phtml中为分页器添加了代码,但未显示。 Please help. 请帮忙。

Thanks in advance 提前致谢

below code for list.phtml 下面的代码为list.phtml

$this->getToolbarHtml()

And for xml code 对于xml代码

    <catalog_category_default translate="label">
            <reference name="head">
                <action method="addJs"><script>varien/product.js</script></action>
                <action method="addJs"><script>varien/configurable.js</script></action>
                <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
                <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
                <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
                <action method="addItem"><type>skin_js</type><name>js/bundle.js</name></action>
            </reference>
     <reference name="content">

    <block type="catalog/product_list" name="product_list" template="quickview/catalog/product/list.phtml">
    <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>
                </block> 


            </reference>

It looks like you're missing the catalog/category_view block. 好像您缺少catalog/category_view块。 Try this: 尝试这个:

<catalog_category_default translate="label">
  <reference name="head">
    <action method="addJs"><script>varien/product.js</script></action>
    <action method="addJs"><script>varien/configurable.js</script></action>
    <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
    <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
    <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
    <action method="addItem"><type>skin_js</type><name>js/bundle.js</name></action>
  </reference>
  <reference name="content">
    <block name="category.products" template="catalog/category/view.phtml" type="catalog/category_view">
      <block name="product_list" template="catalog/product/list.phtml" type="catalog/product_list">
        <block name="product_list_toolbar" template="catalog/product/list/toolbar.phtml" type="catalog/product_list_toolbar">
          <block name="product_list_toolbar_pager" type="page/html_pager" />
        </block>
      </block>
    </block>
  </reference>
</catalog_category_default>

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

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