Merge remote-tracking branch 'origin/master'
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -302,12 +302,13 @@ class IndexController extends AbstractAction | @@ -302,12 +302,13 @@ class IndexController extends AbstractAction | ||
302 | // 返回地址 | 302 | // 返回地址 |
303 | $returnUrl = Helpers::url('/cart/index/index'); | 303 | $returnUrl = Helpers::url('/cart/index/index'); |
304 | 304 | ||
305 | - $cartType = $this->get('cartType', ''); | 305 | + $cartType = $this->get('cartType', 'ordinary'); |
306 | $cookieData = $this->getCookie('order-info', null); | 306 | $cookieData = $this->getCookie('order-info', null); |
307 | $orderInfo = array(); | 307 | $orderInfo = array(); |
308 | if (!empty($cookieData)) { | 308 | if (!empty($cookieData)) { |
309 | $orderInfo = json_decode($cookieData, true); | 309 | $orderInfo = json_decode($cookieData, true); |
310 | - $cartType = $orderInfo['cartType']; | 310 | + //如果为空,获取默认 |
311 | + $cartType = empty($orderInfo['cartType']) ? $cartType : $orderInfo['cartType']; | ||
311 | } | 312 | } |
312 | 313 | ||
313 | // 如果传递了code, sku,skn,buy_number就代表是限购商品 | 314 | // 如果传递了code, sku,skn,buy_number就代表是限购商品 |
-
Please register or login to post a comment