方法 1. On an old thread I found the answer.
In admin go to System->Configuration->Catalog->Catalog->Frontend
Set List Mode to List Only or List as default and put a value of 0 for both Products per Page on List allowed values and Products per Page on List default value
from: http://www.magentocommerce.com/boards/viewthread/56910/
方法 2. Change this to make all products show all the time
app/code/core/Mage/Page/Block/Html/Pager.php:
public function getLimit()
{
//always show all
return 'all';
$limits = $this->getAvailableLimit();
if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) {
if (isset($limits[$limit])) {
return $limit;
}
}
$limits = array_keys($limits);
return $limits[0];
}
I’m sure you can modify the above to meet your needs of only showing all products on certain pages, and defaulting to the normal behavior when you want it. As you can see, this code does not use the database values, if there is nothing in the URL (getParams()) then it will use the first key of “$limits”. $llimits is obtained from the code below. If you only want certain pages to show all, you can probably override the above function in “Catalog/Block/Product/List/Toolbar.php”. This will probably have the effect of only showing all for pagers that use the product list toolbar. Changing the code in the above file will probably change *all* pages that show anything split into multiple pages.
To change the list of available options, change this:
app/code/core/Makge/Catalog/Block/Product/List/Toolbar.php
public function getAvailableLimit()
{
if ($this->getCurrentMode() == 'list') {
return array(5=>5,10=>10,15=>15,20=>20,25=>25, 'all'=>__('All'));
}
elseif ($this->getCurrentMode() == 'grid') {
return array(9=>9,15=>15,30=>30, 'all'=>__('All'));
}
return parent::getAvailableLimit();
}
from: http://www.magentocommerce.com/boards/viewthread/2055/
Magento产品列表显示设置
本文介绍了两种在Magento中设置产品列表显示方式的方法:一是通过后台配置实现只显示列表模式;二是通过修改核心文件来实现始终显示所有产品。这些方法可以帮助用户更好地定制其电子商务网站的产品展示形式。

被折叠的 条评论
为什么被折叠?



