|
@@ -49,6 +49,7 @@ class IndexController extends AbstractAction |
|
@@ -49,6 +49,7 @@ class IndexController extends AbstractAction |
49
|
// 渲染模板
|
49
|
// 渲染模板
|
50
|
$this->_view->display('index', $data);
|
50
|
$this->_view->display('index', $data);
|
51
|
}
|
51
|
}
|
|
|
52
|
+
|
52
|
/*
|
53
|
/*
|
53
|
* 异步获取购物车数据
|
54
|
* 异步获取购物车数据
|
54
|
*/
|
55
|
*/
|
|
@@ -80,7 +81,7 @@ class IndexController extends AbstractAction |
|
@@ -80,7 +81,7 @@ class IndexController extends AbstractAction |
80
|
if ($this->isAjax()) {
|
81
|
if ($this->isAjax()) {
|
81
|
$productId = $this->post('id', 0);
|
82
|
$productId = $this->post('id', 0);
|
82
|
$uid = $this->getUid(true);
|
83
|
$uid = $this->getUid(true);
|
83
|
- $shoppingKey = $this->getSession('shoppingKey');
|
84
|
+ $shoppingKey = Helpers::getShoppingKeyByCookie();
|
84
|
$result = CartModel::selectGoods($uid, $productId, $shoppingKey);
|
85
|
$result = CartModel::selectGoods($uid, $productId, $shoppingKey);
|
85
|
}
|
86
|
}
|
86
|
|
87
|
|
|
@@ -101,7 +102,7 @@ class IndexController extends AbstractAction |
|
@@ -101,7 +102,7 @@ class IndexController extends AbstractAction |
101
|
if ($this->isAjax()) {
|
102
|
if ($this->isAjax()) {
|
102
|
$productId = $this->post('id', 0);
|
103
|
$productId = $this->post('id', 0);
|
103
|
$uid = $this->getUid(true);
|
104
|
$uid = $this->getUid(true);
|
104
|
- $shoppingKey = $this->getSession('shoppingKey');
|
105
|
+ $shoppingKey = Helpers::getShoppingKeyByCookie();
|
105
|
$result = CartModel::removeFromCart($uid, $productId, $shoppingKey);
|
106
|
$result = CartModel::removeFromCart($uid, $productId, $shoppingKey);
|
106
|
}
|
107
|
}
|
107
|
|
108
|
|
|
@@ -196,7 +197,7 @@ class IndexController extends AbstractAction |
|
@@ -196,7 +197,7 @@ class IndexController extends AbstractAction |
196
|
public function giftinfoTplAction()
|
197
|
public function giftinfoTplAction()
|
197
|
{
|
198
|
{
|
198
|
if ($this->isAjax()) {
|
199
|
if ($this->isAjax()) {
|
199
|
- echo file_get_contents($this->_view->getScriptPath() . '/../partials/cart/chose-panel.phtml');
|
200
|
+ $this->_view->display('gift-tpl');
|
200
|
}
|
201
|
}
|
201
|
}
|
202
|
}
|
202
|
|
203
|
|
|
@@ -228,7 +229,7 @@ class IndexController extends AbstractAction |
|
@@ -228,7 +229,7 @@ class IndexController extends AbstractAction |
228
|
$result = array();
|
229
|
$result = array();
|
229
|
|
230
|
|
230
|
if ($this->isAjax()) {
|
231
|
if ($this->isAjax()) {
|
231
|
- $shoppingKey = $this->getSession('shoppingKey');
|
232
|
+ $shoppingKey = Helpers::getShoppingKeyByCookie();
|
232
|
$uid = $this->getUid(true);
|
233
|
$uid = $this->getUid(true);
|
233
|
|
234
|
|
234
|
$sku= $this->post('sku', 0);
|
235
|
$sku= $this->post('sku', 0);
|
|
@@ -252,7 +253,7 @@ class IndexController extends AbstractAction |
|
@@ -252,7 +253,7 @@ class IndexController extends AbstractAction |
252
|
$result = array();
|
253
|
$result = array();
|
253
|
|
254
|
|
254
|
if ($this->isAjax()) {
|
255
|
if ($this->isAjax()) {
|
255
|
- $shoppingKey = $this->getSession('shoppingKey');
|
256
|
+ $shoppingKey = Helpers::getShoppingKeyByCookie();
|
256
|
$uid = $this->getUid(true);
|
257
|
$uid = $this->getUid(true);
|
257
|
|
258
|
|
258
|
$params = array();
|
259
|
$params = array();
|