I am working on aMagento 1.9website.

I want to add an attribute of the brand on the product page under the product name.

I have highlighted in the following image.

enter image description here

can anyone please guide how can I do the same.

4 Answers 4


Open ..\..\catalog\product\view.phtml

And Find line,

<span class="h1"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></span>

Put the code below span

    $productId = $_product->getId();
    $product= Mage::getModel('catalog/product')->load($productId);
    $manufaturer= $product->getAttributeText('manufacturer');
    echo $manufaturer;
  • It worked and am able to add attribute on page but the size of that text is too small can you please guide how can i increase its size and if possible change its color too ? Jun 25, 2018 at 23:12
  • You Can Put this code after this -> <div class="product-name"></div> your code Jun 26, 2018 at 8:53

For example, Your attribute code is "Brand", You need to use this code in following location:

/app/design/frontend/[your package]/[your theme]/template/catalog/product/view.phtml:

   $Brand = $this->htmlEscape($_product->getData('Brand'));    
   echo $Brand;    


echo $this->htmlEscape($_product->getData('Brand')); 

If you want to add with saperate file then you can call custom phtml file before after sku,

<referenceContainer name="product.info.stock.sku">            
    <block class="Magento\Catalog\Block\Product\View" name="product_view_style" template="Magento_Catalog::product/view/custom.phtml" before="-"/>

and create custom.phtml here ,


<?php $_product = $this->getProduct();
 $optionId = $_product->getData('color');

  /*Swacth Text value*/
  $attr = $_product->getResource()->getAttribute('color');
  if ($attr->usesSource()) {
     $optionText = $attr->getSource()->getOptionText($optionId);
  echo  $optionText;

Hope it's help you !


To edit some extra information you should not modify default Magento file. For this, you can override Magento default file in your theme.

To display brand attribute value after product name follows below steps:

1.Copy view.phtml file from


and place in


in this file, you can see

<div class="product-name">
    <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
  1. Write below code after completion of "product-name" div, for example, your attribute code is "brand" and attribute type is "text" then

    <div class="brand-name">
        <?php echo $this->->escapeHtml($_product->getData('brand')); ?>

if the attribute type is dropdown then use

<div class="brand-name">
    <?php echo $_product->getAttributeText("brand"); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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