Add the Brand name on Product page
Note "manufacturer" is the Attribute code for Brand
<?php
$product = Mage::getModel('catalog/ product');
$attributes = Mage::getResourceModel('eav/ entity_attribute_collection')
->setEntityTypeFilter($ product->getResource()-> getTypeId())
->addFieldToFilter('attribute_ code', 'manufacturer');
$attribute = $attributes->getFirstItem()-> setEntity($product-> getResource());
$manufacturers = $attribute->getSource()-> getAllOptions(false);
?>
<ul id="manufacturer_list">
<?php foreach ($manufacturers as $manufacturer): ?>
<li><a href="#"><?php echo $manufacturer['label'] ?></a></li>
<?php endforeach; ?>
</ul>
$product = Mage::getModel('catalog/
$attributes = Mage::getResourceModel('eav/
->setEntityTypeFilter($
->addFieldToFilter('attribute_
$attribute = $attributes->getFirstItem()->
$manufacturers = $attribute->getSource()->
?>
<ul id="manufacturer_list">
<?php foreach ($manufacturers as $manufacturer): ?>
<li><a href="#"><?php echo $manufacturer['label'] ?></a></li>
<?php endforeach; ?>
</ul>
No comments:
Post a Comment
Thankyou for your Comments