|
@@ -283,22 +283,17 @@ class IndexController extends AbstractAction |
|
@@ -283,22 +283,17 @@ class IndexController extends AbstractAction |
283
|
$orderInfo = json_decode($cookieData, true);
|
283
|
$orderInfo = json_decode($cookieData, true);
|
284
|
$cartType = $orderInfo['cartType'];
|
284
|
$cartType = $orderInfo['cartType'];
|
285
|
}
|
285
|
}
|
286
|
- $cartKey = 'commonCart';
|
|
|
287
|
- if ($cartType === 'advance') {
|
|
|
288
|
- $cartKey = 'preSellCart';
|
|
|
289
|
- }
|
|
|
290
|
|
286
|
|
291
|
- $shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
292
|
$uid = $this->getUid(true);
|
287
|
$uid = $this->getUid(true);
|
293
|
- $cartGoods = CartModel::getCartData($uid, $shoppingKey);
|
|
|
294
|
- if (isset($cartGoods['isEmptyCart']) || empty($cartGoods[$cartKey])) {
|
|
|
295
|
- $this->go(Helpers::url('/cart/index/index'));
|
288
|
+ $order = CartModel::cartPay($uid, $cartType, $orderInfo);
|
|
|
289
|
+ if (isset($order['cartUrl'])) {
|
|
|
290
|
+ $this->go($order['cartUrl']);
|
296
|
}
|
291
|
}
|
297
|
|
292
|
|
298
|
$data = array(
|
293
|
$data = array(
|
299
|
'orderEnsurePage' => true,
|
294
|
'orderEnsurePage' => true,
|
300
|
'isOrdinaryCart' => ($cartType !== 'advance'),
|
295
|
'isOrdinaryCart' => ($cartType !== 'advance'),
|
301
|
- 'orderEnsure' => CartModel::cartPay($uid, $cartType, $orderInfo)
|
296
|
+ 'orderEnsure' => $order
|
302
|
);
|
297
|
);
|
303
|
|
298
|
|
304
|
$this->_view->display('order-ensure', $data);
|
299
|
$this->_view->display('order-ensure', $data);
|