<?php //判断是否为组合产品! if($_product->getTypeId()=="grouped"){ // echo "product type:".$_product->getTypeId(); $group_s = 1; } ?> <?php //判断是否为新品。 $news_from_date = strtotime($_product['news_from_date']); $news_to_date = strtotime($_product['news_to_date']); $now1 = strtotime(date('Y-m-d h:i:s',time())); if(($news_to_date>$now1)&&($news_from_date<$now1)){ $new_s = 1; //echo 'new-product'; } ?> <?php if($new_s ==1){ echo 'new-product'; }elseif($group_s==1){ echo "product type:".$_product->getTypeId(); } $new_s = 0; $group_s = 0; ?>