From 9599aae0e4d923ebec5ba865ac8062c3746c7190 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 27 May 2013 10:41:56 +0900 Subject: [PATCH] =?UTF-8?q?ct=5Fnum=20=ED=95=84=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/shop.extend.php | 9 +++++++++ shop/cartupdate.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/extend/shop.extend.php b/extend/shop.extend.php index 7209fb577..26569b986 100644 --- a/extend/shop.extend.php +++ b/extend/shop.extend.php @@ -122,11 +122,20 @@ $result = sql_query($sql, false); if(!$result) { sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` ADD `ct_option` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ct_stock_use`, + ADD `ct_num` INT(11) NOT NULL DEFAULT '0' AFTER `ct_qty`, ADD `io_id` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ct_qty`, ADD `io_type` TINYINT(4) NOT NULL DEFAULT '0' AFTER `io_id`, ADD `io_price` INT(11) NOT NULL DEFAULT '0' AFTER `io_type` ", false); } +// ct_num 추가 +$sql = " select ct_num from {$g4['shop_cart_table']} limit 1 "; +$result = sql_query($sql, false); +if(!$result) { + sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` + ADD `ct_num` INT(11) NOT NULL DEFAULT '0' AFTER `ct_qty` ", false); +} + // it_brand 추가 /* $sql = " select it_brand from {$g4['shop_item_table']} limit 1 "; diff --git a/shop/cartupdate.php b/shop/cartupdate.php index 1d510bc59..b005b6490 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -229,11 +229,11 @@ else // 장바구니에 담기 // 장바구니에 Insert $comma = ''; $sql = " INSERT INTO {$g4['shop_cart_table']} - ( uq_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, io_id, io_type, io_price, ct_time, ct_ip, ct_direct ) + ( uq_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_direct ) VALUES "; for($i=0; $i<$option_count; $i++) { - $sql .= $comma."( '$tmp_uq_id', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct' )"; + $sql .= $comma."( '$tmp_uq_id', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$i', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct' )"; $comma = ' , '; }