1. USAGE
1.1. ADD A NEW LABEL
1.2. ADD YOUR OWN CUSTOM CSS FOR LABEL
- On backend, menu Product Labels > CSS Editor.
- Add your custom css in the Content box. In this example, we create a new label with class mycolor with label image is an icon in productlabel_icons.png.
.productlabels_icons .newcolor { background-position:0 -500px }
- Then, edit a label rule, field CSS Class, enter value newcolor as belows:The built-in classes are created in skin/frontend/base/default/css/productlabels.css as belows:
- .productlabels_icons .orange { background-position:0 0 }
- .productlabels_icons .yellow { background-position:0 -60px }
- .productlabels_icons .blue { background-position:0 -120px }
- .productlabels_icons .violet { background-position:0 -180px }
- .productlabels_icons .new { background-position:-200px 0 }
- .productlabels_icons .special { background-position:-200px -60px }
- .productlabels_icons .bestseller { background-position:-200px -120px }
2. CUSTOMIZE LABEL GRAPHICS
– You can edit the file skin/frontend/base/default/images/productlabel_icons.png
– We created some default icons. If you want to add more icons, just edit this file and add your custom icons, then add your own custom css to display the icons.
3. SHOW LABELS ON FRONTEND
All labels whose conditions matched and is enabled will be showed up.
3.1. SHOW LABELS ON PRODUCT LISTING PAGE
In order to show label on this page, you have to edit your template file app/design/frontend/
If you don’t find list.phtml, you should copy the file from app/design/frontend/base/default/template/catalog/product/list.phtml to app/design/frontend/
display($_product);?>
We would like to recommend to insert the product thumbnail code below:
3.2. SHOW LABELS ON PRODUCT DETAILS PAGE
If you don’t find list.phtml, you should copy the file from app/design/frontend/base/default/template/catalog/product/view.phtml to app/design/frontend/
display($_product);?>
We would like recommend to insert below the product thumbnail code:
getChildHtml('media');?>
display($_product);?>