【发布时间】:2015-01-23 15:30:42
【问题描述】:
当我在 Magento 中对产品进行排序时,我有一个价格滑块来更新价格过滤器。
产品的价格范围为 0-1000。每当我要拖动滑块时,即使我没有更改 maxPrice 把手,过滤器也会自动将 1000 设置为 999.99。
这是个问题,因为价格为 1000 的 ONE 产品,如果更改滑块(即使只更改 minPrice 车把)将不会显示
但是,我似乎通过更改 Mage_Directory_Model::Currency.php:
public function format($price, $options = array(), $includeContainer = true, $addBrackets = false)
{
return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
}
在 formatPrecision 中,0 由 2 更改,因为 0 现在定义了小数位数。
所以现在,当我更改 minPrice 车把时,maxPrice 为 1000 - 但是仍然不显示花费 1000 的产品 - 即使过滤器显示它正在过滤来自 xx - 1000 的产品
所以我的问题是: 我的过滤器显示它正在过滤来自 xx-1000 的产品,但没有显示价格为 1000 的产品。为什么?
问候 帕特里克
【问题讨论】:
标签: php magento zend-framework currency