On Magento I need to make it so on category view, if the minimal price of a configurable product is 0, but there are other childs with higher price to show the next minimal price instead of 0.00.

Anyone able to give any suggestions will be greatly appreciated.

1 Answer 1


On the category view the items fill the page as objects. You can reference each individual object by calling:

$currentProductId = $item->getId()

$configurableProduct = Mage::getModel('catalog/product')->load($currentProductId); 
$childProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null,$configurableProduct);   
foreach($childProducts as $child) {
    echo $child->getPrice();

All your child products will be the simple products of your configurable just loop through them in the foreach and grab their prices. I think the best way to do what you want to do is put an if statement inside the foreach and if the price is set to 0 then change it. :) Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.