Commit 43a97281 authored by liuyuzhen's avatar liuyuzhen

购物车不在服务区问题

parent 07404f86
......@@ -253,7 +253,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$storeIds = $cartListData['storeIds'];
$newResult = array();
foreach($storeIds as $key){
$newResult[] = $result[$key];
$tempReturnCart = $result[$key];
$tempStore = $storeDao->get($key,false);
$tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore);
$newResult[] = $tempReturnCart;
}
return array('totalCount'=>count($storeCartList),'list'=>$newResult);
}
......
......@@ -419,11 +419,12 @@ class CouponModel extends \DAO\AbstractModel {
$gcPrices = array();
$goodsCommonPrices = array();
foreach($goodsList as $goods){
$goodsNum = $goods['goodsNum'];
if($goods['type']== \Our\ApiConst::addGoodsToCart){
$goodsNum = $goods['goodsNum'];
if(strpos($giftGoodsIds,','.$goods['goodsCommonId'].',')!==false){
$giftGoodsAmount += $goods['goodsPrice'];
$goodsNum = $goods['goodsNum']-\Our\ApiConst::one;
$goodsNum = $goodsNum-\Our\ApiConst::one;
}
if($goodsNum>\Our\ApiConst::zero){
if(isset($gcPrices[$goods['gcId']])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment