Magento – how to get min/max regular price for a grouped product in list.phtml

grouped-productsprice

i'm wondering how to get the normal price (before discount) for a grouped product in list.phtml, i only know how to get the special price by the following code

<?php echo 'From: '.$_coreHelper->formatPrice($_product->min_price, false).' - '.$_coreHelper->formatPrice($_product->max_price, false); ?>

but how to get min/max regular price?

Best Answer

I know this question has been asked while ago, but I'm gonna answer it anyway if it helps anyone.

So one thing you could try is following which would work in some instances,

$_product->getMaxPrice();

But it didn't work for me in my case, So I came up with following snippet, which is what I have implemented on our site working perfectly and much more robust,

    $_model_group_prod = Mage::getModel('catalog/product_type_grouped');
    $_associated_products = $_product->getTypeInstance(true)->getAssociatedProducts($_product);

    foreach( $_associated_products as $_associated_product ) {

        if( $_associated_product->getPrice() >= $regular_price ) {

            $regular_price = $_associated_product->getPrice();

        }

    }

echo 'Regular/Max Price: '.$_coreHelper->formatPrice($regular_price, false);