When I select the product options of configurable product on my website I get a pop-up with the added product. I want to show the selected options on the pop-up. I already got the following code which shows the label, but i can't seem the selected options to show in the pop-up.
Can someone tell me how to get the selected options on the pop-up.
For example:
I want 'Product A' with options: Color: black and size: 16. I add this product to cart and want to see the pop-up with both Color: black and Size: 16
<h4 class="product-name"></h4>
<div class="options-wrapper">
<!-- Options: -->
<table class="options">
<?php
foreach ($_product->getTypeInstance()->getConfigurableAttributes() as $attribute) {
echo '<td><td>' . $attribute->getLabel() . '</td><td>'. $attribute->getValue($_product).'</td></tr>';
}
?>
</table>
</div>