1.打开编辑 app/design/frontend/default/Yourtheme/template/catalog/product/list/toolbar.phtml
< ?php echo$this->__('Sort by')?><select onchange="setLocation(this.value)">< ?php foreach($this->getAvailableOrders()as$_key=>$_order):?><option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"< ?php if($this->isOrderCurrent($_key)):?> selected="selected"< ?php endif;?>>< ?php echo$_order?></option>< ?php endforeach;?></select>
3.在此代码里面加入下面两行: < ?php if($_order!='Position'):// Remove "Position" from the sort option list ?>//code< ?php endif;// End for removing "Position" sort option ?> 4.加完代码类似这样 < ?php echo$this->__('Sort by')?><select onchange="setLocation(this.value)">< ?php foreach($this->getAvailableOrders()as$_key=>$_order):?>< ?php if($_order!='Position'):// Remove "Position" from the sort option list ?><option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"< ?php if($this->isOrderCurrent($_key)):?> selected="selected"< ?php endif;?>>< ?php echo$_order?></option>< ?php endif;// End for removing "Position" sort option ?>< ?php endforeach;?></select> |
移除magento里list排列“Position”属性选项
最新推荐文章于 2019-03-07 10:09:19 发布