2

i have special price page, but pagination is not working on that page, can please somebody help me with this or tell me how to show all products only on sale page.

(my cms static block is : {{block type="catalog/product_special" template="catalog/product/list.phtml"}} )

2

Instead of calling your block as {{block type="catalog/product_special" template="catalog/product/list.phtml"}}

Call it as

    <reference name="content"> 
       <block type="catalog/product_special" name="cmsattr" alias="cmsattr" 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> 
      </block> 
    </reference>

In Design section of cms page instead of Content section.

Please include <?php echo $this->getPagerHtml(); ?> in you list.phtml file

Inside your block file 'List.phtml' add this function

public function getPagerHtml()
{
    return $this->getChildHtml('pager');
}

In your _prepareLayout() funnction include following code for pagination

$pager = $this->getLayout()->createBlock('page/html_pager', 'my.pager')->setCollection($this->getItems());
$this->setChild('pager', $pager);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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