Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Resetting the Limit in Product Categories from Limit=All
 
flek
Jr. Member
 
Total Posts:  21
Joined:  2009-03-17
 

Hi, we have the facility to ‘Show All’ so that people can browse all the products in a category.

However when this is set the setting is passed on so that when a customer moves onto a new category, all the products are shown there as well. If we have a category with a lot of products this slows down the category view and can cause unneccessary traffic and calls to the server. Ideally I’d like to have it reset itself back to 16 when the customer moves to a new category.

I have taken a look in the toolbar.phtml and I can see the code inside the limiter div.

<div class="limiter">
<label><?php echo $this->__('Show') ?></label>
<select onchange="setLocation(this.value)">
<?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> <?php echo $this->__('per page  ') ?>
</div>

There seems to be a variable passed around that limits the number shown. I thought if I set the variable $_limit to 16 that would do the trick - Sadly not.

Anyone got any ideas?

Alistair

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top