0
votes

I want to configure a product in Magento. In configurable products, by default 0.00 price is shown if we do not set regular price.

I have made setting on Configurable Product detail page to auto select the first associated product from drop-down list when page loads.

In product listing, still regular price is shown as 0.00 for configurable products.

But how to automatically show price of first associated product in place of regular price in product listing if it is configurable product on category page in magento?

1

1 Answers

0
votes

Have you tried to fetch simple product's price from configurable product and print on category page.? If not tried then try below code.

<?php
    if($_product->getTypeId()=='configurable'){
    $childProducts = Mage::getModel('catalog/product_type_configurable')
                    ->getUsedProducts(null,$_product);
                    foreach($childProducts as $child){
                        echo $child->getFinalPrice();
                        break;  //it will stop you to print other prices
                    }           
    }
?>

Hope this helps you!