Minimum Product Price in a Category

In this blog post, we will see the faster way to get minimum product price in category

Add this code to your category page where you want to display it.

$layer = Mage::getSingleton('catalog/layer');
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
                if ($category->getId()) {
                    $origCategory = $layer->getCurrentCategory();
                    $layer->setCurrentCategory($category);
                }
$collection = $layer->getProductCollection();
$collection->getSelect()->reset('order');
$collection->getSelect()->order('minimal_price','asc');
$collection->getSelect()->limit(1);

echo $collection->getFirstItem()->getMinimalPrice();
  • Alex

    Hi, guys. Here more simple variant (working variant)

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

  • This one works for me..

    getMinimalQty($_product)== null?1:$this->getMinimalQty($_product) ?>