Authored by Rock Zhang

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

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