I have a custom product list page that contains 55 products. But now I have problem. Look at this pictures below :
- In page one it shows 55 items, but i've chose the limit is 24.
It says items 25 to 79 of 55 total.
Here is my scripts when I call my filtered products :
<?php
$id = $_GET['id'];
if ($id) {
$_productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('n_customer_brand', $id);
$_collectionSize = $_productCollection->count();
}
?>
and this is my scripts to call my toolbar :
<?php
// Custom Way
$toolbar = $this->getToolbarBlock();
$toolbar->setCollection($_productCollection );
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
?>
NOTE : I've change it to this script below, but it shows a wrong count and pager is not showing.
<?php echo $this->getToolbarHtml() ?>
and my block has an extends Mage_Catalog_Block_Product_List.