Authored by Rock Zhang

修复限购商品结算进入选择地址页之后再回到结算页左上角的返回链接地址错误的bug

@@ -331,9 +331,10 @@ class CartModel @@ -331,9 +331,10 @@ class CartModel
331 $result = array(); 331 $result = array();
332 332
333 $skuList = ''; 333 $skuList = '';
334 - $isLimitGoods = !empty($sku) && !empty($skn) && !empty($buyNumber);  
335 - if ($isLimitGoods) { // 存在sku,skn和buyNumber时为限购商品  
336 - $skuList = json_encode(array( 334 + $hasSkuListCookie = isset($orderInfo['skuList']);
  335 + $isLimitGoods = $hasSkuListCookie || (!empty($sku) && !empty($skn) && !empty($buyNumber));
  336 + if ($isLimitGoods) { // 存在sku,skn和buyNumber或者cookie中有skuList时为限购商品
  337 + $skuList = $hasSkuListCookie ? $orderInfo['skuList'] : json_encode(array(
337 array( 338 array(
338 'type' => 'limitcode', 339 'type' => 'limitcode',
339 'limitproductcode' => $limitProductCode, 340 'limitproductcode' => $limitProductCode,
@@ -342,6 +343,7 @@ class CartModel @@ -342,6 +343,7 @@ class CartModel
342 'buy_number' => $buyNumber 343 'buy_number' => $buyNumber
343 ) 344 )
344 )); 345 ));
  346 +
345 $result['isLimit'] = true; 347 $result['isLimit'] = true;
346 } 348 }
347 349
@@ -321,7 +321,7 @@ class IndexController extends AbstractAction @@ -321,7 +321,7 @@ class IndexController extends AbstractAction
321 321
322 // 限购商品时更换返回按钮地址 322 // 限购商品时更换返回按钮地址
323 if (isset($order['isLimit'])) { 323 if (isset($order['isLimit'])) {
324 - $returnUrl = $this->server('HTTP_REFERER', $returnUrl); 324 + $returnUrl = Helpers::url('/product/show_' . $skn . '.html');;
325 } 325 }
326 326
327 $data = array( 327 $data = array(