Magento adds the "new" or discount quantity label magentonewlabel. discountlabel to the product. The bottom of the article is. Add a new tag to the new product. Shows the quantity of discounts for discount products. You can add a piece of code to the bottom of the cata article in the template folder.
Add the "new" label to the new product. Shows the quantity of discounts for discount products.
You can add a piece of code to the catalog/product/list. phtml file in the template folder. The following code is used:
Timestamp (time ();?>
$ New_str_tm = strtotime ($ _ product-> getNews_from_date ());
$ New_end_tm = strtotime ($ _ product-> getNews_to_date ());
?>
0):?>
$ New_str_tm )&&(! $ New_end_tm):?>
NEW
$ Spe_end_tm = strtotime ($ _ product-> getSpecial_to_date ());
$ Spe_str_tm = strtotime ($ _ product-> getSpecial_from_date ());
$ Spe_pri =$ _ product-> getSpecial_price ();
?>
GetResource ()-> getAttribute ('price')-> getFrontend ()-> getValue ($ _ product)?>
$ Spe_str_tm )&&(! $ Spe_end_tm):?>
%
The above code is inserted to the corresponding position .. It is best to put After this
After this is done. You also need to change the CSS. Display it in the corresponding position.
. Products-grid. ico_new_bg {height: 33px; font-size: 14px; line-height: 24px; color: # ffffff; background: url (".. /images/ico_bg.png "); position: absolute; margin:-10px-10px 0; padding: 0 10px 0; z-index: 10 ;}
. Products-grid. ico_percent_bg {height: 33px; font-size: 14px; line-height: 24px; color: # ffffff; background: url (".. /images/ico_bg.png "); position: absolute; margin:-10px-10px 0; padding: 0 10px 0; z-index: 10 ;}
The csscode is written under styles.css. Add to/* View Type: Grid .. Products-grid li. item: add the last two lines of code after this line.
Adjust the location of margin to suit your website.
Bytes. Add a new tag to the new product. Shows the quantity of discounts for discount products. You can write a piece of code and add it to cata in the template folder...