Authored by Rock Zhang

修复各种购物车结算页面当商品为空时的处理逻辑

... ... @@ -275,14 +275,20 @@ class IndexController extends AbstractAction
$this->setNavHeader('确认订单', Helpers::url('/cart/index/index'), false); // 不显示右上角home按钮
// 购物车商品为空跳转到购物车页面
$cartType = $this->get('cartType', 'ordinary');
$cartKey = 'commonCart';
if ($cartType === 'advance') {
$cartKey = 'preSellCart';
}
$shoppingKey = Helpers::getShoppingKeyByCookie();
$uid = $this->getUid(true);
$cartGoods = CartModel::getCartData($uid, $shoppingKey);
if (empty($cartGoods) || isset($cartGoods['isEmptyCart'])) {
if (isset($cartGoods['isEmptyCart']) || empty($cartGoods[$cartKey])) {
$this->go(Helpers::url('/cart/index/index'));
}
$cartType = $this->get('cartType', 'ordinary');
$cookieData = $this->getCookie('order-info', null);
$uid = $this->getUid(true);
$data = array(
... ...