Authored by hf

fixes bug to product detail page recom reference

... ... @@ -5,8 +5,8 @@
<a class="swiper-slide" href="{{url}}">
<img class="swiper-lazy img-box" data-src="{{thumb}}">
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}<span class="old-price">¥{{.}}</span>{{/price}}
<span class="sale-price {{^price}}no-price{{/price}}">&yen;{{salePrice}}</span>
{{#price}}<span class="old-price">&yen;{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</a>
... ...
... ... @@ -49,6 +49,7 @@ class IndexController extends AbstractAction
// 渲染模板
$this->_view->display('index', $data);
}
/*
* 异步获取购物车数据
*/
... ... @@ -80,7 +81,7 @@ class IndexController extends AbstractAction
if ($this->isAjax()) {
$productId = $this->post('id', 0);
$uid = $this->getUid(true);
$shoppingKey = $this->getSession('shoppingKey');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = CartModel::selectGoods($uid, $productId, $shoppingKey);
}
... ... @@ -101,7 +102,7 @@ class IndexController extends AbstractAction
if ($this->isAjax()) {
$productId = $this->post('id', 0);
$uid = $this->getUid(true);
$shoppingKey = $this->getSession('shoppingKey');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = CartModel::removeFromCart($uid, $productId, $shoppingKey);
}
... ... @@ -196,7 +197,7 @@ class IndexController extends AbstractAction
public function giftinfoTplAction()
{
if ($this->isAjax()) {
echo file_get_contents($this->_view->getScriptPath() . '/../partials/cart/chose-panel.phtml');
$this->_view->display('gift-tpl');
}
}
... ... @@ -228,7 +229,7 @@ class IndexController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$shoppingKey = $this->getSession('shoppingKey');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$uid = $this->getUid(true);
$sku= $this->post('sku', 0);
... ... @@ -252,7 +253,7 @@ class IndexController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$shoppingKey = $this->getSession('shoppingKey');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$uid = $this->getUid(true);
$params = array();
... ...