Prince Kumar
Prince Kumar

Reputation: 498

How to show all manufacturer attributes in right column of front end in magento

I have added dfferent manufacturer attribute for dfferent products. i want to show all manufacturer attributes which is added in admin backend in right column of front end. if anyone knows this, please help me out

Upvotes: 0

Views: 786

Answers (1)

Amit Bera
Amit Bera

Reputation: 7611

the code is below...please call the xml code in catalog.xml reference right.

 <reference name="right">
<block type="core/template" after="cart_sidebar" name="catalog.manu" template="catalog/product/manu.phtml"/>
.....
</reference >

add add file under catalog>product/manu.phtml the content is below

     <?php
$attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'color');
if ($attribute->usesSource()) {
    $options = $attribute->getSource()->getAllOptions(false);
    if(count( $options)>0){
    ?>
        <select>
        <?php 
        foreach($options as $eachval){
        ?>
          <option value="<?php echo $eachval['value']?>"><?php echo $eachval['label']?></option>
        <?php  } ?>
    </select> 
    <?php } } ?>

Upvotes: 1

Related Questions