I have some intriguing questions related to Custom Options of Product:-
Is there any difference between Options & Custom Options? This is because I have foun
First load the products from the collection then loop as follows :
$product = 100; // product id, you should get first
foreach($product->getOptions() as $options)
{
$options->getType(); // get option type
$optionValues = $options->getValues();
foreach($optionValues as $optVal)
{
print_r($optVal->getData());
// or $optVal->getData('option_id')
}
}
* Modified *
$prdSku = 125; // sample sku
$product = Mage::getModel('catalog/product');
$prdId = $product->getIdBySku($prdSku);
$product->load($prdId);
if ($product->getId()) {
if ($product->hasCustomOptions()) {
foreach ($product->getOptions() as $opt) {
$optionType = $opt->getType();
if ($optionType == 'drop_down') {
$values = $opt->getValues();
foreach ($values as $k => $v) {
Mage::log("Array Key = $k;");
Mage::log("Array Value: $v");
}
}
}
}