This is the blog for getting Idea regarding PHP, Magento, jQuery and JavaScript for Customization.

Tuesday 25 September 2012

Magento : Get product custom option in Category page


To Get Product Custom Option On the Category page.


 <?php $i=0; foreach ($_productCollection as $_product): ?>


 <?php if($_product->isSaleable()): ?>

 <?php

                    Mage::app('base');
                    $product = Mage::getModel('catalog/product')->load($_product->getId());
    echo $product->getId();
                    $options = $product->getOptions();
                    foreach ($options as $option) {

                        foreach($option->getValues() as $value) {

                            echo $value->getOptionTypeId() . "<br/>";
                            echo $value->getTitle() . "<br/>";
                            echo $value->getPrice(true) . "<br/>";

                        }
                    }
                    ?>
               
<?php endif; ?>

<?php endforeach; ?>

No comments:

Post a Comment