1- Create a attribute as follow:

2-Assign it to your attribute set:
3- select this attribute value to yes in product section:
4- Use the following code in list.phtml:
<?php
if($_product->getNew()){?>
<div class="new">New</div>
<?php
}
?>
Or By Using Code
<?php
$now = date("Y-m-d");
$newsFrom= substr($_f_product->getData('news_from_date'),0,10);
$newsTo= substr($_f_product->getData('news_to_date'),0,10);
if ($now>=$newsFrom && $now<=$newsTo) {
?>
<span class="new">NEW</span>
<?php };
?>
0 Comments