I am trying to display prices of all the simple products which are assigned to the configurable products. For that I am using:
<?php
$attributes = $configurable->getConfigurableAttributesAsArray($_product);
foreach($attributes as $attrId => $attribute){
$att_value = $attribute['values'];
echo "<pre>"; print_r($att_value); echo "</pre>";
}
?>
After this is I am not getting price of the simple products, although I got the variations of the configurable product. But I want to display the price of the simple products. How can I do this?
Best Answer
You can try below code to get data of simple products assigned to configurable products.
You can observe the reference file for more details.