Authored by uedxwg

Merge branch 'feature/new_customer' of http://git.dev.yoho.cn/web/yohobuy into feature/new_customer

# Conflicts:
#	yohobuy/m.yohobuy.com/application/models/Index/Cart.php
... ... @@ -370,9 +370,9 @@ class CartModel
// cookie保存的数据
if (!empty($orderInfo)) {
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentType'], $orderInfo['paymentTypeId'] $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
}
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentType'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
}
// 根据地址id查询地址信息
if (isset($orderInfo['address'])) {
$address = $orderInfo['address'];
... ... @@ -394,10 +394,9 @@ class CartModel
// 配送方式
if (isset($payReturn['delivery_way'])) {
$idArr = array();
$defaultKey = 0;
$oneDeliv = array();
$isDeliveryId = true;
$deliveries = $payReturn['delivery_way'];
if (isset($orderCompute['delivery_way']) && !empty($orderCompute['delivery_way'])) {
$deliveries = $orderCompute['delivery_way'];
... ... @@ -414,15 +413,15 @@ class CartModel
$oneDeliv['cost'] = $val['delivery_way_cost'];
($val['default'] === 'Y') && $defaultKey = $key;
$idArr[$key] = $oneDeliv['id'];
if (isset($orderInfo['deliveryId']) && $orderInfo['deliveryId'] === $oneDeliv['id']) {
$oneDeliv['isSelected'] = true;
$isDeliveryId = false;
}
$result['dispatchMode'][$key] = $oneDeliv;
}
if (isset($orderInfo['deliveryId']) && isset($idArr[$orderInfo['deliveryId']])) {
$flag = array_search($orderInfo['deliveryId'], $idArr);
$flag !== false && $result['dispatchMode'][$flag]['isSelected'] = true;
} else {
if ($isDeliveryId) {
$result['dispatchMode'][$defaultKey]['isSelected'] = true;
}
}
... ...
... ... @@ -296,7 +296,6 @@ class IndexController extends AbstractAction
$orderInfo = array();
if (!empty($cookieData)) {
$orderInfo = json_decode($cookieData, true);
// print_r($orderInfo);exit();
$cartType = $orderInfo['cartType'];
}
... ... @@ -330,7 +329,6 @@ class IndexController extends AbstractAction
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => $order
);
print_r($data);
$this->setTitle('确认订单');
$this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮
$this->_view->display('order-ensure', $data);
... ...