skip to Main Content

I created one attribute “gmdn” on Magento and put it in attribute set default. But after I gave a value to this attribute, it is displayed in the additional information tab. But I want to display it below the name of product in the view page.

2

Answers


  1. For this you have to make changes in file

    app/design/frontend/your_package/your_theme/template/catalog/product/view.phtml

    and add below code after product name division

    <?php echo $_product->getGmdn() ?>
    
    Login or Signup to reply.
  2. For example, Your attribute code is gmdn, You need to do the following things at /app/design/frontend/[your package]/[your theme]/template/catalog/product/view.phtml:

    1) <?php
        $gmdn = $this->htmlEscape($_product->getData('gmdn'));    
        echo $gmdn;    
    ?>
    

    Or

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

    These two are same. But representing way is diferent.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search