一些客户对产品列表页面的过滤显示数量有要求,碰到的问题是 不知道在哪里改 其实在这两文件里面修改,
在G:\wamp\www\sanxiao\app\code\core\Mage\Catalog\Block\Product\List下的toorbar.php文件protected function _getAvailableLimit($mode)
的这个函数里面加上$perPageValues = array(3=>3,24=>24,12=>12,48=>48); return $perPageValues;
protected function _getAvailableLimit($mode) { if (isset($this->_availableLimit[$mode])) { return $this->_availableLimit[$mode]; } $perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values'; $perPageValues = (string)Mage::getStoreConfig($perPageConfigKey); $perPageValues = explode(',', $perPageValues); $perPageValues = array(3=>3,24=>24,12=>12,48=>48); return $perPageValues; $perPageValues = array_combine($perPageValues, $perPageValues); if (Mage::getStoreConfigFlag('catalog/frontend/list_allow_all')) { return ($perPageValues + array('all'=>$this->__('All'))); } else { return $perPageValues; } }
在page.phtml注释这两行sanxiao\app\design\frontend\maishen\tidebuy\template\page\html
<?php //if($this->getShowPerPage()): ?> <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> <?php //endif ?>.
ok 大功告成.