diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 3ad6d193e..c6592d15d 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -343,7 +343,7 @@ function get_cart_count($cart_id) $sql = " select count(ct_id) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' "; if($default['de_cart_keep_term']) { - $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - (($default['de_cart_keep_term'] - 1) * 86400)); $sql .= " and ct_time > '$ctime' "; } $row = sql_fetch($sql); diff --git a/mobile/shop/cart.php b/mobile/shop/cart.php index df16af0af..72ac45d90 100644 --- a/mobile/shop/cart.php +++ b/mobile/shop/cart.php @@ -41,7 +41,7 @@ include_once(G5_MSHOP_PATH.'/_head.php'); from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) where a.od_id = '$s_cart_id' "; if($default['de_cart_keep_term']) { - $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - (($default['de_cart_keep_term'] - 1) * 86400)); $sql .= " and a.ct_time > '$ctime' "; } $sql .= " group by a.it_id "; diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index 7f7df4a61..29d43ccd1 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -77,7 +77,7 @@ ob_start(); where a.od_id = '$s_cart_id' and a.ct_select = '1' "; if($default['de_cart_keep_term']) { - $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - (($default['de_cart_keep_term'] - 1) * 86400)); $sql .= " and a.ct_time > '$ctime' "; } $sql .= " group by a.it_id "; diff --git a/shop/cart.php b/shop/cart.php index 26cb091f3..9f81eda9f 100644 --- a/shop/cart.php +++ b/shop/cart.php @@ -62,7 +62,7 @@ include_once('./_head.php'); from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) where a.od_id = '$s_cart_id' "; if($default['de_cart_keep_term']) { - $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - (($default['de_cart_keep_term'] - 1) * 86400)); $sql .= " and a.ct_time > '$ctime' "; } $sql .= " group by a.it_id "; diff --git a/shop/orderform.php b/shop/orderform.php index cfcd2673b..2fa9c45d8 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -205,7 +205,7 @@ function get_intall_file() where a.od_id = '$s_cart_id' and a.ct_select = '1' "; if($default['de_cart_keep_term']) { - $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $ctime = date('Y-m-d H:i:s', G5_SERVER_TIME - (($default['de_cart_keep_term'] - 1) * 86400)); $sql .= " and a.ct_time > '$ctime' "; } $sql .= " group by a.it_id ";