1. 当前类别最大最小价格:
$minPrice = Mage::getModel('catalog/product')->getCollection()
->addStoreFilter()
->addAttributeToSelect('price')
->addAttributeToSort('price', 'ASC')->getFirstItem()->getMinimalPrice()*1;
$maxPrice = Mage::getModel('catalog/product')->getCollection()
->addStoreFilter()
->addAttributeToSelect('price')
->addAttributeToSort('price', 'DESC')->getFirstItem()->getMinimalPrice()*1;
2 当前产品最大最小价格:
$categoryModel = Mage::getModel('catalog/category')->load($id); // Replace with Id of Cat
$productColl = Mage::getModel('catalog/product')->getCollection()
->addCategoryFilter($categoryModel)
->addAttributeToSort('price', 'asc')
->setPageSize(1)
->load();
$lowestProductPrice = $productColl->getFirstItem()->getPrice();
$productColh = Mage::getModel('catalog/product')->getCollection()
->addCategoryFilter($categoryModel)
->addAttributeToSort('price', 'desc')
->setPageSize(1)
->load();
$highestProductPrice = $productColh->getFirstItem()->getPrice();