1

I would like to know the best way of getting the final price of a configurable option. I can get the price by looping around eg:

$productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
$basePrice = $product->getPrice();

foreach($productAttributeOptions as $productAttribute)
{
    foreach($productAttribute['values'] as $valuesKey => $valuesVal)
    {
        $combinedPrice = $valuesVal['pricing_value'] + $basePrice;
        $_priceIncludingTax = Mage::helper('tax')->getPrice($product, $combinedPrice, true, null, null, null, null, false);
    }
}

But is the the best way? So is there a magic function to call to get the final prices (inc tax) of each option?

1
  • Please check in file : Mage_Catalog_Block_Product_View_Type_Configurable
    – Abdul
    Commented Oct 30, 2015 at 4:41

0