Showing posts with label get product custom option id magento. Show all posts
Showing posts with label get product custom option id magento. Show all posts

Tuesday 17 September 2013

get product custom option magento

$priductid = 82;
$product = Mage::getModel('catalog/product')->load($priductid);

foreach ($product->getOptions() as $o) {
                              $values = $o->getValues();
$optionType = $o->getType();/*********TYPE************/
  $o->getId(); /************getId*****************/

                                     /* dropdown type custom option */
if ($optionType == 'drop_down') {
                                    foreach ($values as $k => $v) {
$drpdoption = $v->getData();
                                    }
                                }
                                       /* end dropdown type custom option */

}