From e0bb9069bdf3f4349198f4e07189256a7c43e86f Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 29 May 2013 10:14:27 +0900 Subject: [PATCH] =?UTF-8?q?#176=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=87=BC?= =?UTF-8?q?=ED=95=91=EB=AA=B0=20=EC=98=B5=EC=85=98=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/cartsub.inc.php | 152 +++++++++++-------- mobile/shop/item.php | 256 ++++++++++++++------------------ mobile/shop/orderformupdate.php | 27 ++-- shop/item.php | 2 +- 4 files changed, 219 insertions(+), 218 deletions(-) diff --git a/mobile/shop/cartsub.inc.php b/mobile/shop/cartsub.inc.php index 910b4f012..2d1ec8395 100644 --- a/mobile/shop/cartsub.inc.php +++ b/mobile/shop/cartsub.inc.php @@ -14,19 +14,21 @@ else $colspan = 6; ?> + +
- + + 포인트'; - echo ''; + echo ''; } ?> @@ -42,30 +44,32 @@ $goods_count = -1; // $s_uq_id 로 현재 장바구니 자료 쿼리 $sql = " select a.ct_id, + a.it_id, a.it_name, - a.it_opt1, - a.it_opt2, - a.it_opt3, - a.it_opt4, - a.it_opt5, - a.it_opt6, a.ct_price, a.ct_point, a.ct_qty, a.ct_status, - b.it_id, b.ca_id - from {$g4['shop_cart_table']} a, - {$g4['shop_item_table']} b + from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) where a.uq_id = '$s_uq_id' - and a.it_id = b.it_id - order by a.ct_id "; + and a.ct_num = '0' + order by a.ct_order, a.ct_id "; $result = sql_query($sql); $good_info = ''; for ($i=0; $row=mysql_fetch_array($result); $i++) { + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_point * ct_qty) as point, + SUM(ct_qty) as qty + from {$g4['shop_cart_table']} + where it_id = '{$row['it_id']}' + and uq_id = '$s_uq_id' "; + $sum = sql_fetch($sql); + if (!$goods) { //$goods = addslashes($row[it_name]); @@ -101,41 +105,36 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) } $it_name = $a1 . stripslashes($row['it_name']) . $a2; - if ($row['it_opt1'] || $row['it_opt2'] || $row['it_opt3'] || $row['it_opt4'] || $row['it_opt5'] || $row['it_opt6']) { // 상품에 옵션이 있다면 - $it_name .= '
'.print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']).'
'; + $it_options = print_item_options($row['it_id'], $s_uq_id); + if($it_options) { + $mod_options = ''; + if($s_page == 'cart.php') + $mod_options = '
'; + $it_name .= '
'.$it_options.'
'; } - $point = $row['ct_point'] * $row['ct_qty']; - $sell_amount = $row['ct_price'] * $row['ct_qty']; + $point = $sum['point']; + $sell_amount = $sum['price']; ?> - '; - else - echo ''; - ?> - + + '; - echo ''; - } + if ($s_page == 'cart.php') + echo ''; + else if ($s_page == 'orderinquiryview.php') + echo ''; ?> @@ -224,7 +223,7 @@ if ($tot_amount > 0) {

장바구니의 상품을 주문하시려면 주문하기를 클릭하세요. 비우기는 장바구니의 상품을 모두 비웁니다.

쇼핑 계속하기주문하기 - 수량변경 + 선택삭제비우기 @@ -237,6 +236,51 @@ if ($s_page == 'cart.php') { if ($i != 0) { ?> +" method="post"> + @@ -280,22 +282,6 @@ else - '.PHP_EOL; - echo ''.PHP_EOL; - echo ''.PHP_EOL; - echo ''.PHP_EOL; - } - } - ?> - @@ -307,18 +293,16 @@ else - - + + - + @@ -335,26 +319,93 @@ else - - - - - - - -
상품이미지 상품명수량총수량 판매가 소계포인트 삭제
- - - - + '.$row['ct_qty'].' 삭제'.$row['ct_status'].'
'.$str.'
- 원 - 시중가격
판매가격 - 원 - + 원 +
- 점 - + 점 +
수량 - - - -
+ +
+

선택옵션

+ + + + + + + + +
+
+ +
+
+ + + +
+

추가옵션

+ + + + + + + + +
+
+ + + + + + +
+ +
    +
  • + + + + + + + (+0원) +
    + + + +
    +
  • +
+ + +
+ +
+