Skip to content

Instantly share code, notes, and snippets.

@ryaan-anthony
Created November 22, 2013 19:02
Show Gist options
  • Select an option

  • Save ryaan-anthony/7605104 to your computer and use it in GitHub Desktop.

Select an option

Save ryaan-anthony/7605104 to your computer and use it in GitHub Desktop.
$options = Mage::getModel('sales/quote_item_option')
->setItemId($item->getId())
->getCollection()
->getOptionsByItem($item);
foreach($options as $option){
if($option->getCode() == "info_buyRequest" && $buy_request = $option->getValue()){
$buy_request = unserialize($buy_request);
if(isset($buy_request['custom_options']['cake'])){
//cake is found in the custom_options of a buyRequest
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment