diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php index 51c63b6c5..3849e9385 100644 --- a/extend/shop.extend2.php +++ b/extend/shop.extend2.php @@ -294,4 +294,14 @@ if(!$result) { ADD `it_sc_minimum` INT(11) NOT NULL DEFAULT '0' AFTER `it_sc_amount`, ADD `it_sc_qty` INT(11) NOT NULL DEFAULT '0' AFTER `it_sc_minimum` ", false); } + +// 장바구니 배송비필드 추가 +$sql = " select ct_send_cost2 from {$g4['shop_cart_table']} limit 1 "; +$result = sql_query($sql, false); +if(!$result) { + sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` + DROP `ct_send_cost`, + ADD `ct_send_cost` INT(11) NOT NULL DEFAULT '0' AFTER `io_price`, + ADD `ct_send_cost2` TINYINT(4) NOT NULL DEFAULT '0' AFTER `ct_send_cost` ", false); +} ?> \ No newline at end of file diff --git a/install/shop.sql b/install/shop.sql index 52f1d9227..93599c27e 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -74,7 +74,8 @@ CREATE TABLE IF NOT EXISTS `shop_cart` ( `io_price` int(11) NOT NULL DEFAULT '0', `ct_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `ct_ip` varchar(25) NOT NULL DEFAULT '', - `ct_send_cost` varchar(255) NOT NULL, + `ct_send_cost` int(11) NOT NULL DEFAULT '0', + `ct_send_cost2` tinyint(4) NOT NULL DEFAULT '0', `ct_direct` tinyint(4) NOT NULL DEFAULT '0', `ct_select` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`ct_id`), diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 5a5277924..5fba5214b 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1182,14 +1182,14 @@ function get_item_sendcost($it_id, $uq_id) global $g4, $default; if($default['de_send_cost_case'] != '개별') - return false; + return 0; $sql = " select it_id, it_sc_type, it_sc_method, it_sc_amount, it_sc_minimum, it_sc_qty from {$g4['shop_item_table']} where it_id = '$it_id' "; $it = sql_fetch($sql); if(!$it['it_id']) - return false; + return 0; if($it['it_sc_type']) { if($it['it_sc_type'] == 1) { // 조건부무료 diff --git a/mobile/shop/item.php b/mobile/shop/item.php index dc6ebc6d3..3b04f2c1a 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -343,22 +343,22 @@ else - + - + + '; + echo ''; echo '수령후 지불'; } else { - echo ''; + echo ''; echo '주문시 결제'; } } diff --git a/shop/cartoption.php b/shop/cartoption.php index ba45f3dde..8dbb1d8a8 100644 --- a/shop/cartoption.php +++ b/shop/cartoption.php @@ -19,7 +19,8 @@ $sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id $result = sql_query($sql); // 판매가격 -$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' "; +$sql2 = " select ct_price, it_name, ct_send_cost, ct_send_cost2 + from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' "; $row2 = sql_fetch($sql2); if(!mysql_num_rows($result)) @@ -33,6 +34,7 @@ if(!mysql_num_rows($result)) +