Authored by 梁志锋

购物车逻辑

... ... @@ -310,7 +310,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) {
productSku = $curSizeBlock.data('skuid');
promotionId = $('[data-id="' + productSku + '"]').closest('.advance-block').data('promotion-id');
promotionId = $('#promotionId').val();
if (confirming) {
return false;
}
... ...
... ... @@ -67,4 +67,5 @@
</div>
</div>
</div>
{{/cartInfo}}
\ No newline at end of file
{{/cartInfo}}
<input id="promotionId" type="hidden" value="{{promotionId}}">
\ No newline at end of file
... ...
... ... @@ -256,7 +256,6 @@ class CartModel
$product = CartData::giftProductData($skn, $promotionId);
if (isset($product['code']) && $product['code'] === 200) {
$result['code'] = 200;
$result['data'] = self::procGoodsDetail($product['data']);
}
... ...
... ... @@ -216,6 +216,7 @@ class IndexController extends AbstractAction
}
$this->_view->display('gift-info', array(
'promotionId' => $promotionId,
'cartInfo' => $result['data']
));
}
... ...