I want to display a product brand name in left column of product page. Can you help me to solve this ?
Thanks advance!!!
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI want to display a product brand name in left column of product page. Can you help me to solve this ?
Thanks advance!!!
Go to local.xml
and put this code:
<catalog_product_view>
<reference name="left">
<block type="catalog/product_view" name="product.brandname" as="product_brandname" template="catalog/product/brandname.phtml"/>
</reference>
</catalog_product_view>
Now create new template file brandname.phtml
at
\app\design\frontend\YOUR_PACKAGE\YOUR_THEME\template\catalog\product\brandname.phtml
Add this code in brandname.phtml
<?php $_product = $this->getProduct(); ?>
<?php
/* YOU CAN GET ANY PRODUCT ATTRIBUTE HERE. */
echo $_product->getBrand();
?>
Note: Change echo $_product->getBrand();
as per your BRAND attribute code
echo $_product->getManufacturer();
?
May 21, 2016 at 6:45