...
|
...
|
@@ -45,10 +45,10 @@ class IndexController extends AbstractAction |
|
|
'shoppingCartPage' => true,
|
|
|
'shoppingCart' => CartModel::getCartData($uid, $shoppingKey)
|
|
|
);
|
|
|
|
|
|
// 渲染模板
|
|
|
$this->_view->display('index', $data);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* 异步获取购物车数据
|
|
|
*/
|
...
|
...
|
@@ -78,9 +78,9 @@ class IndexController extends AbstractAction |
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$productId = $this->post('skuList', 0);
|
|
|
$productId = $this->post('id', 0);
|
|
|
$uid = $this->getUid(true);
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$shoppingKey = $this->getSession('shoppingKey');
|
|
|
$result = CartModel::selectGoods($uid, $productId, $shoppingKey);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -101,7 +101,7 @@ class IndexController extends AbstractAction |
|
|
if ($this->isAjax()) {
|
|
|
$productId = $this->post('id', 0);
|
|
|
$uid = $this->getUid(true);
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$shoppingKey = $this->getSession('shoppingKey');
|
|
|
$result = CartModel::removeFromCart($uid, $productId, $shoppingKey);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -192,7 +192,6 @@ class IndexController extends AbstractAction |
|
|
|
|
|
/*
|
|
|
* 获取购物车加价购商品数据模板
|
|
|
* 需要返回模板的html代码,不能渲染
|
|
|
*/
|
|
|
public function giftinfoTplAction()
|
|
|
{
|
...
|
...
|
@@ -229,7 +228,7 @@ class IndexController extends AbstractAction |
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$shoppingKey = $this->getSession('shoppingKey');
|
|
|
$uid = $this->getUid(true);
|
|
|
|
|
|
$sku= $this->post('sku', 0);
|
...
|
...
|
@@ -253,7 +252,7 @@ class IndexController extends AbstractAction |
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$shoppingKey = $this->getSession('shoppingKey');
|
|
|
$uid = $this->getUid(true);
|
|
|
|
|
|
$params = array();
|
...
|
...
|
@@ -358,7 +357,7 @@ class IndexController extends AbstractAction |
|
|
}
|
|
|
|
|
|
if (empty($result)) {
|
|
|
echo '[]';
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->echoJson($result);
|
|
|
}
|
...
|
...
|
|