Magento 1: How to Add Product Labels in 20 minutes


Most of the templates that you’ve purchase off the shelves come with 2 default labels, namely New and Sale. As the needs for market grows, an eCommerce site may need more than 2 labels.

Therefore, in this guide we will show you how to create additional product labels using attributes.

Before you begin, please have the following ready:

  • Store backend access
  • Store FTP access
  • Labels in .png/.jpeg (new and sales or anything)

Log into your Magento admin panel and go to the menu Catalog -> Attributes -> Manage Attributes. 

1.Click on the Add New Attribute button and follow the 2 steps as shown on the image.

add-product-label-in-magento-1.pngProceed to Manage Label/Options and follow the 2 steps on shown on the image.

2. Do the same for Sale label:


3. Now, attaching the newly created attribute to the product. Go to Catalog -> Attributes -> Manage Attribute Sets. Choose your attribute set. Usually it is called Default.


4. Choose your New and/or Sale attributes from the “Unassigned Attributes” section on the right and drag it to the Groups section on the left.


5. Click on Save Attribute Set.

6. Go to Catalog -> Manage Products,  choose a desire product and set the newly added attributes (Sale or New) depending on which you’ve added earlier on.


7. Save the product.

Now you’ve got the first part done. The next step is to add a few lines of code to the template file.

  • Login to the FTP.
  • Navigate to /public_html/app/design/frontend/theme/theme_name/template/catalog/product/list.phtml
    *remember to replace theme and theme_name to your own theme*
  • Locate this line: “foreach ($_productCollection as $_product): ?>” and add in the follow code within the <li></li> tag

<?php if ($_product->getAttributeText('new') == "Yes"): ?>
<div class="custom-product-new">
<img src="<?php echo Mage::getBaseUrl(); ?>media/wysiwyg/label_blue_new.png">
</div >
<?php endif; ?>


<?php if ($_product->getAttributeText('sale') == "Yes"): ?>
<div class="custom-product-special">
<img src="<?php echo Mage::getBaseUrl(); ?>media/wysiwyg/bb-label-special-d.png">
</div >
<?php endif; ?>