Authored by Rock Zhang

修复商品总价错误的bug

@@ -769,12 +769,27 @@ class CartModel @@ -769,12 +769,27 @@ class CartModel
769 $result['advanceBuy'] = Helpers::formatAdvanceGoods($data['price_gift'], $result['advanceBuyCount']); 769 $result['advanceBuy'] = Helpers::formatAdvanceGoods($data['price_gift'], $result['advanceBuyCount']);
770 } 770 }
771 771
  772 + // 已参加的活动
  773 + if (!empty($data['promotion_info'])) {
  774 + $result['promotionInfo'] = array();
  775 + $info = array();
  776 + foreach ($data['promotion_info'] as $val) {
  777 + $info = array();
  778 + $info['id'] = $val['promotion_id'];
  779 + $info['name'] = $val['promotion_title'];
  780 +
  781 + $result['promotionInfo'][] = $info;
  782 + }
  783 +
  784 + $result['promotionFormula'] = $data['shopping_cart_data']['promotion_formula'];
  785 + }
  786 +
772 // 结算数据 787 // 结算数据
773 $result['price'] = Helpers::transPrice($data['shopping_cart_data']['order_amount']); 788 $result['price'] = Helpers::transPrice($data['shopping_cart_data']['order_amount']);
774 $result['activityPrice'] = Helpers::transPrice($data['shopping_cart_data']['discount_amount']); 789 $result['activityPrice'] = Helpers::transPrice($data['shopping_cart_data']['discount_amount']);
775 $result['count'] = $data['shopping_cart_data']['selected_goods_count']; 790 $result['count'] = $data['shopping_cart_data']['selected_goods_count'];
776 $result['isAllSelected'] = ($data['shopping_cart_data']['goods_count'] === $data['shopping_cart_data']['selected_goods_count']) && ($data['shopping_cart_data']['selected_goods_count'] >0); 791 $result['isAllSelected'] = ($data['shopping_cart_data']['goods_count'] === $data['shopping_cart_data']['selected_goods_count']) && ($data['shopping_cart_data']['selected_goods_count'] >0);
777 - $result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['order_amount']); 792 + $result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['last_order_amount']);
778 }while(0); 793 }while(0);
779 794
780 return $result; 795 return $result;