-1
在我的网站中,过滤器显示价格:Rs 0.00-Rs 1.00。Magento价格过滤器
我需要通过自动获取最小值来对价格进行排序。
以下是filter.phtml的代码,请大家帮忙。
if(!function_exists("_displayDropdown")){
function _displayDropdown($atts,$displayitemcount,$new_attributeName){
echo '<select id="layered-select" class="select" name="layered-select" onchange="if (this.selectedIndex > 0) location.href=this[this.selectedIndex].value;">';
echo '<option selected="selected">'.$new_attributeName.'</option>';
foreach ($atts->getItems() as $_item){
echo '<option value="'.$_item->getUrl().'">';
echo $_item->getLabel();
if($displayitemcount){
echo ' ('.$_item->getCount().')';
}
echo '</option>';
}
echo '</select>';
}
}
switch ($attributeName) {
case 'Shoe Size':
case 'Overthreshold':
_displayDropdown($this,$displayitemcount,$new_attributeName);
break;
default:
_displayOrderedlist($this,$displayitemcount);
break;
}
您可以加入一些代码,你在哪里有这个问题 –
我在Magento管理面板的后台更改设置解决这个问题告诉我们。将价格属性设置为(Use In Layered Navigation =“yes”。) – Raj