I have pagination on my category page, however, I'm having a few problems with it.
Supposedly, if you select the limit on the dropdown on the toolbar, the number of products that would display would change. Say if you select 20 on the dropdown, there should be 20 products on the first page instead of 5. However, after I've made some customizations on the paging (moved paging at the bottom of the list, added first and last buttons), this dropdown no longer works. Is there something I need to add or change in the code for this to work?
I've added a text before the paging that says page n of n. Then, I made some changes on the php file to test how I can modify the limit dropdown. Then I changed the page then the limit. So there are instances wherein the page becomes Page 5 of 2. How can I fix this?
Update: I've managed to fix problem 2 by making some comparisons so that one's fixed. For problem 1, I don't have much code to show since I didn't make any changes to toolbar.phtml where the dropdown is but anyway, here's the code inside phtml related to the limit.
<select>
<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
<?php echo $_limit ?>
</option>
<?php endforeach; ?>
</select>
With that code, the page is supposed to reload with ?limit=n on the url which means it will display n number of items per page but it's not.