...
|
...
|
@@ -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();
|
...
|
...
|
|