Monday 28 September 2015

How to get Custom Options Programmatically in Magento


How to get Custom Options Programmatically in Magento

I have given here only array of custom option. You can use this array for multipurpose. Fetch the value from array and show it as your wish.


$product = Mage::getModel("catalog/product")->load($_product->getId());
$custopOption = $product->getOptions();
foreach($custopOption as $optionKey => $optionVal){
    foreach($optionVal->getValues() as $valuesKey => $valuesVal){
        echo $optionVal->getId();
    }
}

No comments: