From 4e40f2a44c42459a3ba5f1580b1830253c1ace98 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 24 Feb 2014 14:45:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=ED=92=88=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=BF=A0=ED=8F=B0=20=EC=95=84=EC=9D=B4=EC=BD=98=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 0142d99a7..b0b44bb9a 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1379,6 +1379,8 @@ function relation_item($it_id, $width, $height, $rows=3) // 상품이미지에 유형 아이콘 출력 function item_icon($it) { + global $g5; + $icon = ''; // 품절 if (is_soldout($it['it_id'])) @@ -1399,6 +1401,20 @@ function item_icon($it) if ($it['it_type5']) $icon .= '할인상품'; + // 쿠폰상품 + $sql = " select count(*) as cnt + from {$g5['g5_shop_coupon_table']} + where cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and ( + ( cp_method = '0' and cp_target = '{$it['it_id']}' ) + OR + ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) ) + ) "; + $row = sql_fetch($sql); + if($row['cnt']) + $icon .= '쿠폰상품'; + $icon .= ''; return $icon;