Sam Danger
Sam Danger

Reputation: 49

Magento Custom Option label in Shopping Cart

I have simple products with custom options (in this case it's color). They are NOT configurable products. If you are unsure what I mean by custom options see this:http://vimeo.com/15475673

They are custom options (not Attributes).

I would like the label (i.e. green or red or blue) of the chosen option to be displayed next to the SKU in my shopping cart. My current code (default/template/checkout/cart/item/default.phtml) looks like this:

<?php echo 'SKU:' ?>
<?php echo $_item->getSku() ?>

How do I call out and echo the custom option label?

Upvotes: 0

Views: 1313

Answers (1)

drsndodiya
drsndodiya

Reputation: 1685

using this you can able to get product custom option value write this code in your cart page and you will get the custom option in your cart page.

$productOptions= $item->getProduct()->getTypeInstance(true)->
getOrderOptions($item->getProduct());

hope this will help you

Upvotes: 1

Related Questions