Commit 78bf6b0c authored by liuyuzhengrace's avatar liuyuzhengrace

全国范围内配送

parent f263cd0b
...@@ -717,7 +717,7 @@ class CartServiceModel extends \Business\AbstractModel{ ...@@ -717,7 +717,7 @@ class CartServiceModel extends \Business\AbstractModel{
$deliverySetting['sellerDistribution'] = $store['seller_distribution']; $deliverySetting['sellerDistribution'] = $store['seller_distribution'];
if($deliverySetting['sellerDistribution']){ if($deliverySetting['sellerDistribution']){
$deliverySetting['leftAmount'] = \Our\ApiConst::zero; $deliverySetting['leftAmount'] = \Our\ApiConst::zero;
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::zero; $deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
//var_dump(json_encode($store)); //var_dump(json_encode($store));
if((isset($store['start_shipping_price'])&&$store['start_shipping_price']>\Our\ApiConst::zero)&&$storeCarts['storeTotalPrice']<$store['start_shipping_price']){ if((isset($store['start_shipping_price'])&&$store['start_shipping_price']>\Our\ApiConst::zero)&&$storeCarts['storeTotalPrice']<$store['start_shipping_price']){
//$deliverySetting['sellerDistribution'] = \Our\ApiConst::zero; //$deliverySetting['sellerDistribution'] = \Our\ApiConst::zero;
...@@ -729,7 +729,8 @@ class CartServiceModel extends \Business\AbstractModel{ ...@@ -729,7 +729,8 @@ class CartServiceModel extends \Business\AbstractModel{
} }
$deliverySetting['deliverTimeList'] =array(); $deliverySetting['deliverTimeList'] =array();
if($address){ if($address){
$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$address['lng'],'lat'=>$address['lat']),$storeId); //$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$address['lng'],'lat'=>$address['lat']),$storeId);
$result = true;
$storeDistance = \Our\CommonExtension::getDistance($address['lat'],$address['lng'],$store['store_latitude'],$store['store_longitude'],\Our\ApiConst::one); $storeDistance = \Our\CommonExtension::getDistance($address['lat'],$address['lng'],$store['store_latitude'],$store['store_longitude'],\Our\ApiConst::one);
if($result){ if($result){
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one; $deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
...@@ -741,14 +742,14 @@ class CartServiceModel extends \Business\AbstractModel{ ...@@ -741,14 +742,14 @@ class CartServiceModel extends \Business\AbstractModel{
$deliverySetting['other'] = $deliverTimeList['other']?$deliverTimeList['other']:\Our\ApiConst::zero; $deliverySetting['other'] = $deliverTimeList['other']?$deliverTimeList['other']:\Our\ApiConst::zero;
} }
} }
}else{ }/*else{
$sess=\Yaf\Session::getInstance(); $sess=\Yaf\Session::getInstance();
$currentAddress = $sess->get('currentAddress'); $currentAddress = $sess->get('currentAddress');
$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$currentAddress['lng'],'lat'=>$currentAddress['lat']),$storeId); $result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$currentAddress['lng'],'lat'=>$currentAddress['lat']),$storeId);
if($result){ if($result){
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one; $deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
} }
} }*/
}else{ }else{
$deliverySetting['sellerDistribution'] = \Our\ApiConst::zero; $deliverySetting['sellerDistribution'] = \Our\ApiConst::zero;
} }
......
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