Question

I want to get only those custom options which are selected by the customer on the product page. while I am on the onepage page, so I have the quote object.

$items = $quote->getAllItems();
foreach ($items as $item) {
    //getting selected custom options
}
Was it helpful?

Solution

This is the way the options are retrieved in the cart page. It should work for you also:

$helper = Mage::helper('catalog/product_configuration');
$items = $quote->getAllItems();
foreach ($items as $item) {
    $options = $helper->getCustomOptions($item);
    //do something with $options.
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top