function item_icon($it) { global $g5; $icon = '<span class="sit_icon">'; // 품절 if (is_soldout($it['it_id'])) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_soldout.gif" alt="품절">'; } if ($it['it_type1']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_hit.gif" alt="히트상품">'; } if ($it['it_type2']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_rec.gif" alt="추천상품">'; } if ($it['it_type3']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_new.gif" alt="최신상품">'; } if ($it['it_type4']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_best.gif" alt="인기상품">'; } if ($it['it_type5']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_discount.gif" alt="할인상품">'; } // 쿠폰상품 $sql = " select count(*) as cnt\n from {$g5['g5_shop_coupon_table']}\n where cp_start <= '" . G5_TIME_YMD . "'\n and cp_end >= '" . G5_TIME_YMD . "'\n and (\n ( cp_method = '0' and cp_target = '{$it['it_id']}' )\n OR\n ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) )\n ) "; $row = sql_fetch($sql); if ($row['cnt']) { $icon .= '<img src="' . G5_SHOP_URL . '/img/icon_cp.gif" alt="쿠폰상품">'; } $icon .= '</span>'; return $icon; }
$tmp = sql_fetch($sql); if ($tmp['cnt']) { $out_cd = 'no'; } $it_price = get_price($row); if ($row['it_tel_inq']) { $out_cd = 'tel_inq'; } $image = get_it_image($row['it_id'], 70, 70); ?> <tr> <td class="td_chk"> <?php // 품절검사 if (is_soldout($row['it_id'])) { ?> 품절 <?php } else { //품절이 아니면 체크할수 있도록한다 ?> <label for="chk_it_id_<?php echo $i; ?> " class="sound_only"><?php echo $row['it_name']; ?> </label> <input type="checkbox" name="chk_it_id[<?php echo $i;
$it_id = $_GET['it_id']; $io_id = $_GET['opt']; // 상품정보 $sql = " select * from {$g5['g5_shop_item_table']} where it_id = '{$it_id}' "; $it = sql_fetch($sql); if (!$it['it_id']) { alert('자료가 존재하지 않습니다.', G5_SHOP_URL); } // 본인인증, 성인인증체크 if (!$is_admin) { $msg = shop_member_cert_check($it_id, 'item'); if ($msg) { alert($msg, G5_SHOP_URL); } } if (is_soldout($it['it_id'])) { alert('재고가 부족하여 구매할 수 없습니다.', G5_SHOP_URL); } // 상품옵션체크 $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it_id}' and io_type = '0' and io_use = '1' "; $cnt = sql_fetch($sql); if ($io_id && !$cnt['cnt'] || !$io_id && $cnt['cnt']) { alert('옵션정보가 변경됐습니다.\\n상세페이지에서 다시 주문해 주십시오.', G5_SHOP_URL . '/item.php?it_id=' . $it_id); } // 최소구매수량이 있으면 상세페이지에서 다시 주문토록 안내 if ($it['it_buy_min_qty'] > 1) { alert(get_text($it['it_name']) . ' 은 최소 ' . number_format($it['it_buy_min_qty']) . ' 이상 구매하셔야 합니다.\\n상세페이지에서 다시 주문해 주십시오.', G5_SHOP_URL . '/item.php?it_id=' . $it_id); } // 옵션정보 if ($io_id && $it['it_option_subject']) { $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$it_id}' and io_id = '{$io_id}' ";
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; $row = sql_fetch($sql); $item_use_count = $row['cnt']; // 상품문의의 개수를 얻음 $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; $row = sql_fetch($sql); $item_qa_count = $row['cnt']; if ($default['de_mobile_rel_list_use']) { // 관련상품의 개수를 얻음 $sql = " select count(*) as cnt\n from {$g5['g5_shop_item_relation_table']} a\n left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')\n where a.it_id = '{$it['it_id']}' "; $row = sql_fetch($sql); $item_relation_count = $row['cnt']; } // 상품품절체크 if (G5_SOLDOUT_CHECK) { $is_soldout = is_soldout($it['it_id']); } // 주문가능체크 $is_orderable = true; if (!$it['it_use'] || $it['it_tel_inq'] || $is_soldout) { $is_orderable = false; } if ($is_orderable) { // 선택 옵션 $option_item = get_item_options($it['it_id'], $it['it_option_subject']); // 추가 옵션 $supply_item = get_item_supply($it['it_id'], $it['it_supply_subject']); // 상품 선택옵션 수 $option_count = 0; if ($it['it_option_subject']) { $temp = explode(',', $it['it_option_subject']);
public function item_icon($it) { global $g5; $icon = '<div class="rgba-banner-area">'; // 품절 if (is_soldout($it['it_id'])) { $icon .= '<div class="shop-rgba-dark rgba-banner">Soldout</div>'; } if ($it['it_type1']) { $icon .= '<div class="shop-rgba-dark rgba-banner">Hit</div>'; } if ($it['it_type2']) { $icon .= '<div class="shop-rgba-yellow rgba-banner">Good</div>'; } if ($it['it_type3']) { $icon .= '<div class="shop-rgba-red rgba-banner">New</div>'; } if ($it['it_type4']) { $icon .= '<div class="shop-rgba-green rgba-banner">Best</div>'; } if ($it['it_type5']) { $icon .= '<div class="shop-rgba-purple rgba-banner">Sale</div>'; } // 쿠폰상품 $sql = " select count(*) as cnt\n\t\t\t\t\tfrom {$g5['g5_shop_coupon_table']}\n\t\t\t\t\twhere cp_start <= '" . G5_TIME_YMD . "'\n\t\t\t\t\t and cp_end >= '" . G5_TIME_YMD . "'\n\t\t\t\t\t and (\n\t\t\t\t\t\t\t( cp_method = '0' and cp_target = '{$it['it_id']}' )\n\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) )\n\t\t\t\t\t\t ) "; $row = sql_fetch($sql); if ($row['cnt']) { $icon .= '<div class="shop-rgba-orange rgba-banner">Coupon</div>'; } $icon .= '</div>'; return $icon; }
} $list = array(); $sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) "; $sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc "; $result = sql_query($sql); for ($i = 0; $row = sql_fetch_array($result); $i++) { $list[$i] = $row; $list[$i]['out_cd'] = ''; $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' "; $tmp = sql_fetch($sql); if ($tmp['cnt']) { $list[$i]['out_cd'] = 'no'; } $list[$i]['price'] = get_price($row); if ($row['it_tel_inq']) { $list[$i]['out_cd'] = 'tel'; } $list[$i]['is_soldout'] = is_soldout($row['it_id']); } // Page ID $pid = $pid ? $pid : 'wishlist'; $at = apms_page_thema($pid); if (!defined('THEMA_PATH')) { include_once G5_LIB_PATH . '/apms.thema.lib.php'; } $g5['title'] = "위시리스트"; include_once './_head.php'; $skin_path = $member_skin_path; $skin_url = $member_skin_url; include_once $skin_path . '/wishlist.skin.php'; include_once './_tail.php';