1

How to show cheapest simple product price on product list? As far as I know the values shown on product list are values taken from catalog_product_index_price.price and catalog_product_index_price.final_price.

It seems that magento indexes prices taken from the first associated product for a configurable product. How to override it to get the cheapest associated product instead of the first one?

  • Was my resonse the one you where looking for? If so please choose as chosen Anwser. – Kay Int Veen Feb 10 '17 at 14:19
1

I think this is what you are looking for

if($_product->isConfigurable())
{
    $childProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null,$_product);
    $childPriceLowest = "";    
    $childPriceHighest = "";    

    foreach($childProducts as $child){
        $_child = Mage::getModel('catalog/product')->load($child->getId());

        if($childPriceLowest == '' || $childPriceLowest > $_child->getPrice() )
        $childPriceLowest =  $_child->getPrice();

    }
    echo $childPriceLowest;
}

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.