Authored by 毕凯

shopping-cart -> cart

... ... @@ -3,18 +3,18 @@
{{# shoppingCart}}
{{#if gift}}
{{# gift}}
{{> shopping-cart/gift-advance-good}}
{{> cart/gift-advance-good}}
{{/ gift}}
{{^}}
{{# advance}}
<div class="advance-block">
<p class="title">{{title}}</p>
{{# goods}}
{{> shopping-cart/gift-advance-good}}
{{> cart/gift-advance-good}}
{{/ goods}}
</div>
{{/ advance}}
{{/if}}
{{/ shoppingCart}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
... ... @@ -27,7 +27,7 @@
{{# commonCart}}
<div class="cart-content common">
{{> shopping-cart/cart-content}}
{{> cart/cart-content}}
</div>
{{/ commonCart}}
... ... @@ -38,26 +38,12 @@
<span class="txt">预售商品全场包邮,到货后立即发货</span>
<span class="txt">预售商品不参加活动,不可使用优惠券</span>
</p>
{{> shopping-cart/cart-content}}
{{> cart/cart-content}}
</div>
{{/ preSellCart}}
{{/ shoppingCart}}
</div>
<div id="advanceBuy" class="shopping-cart-page yoho-page hide">
{{# shoppingCart}}
{{# commonCart}}
{{# advanceBuy}}
<span>
{{promotionTitle}}
</span>
{{# goods}}
{{> shopping-cart/gift-advance-good}}
{{/ goods}}
{{/ advanceBuy}}
{{/ commonCart}}
{{/ shoppingCart}}
</div>
<div class="shopping-cart-zero yoho-page hide">
<div class="cart-zero">
... ... @@ -68,5 +54,5 @@
{{> product/recommend-for-you}}
</div>
{{> shopping-cart/chose-panel}}
{{> layout/footer}}
\ No newline at end of file
{{> cart/chose-panel}}
{{> layout/footer}}
... ...
<div class="cart-goods">
{{# goods}}
{{> shopping-cart/good}}
{{> cart/good}}
{{/ goods}}
{{# $notValidGoods}}
{{> shopping-cart/good}}
{{> cart/good}}
{{/ $notValidGoods}}
</div>
... ...
... ... @@ -674,12 +674,12 @@ class CartModel
break;
}
if ($onlyAdvanceBuy) {
if ($onlyGift) {
// 赠品
$result['freebie'] = Helpers::formatAdvanceGoods($data['gift_list']);
break;
}
if ($onlyGift) {
if ($onlyAdvanceBuy) {
// 加价购
$result['advanceBuy'] = Helpers::formatAdvanceGoods($data['price_gift']);
break;
... ...
... ... @@ -165,6 +165,7 @@ class IndexController extends AbstractAction
$data += CartModel::getCartData($uid, $shoppingKey, $cartType, false, true);
// 渲染模板
var_dump($data);
$this->_view->display('gift-advance-good', $data);
}
... ... @@ -425,10 +426,10 @@ class IndexController extends AbstractAction
$this->echoJson($result);
}
}
/**
* 加入购物车
*
*
* @param string productSku 商品的SKU
* @param int buyNumber 购买数量
* @param int promotionId 促销ID, 加价购有关
... ... @@ -460,5 +461,5 @@ class IndexController extends AbstractAction
$this->echoJson($result);
}
}
... ...