Magento – Magento : How to Customize Product Custom Options

custom-optionsproductstatic-block

I need to display my product's custom options in front end, in specific way. For example, I would like tabulate in two columns, drop down fields of my custom options and add some header text on another columns for front end.
I considered combination with static block might work but so far.
I couldn't find any related information.

Are there any ideas on how I can do this?

Best Answer

You first build html and then you can use the following code to get custom options:

$ProductId=1;
$product = Mage::getModel('catalog/product')->load($ProductId); 
if ( $product->getData('has_options') && ($product->getTypeID() == 'simple') ) {
           foreach ($product->getOptions() as $o) {
              //$o->getOptionId();
              //$o->getTitle();
              //$o->getType();
              //$o->getIsRequire();
              //$o->getType();
              //$o->getValues();

           }
       }