I have a couple products at checkout that I need to be able to get all of the custom options that are selected for them through code.
Any help is much appreciated! <
$quote=$observer->getEvent()->getQuote();
$quoteid=$quote->getId();
$session= Mage::getSingleton('checkout/session');
$getotal = Mage::helper('checkout')->getQuote()->getGrandTotal();
foreach($session->getQuote()->getAllItems() as $item)
{
$sellcheck = Mage::getModel('catalog/product')->load($item->getProduct()->getId())->getissellbool();
$options = Mage::getModel('catalog/product')->load($item->getProduct()->getId())->getProductOptionsCollection();
foreach ($options as $o)
{
$title = $o->getTitle();
$values = $o->getValues();
foreach($values as $v)
{
$mydata = $v->getPrice();
echo 'options price: ' . $mydata;
}
}
}
To access product custom options at the shopping cart you can utilise this code.