Question

I tried to get value of attributes of configurable products.

enter image description here

my question is: how to get the price and selected value of associated product?

Thanks.

Was it helpful?

Solution

Try below code

$_product = $this->getProduct();// Or you can load your product here
$_attributes = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
print_r($_attributes);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top