Skip to main content
edited body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

First get your product collection. For example, here the collection is $merged_collection. then apply the following code in the position where you want to place the pager and toolbar.

First get your product collection. For example, here the collection is $merged_collection. then apply the following code in the position where you want to place the pager and toolbar.
<?php  
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($merged_collection);
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
?>
First get your product collection. For example, here the collection is $merged_collection. then apply the following code in the position where you want to place the pager and toolbar.
<?php  
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($merged_collection);
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
?>

First get your product collection. For example, here the collection is $merged_collection. then apply the following code in the position where you want to place the pager and toolbar.

<?php  
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($merged_collection);
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
?>
Source Link

First get your product collection. For example, here the collection is $merged_collection. then apply the following code in the position where you want to place the pager and toolbar.
<?php  
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($merged_collection);
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
?>