I want to show Configurable Product Options on category Page for that i have added this code in my list.phtml. it shows the options of the configurable products.

<?php if($_product->isConfigurable()): ?>
                <?php $attributes = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product); ?>
                <?php foreach($attributes as $attribute): ?>
                    <ul><li><?php echo $attribute['label']; ?></li></ul>
                     <select name="super_attribute[<?php echo $attribute['attribute_id'] ?>]" id="attribute<?php echo $attribute['attribute_id'] ?>">
                        <option> <?php echo $this->__('Choose an option') ?></option>
                        <?php $values = $attribute['values']; ?>
                        <?php foreach($values as $value): ?>
                            <option value="<?php echo $value['value_index']; ?>" price="<?php echo $value['pricing_value']; ?>"><?php echo $value['label']; ?></option>
                        <?php endforeach; ?>
                <?php endforeach; ?>
<?php endif; ?>

But the problem is

1.how to change Product price according to selected options?

  1. In some products there are two configurable options and the values of second one depends on the First option Selected(on product page).

How to Do the same on List page?


I found the exact Solution here

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.