diff --git a/extend/shop.extend.php b/extend/shop.extend.php index e1c63f599..7209fb577 100644 --- a/extend/shop.extend.php +++ b/extend/shop.extend.php @@ -79,7 +79,6 @@ if(!sql_query(" select io_id from {$g4['shop_item_option_table']} limit 1 ", fal ) ", false); sql_query(" ALTER TABLE `{$g4['shop_item_table']}` ADD `it_option_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_origin`, - ADD `it_option` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_option_subject`, ADD `it_supply_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_option` ", false); } @@ -117,6 +116,17 @@ if(!$result) { ADD `od_mobile` TINYINT(4) NOT NULL DEFAULT '0' AFTER `od_time` ", false); } +// ct_option 추가 +$sql = " select ct_option from {$g4['shop_cart_table']} limit 1 "; +$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 `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); +} + // it_brand 추가 /* $sql = " select it_brand from {$g4['shop_item_table']} limit 1 "; diff --git a/install/shop.sql b/install/shop.sql index ea1347898..fa17cb320 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -58,19 +58,17 @@ CREATE TABLE IF NOT EXISTS `shop_cart` ( `uq_id` bigint(20) unsigned NOT NULL, `it_id` varchar(20) NOT NULL DEFAULT '', `it_name` varchar(255) NOT NULL DEFAULT '', - `it_opt1` varchar(255) NOT NULL DEFAULT '', - `it_opt2` varchar(255) NOT NULL DEFAULT '', - `it_opt3` varchar(255) NOT NULL DEFAULT '', - `it_opt4` varchar(255) NOT NULL DEFAULT '', - `it_opt5` varchar(255) NOT NULL DEFAULT '', - `it_opt6` varchar(255) NOT NULL DEFAULT '', `ct_status` enum('쇼핑','주문','준비','배송','완료','취소','반품','품절') NOT NULL DEFAULT '쇼핑', `ct_history` text NOT NULL, `ct_price` int(11) NOT NULL DEFAULT '0', `ct_point` int(11) NOT NULL DEFAULT '0', `ct_point_use` tinyint(4) NOT NULL DEFAULT '0', `ct_stock_use` tinyint(4) NOT NULL DEFAULT '0', + `ct_option` varchar(255) NOT NULL DEFAULT '', `ct_qty` int(11) NOT NULL DEFAULT '0', + `io_id` varchar(255) NOT NULL DEFAULT '', + `io_type` tinyint(4) NOT NULL DEFAULT '0', + `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, @@ -367,7 +365,6 @@ CREATE TABLE IF NOT EXISTS `shop_item` ( `it_maker` varchar(255) NOT NULL DEFAULT '', `it_origin` varchar(255) NOT NULL DEFAULT '', `it_option_subject` varchar(255) NOT NULL DEFAULT '', - `it_option` varchar(255) NOT NULL DEFAULT '', `it_supply_subject` varchar(255) NOT NULL DEFAULT '', `it_type1` tinyint(4) NOT NULL DEFAULT '0', `it_type2` tinyint(4) NOT NULL DEFAULT '0', diff --git a/lib/shop.lib.php b/lib/shop.lib.php index ac4cbd1cf..e0924ee13 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -573,7 +573,12 @@ function get_item_options($it_id, $subject) else $price = '   '.number_format($row['io_price']).'원'; - $select .= ''.PHP_EOL; + if(!$row['io_stock_qty']) + $soldout = '  [품절]'; + else + $soldout = ''; + + $select .= ''.PHP_EOL; } $select .= ''.PHP_EOL; diff --git a/shop/item.php b/shop/item.php index fbf6c493d..cef50f4c7 100644 --- a/shop/item.php +++ b/shop/item.php @@ -238,14 +238,9 @@ else
-

-

- - -

- 상품 기본옵션 n 가지, 추가옵션 n 가지 -

- +

상품간략정보 및 구매기능

+
+
- @@ -296,7 +290,7 @@ else 원 - + @@ -333,7 +327,284 @@ else echo get_item_supply($it['it_id'], $it['it_supply_subject']); ?> - + + +
+ + + + + +
+ + + 수량 @@ -342,160 +613,12 @@ else - - + - + -
- -