diff --git a/install/shop.sql b/install/shop.sql index f0eeaf103..004dd05fe 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -74,6 +74,7 @@ CREATE TABLE IF NOT EXISTS `shop_cart` ( `ct_ip` varchar(25) NOT NULL DEFAULT '', `ct_send_cost` varchar(255) NOT NULL, `ct_direct` tinyint(4) NOT NULL, + `ct_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ct_id`), KEY `uq_id` (`uq_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 009804a76..116714e5c 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -683,14 +683,17 @@ function print_item_options($it_id, $uq_id) { global $g4; - $sql = " select ct_option from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$uq_id' order by io_type asc, ct_num asc, ct_id asc "; + $sql = " select ct_option, ct_qty + from {$g4['shop_cart_table']} + where it_id = '$it_id' and uq_id = '$uq_id' + order by io_type asc, ct_num asc, ct_id asc "; $result = sql_query($sql); $str = ''; for($i=0; $row=sql_fetch_array($result); $i++) { if($i == 0) $str .= '