Thursday, May 16, 2013

Magento - Get Min and Max product price in current category / Display lowest / highest price from current product collection

Display minium / lowest product price from current category in magento. get min price from current product collection. Fine the below code to get min price value.


echo $minPrice=Mage::getSingleton('catalog/layer')
->setCurrentCategory(Mage::registry('current_category'))
->getProductCollection()
->getMinPrice();


Display maximum / Highest product price from current category in magento. get max price from current product collection. Fine the below code to get max price value.

echo $maxPrice=Mage::getSingleton('catalog/layer')
->setCurrentCategory(Mage::registry('current_category'))
->getProductCollection()
->getMaxPrice();

By PHP with No comments

0 comments:

Post a Comment

    • Popular
    • Categories
    • Archives