浏览代码

Update add_to_cart.php

Obada Diab 9 年之前
父节点
当前提交
1aef4d5ffb
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      modules/simple-billing/add_to_cart.php

+ 6 - 2
modules/simple-billing/add_to_cart.php

@@ -78,9 +78,13 @@ function exec_ogp_module()
 	$tax_amount = $settings['tax_amount'];
 	$currency = $settings['currency'];
 	
-	if($max_players < 10 || $qty < 1){
-		$max_players = 12;
+	$qry_services = "SELECT * FROM OGP_DB_PREFIXbilling_services".$where_service_id;
+	$services = $db->resultQuery($qry_services);			
+	foreach ($services as $key => $row) {	
+	if($max_players < $row['slot_min_qty'] || $qty < 1){
+		$max_players = $row['slot_min_qty'];
 		$qty = 1;
+		}
 	}
 	
 	$price = $max_players*$price_slot*$qty;