December 21, 2015
Magento: 单产品(product)或者当前类别(category)最大和最小价格 Min/Max Product Price in a Category
1. 当前类别最大最小价格:
$minPrice = Mage::getModel('catalog/product')->getCollection()
->addStoreFilter()
->addAttributeToSelect('price')
->addAttributeToSort('price', 'ASC')->getFirstItem()->getMinimalPrice()*1;
$maxPrice = Mage::getModel('catalog/product')->getCollection()
->addStoreFilter()
-&g… Read More