stanley-king 8 лет назад
Родитель
Сommit
2c46b77de4
2 измененных файлов с 6 добавлено и 2 удалено
  1. 3 1
      helper/buy_first.php
  2. 3 1
      helper/model/goods_summary.php

+ 3 - 1
helper/buy_first.php

@@ -61,9 +61,10 @@ class buy_first
         $result['discount_gap'] = $discount_gap;
         $result['bonus_rates'] = $this->formate_rates($rates);
         $result['gap_show'] = $gap_show;
+
+        global $config;
         if($gap_show == true)
         {
-            global $config;
             if(intval($discount_gap * 100 + 0.5) == 0) {
                 $result['gap_desc'] = $config['bonus_gap']['no_gap'];
             } else {
@@ -72,6 +73,7 @@ class buy_first
         } else {
             $result['gap_desc'] = "";
         }
+        $result['earn_bonus'] = $config['bonus_gap']['earn_bonus'];
 
         $result['usable_pred'] = true;
         $result['pay_cash_pred'] = $result['goods_amount'] + $result['freight'] - $result['full_discount'] - $result['available_pred'];

+ 3 - 1
helper/model/goods_summary.php

@@ -148,9 +148,10 @@ class goods_summary
             $summary['act_id'] = $act_id;
             $summary['act_type'] = $act_type;
         }
+
+        global $config;
         if($act_id == false && empty($this->bundles))
         {
-            global $config;
             $summary['bonus_price']  = predeposit_helper::bonus_price($this->goods_info['goods_price'],$rates);
             $gap = predeposit_helper::discount_gap($summary['bonus_price'],$this->goods_info['goods_price']);
             $summary['discount_gap'] = $gap;
@@ -166,6 +167,7 @@ class goods_summary
             $summary['gap_show'] = false;
             $summary['gap_desc'] = "";
         }
+        $summary['earn_bonus'] = $config['bonus_gap']['earn_bonus'];
 
         return $summary;
     }