0

my local/mage/catalog/prodoct/newwall.php

protected function _getProductCollection()
{
   if (is_null($this->_productCollection)) {

      $brand_id = $_GET['brand_id'];
      $collection = Mage::getModel('catalog/product')->getCollection()           
                   ->addAttributeToFilter('manufacturer', array('eq' => $brand_id ))
                   ->addAttributeToSelect('*');
      $this->setProductCollection($collection);
    }

      return $collection;

}   

I Added cms page layout

 <reference name="content">
   <block type="catalog/product_newall" name="product_new" template="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>
      <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
   </block>
</reference>

Please tell me How To add default magento toolbar and pager. using this code display only product.

11
  • is product listing working??
    – Amit Bera
    Commented Aug 25, 2014 at 13:16
  • Yes Working Properlly. But I don't How to get toolbar or pager. Also Work my custom block here properly.
    – coder
    Commented Aug 25, 2014 at 13:18
  • where did you add the layout update in cms.xml ? Commented Aug 25, 2014 at 13:20
  • add content => Layout Update XML => I am Adding Xml File
    – coder
    Commented Aug 25, 2014 at 13:22
  • where did you add that code? Means which layout update xml file ? Commented Aug 25, 2014 at 13:23

1 Answer 1

0

I Found My issue.

<reference name="content">

<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"/>
                    <!-- The following code shows how to set your own pager increments -->
                    <!--
                        <action method="setDefaultListPerPage"><limit>10</limit></action>
                        <action method="setDefaultGridPerPage"><limit>8</limit></action>
                        <action method="addPagerLimit"><mode>list</mode><limit>10</limit></action>
                        <action method="addPagerLimit"><mode>list</mode><limit>20</limit></action>
                        <action method="addPagerLimit"><mode>list</mode><limit>30</limit></action>
                        <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
                        <action method="addPagerLimit"><mode>grid</mode><limit>8</limit></action>
                        <action method="addPagerLimit"><mode>grid</mode><limit>16</limit></action>
                        <action method="addPagerLimit"><mode>grid</mode><limit>24</limit></action>
                        <action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
                    -->
                </block>
                <!--action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action-->
                <action method="setColumnCount"><count>4</count></action>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>

I am Upding my xml file same as Catlog file. it's Working Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.