...
|
...
|
@@ -9,20 +9,21 @@ use Plugin\Helpers; |
|
|
*/
|
|
|
class ShoppingCartController extends AbstractAction
|
|
|
{
|
|
|
|
|
|
protected $_uid;
|
|
|
|
|
|
/**
|
|
|
* 初始化
|
|
|
* 通过当前用户审判是否跳到登录
|
|
|
*
|
|
|
* @param int $useSession (true:从服务端session中检查, false:从客户端cookie中检查)
|
|
|
* @return void
|
|
|
*/
|
|
|
public function init()
|
|
|
protected function auditJumpLogin($useSession = true)
|
|
|
{
|
|
|
// 检查用户是否登录, 未登录则跳转到登录页
|
|
|
$this->_uid = $this->getUid();
|
|
|
if (!$this->_uid) {
|
|
|
$this->go(Helpers::url('/signin.html'));
|
|
|
$uid = $this->getUid($useSession);
|
|
|
if (!$uid) {
|
|
|
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
|
|
|
}
|
|
|
|
|
|
parent::init();
|
|
|
}
|
|
|
|
|
|
/*
|
...
|
...
|
@@ -90,10 +91,10 @@ class ShoppingCartController extends AbstractAction |
|
|
if ($this->isAjax()) {
|
|
|
|
|
|
$params = array();
|
|
|
$params['old_product_sku']= $this->post('old_product_sku', 0);
|
|
|
$params['new_product_sku']= $this->post('new_product_sku', 0);
|
|
|
$params['buy_number']= $this->post('buy_number', 0);
|
|
|
$params['selected']= $this->post('selected', null);
|
|
|
$params['old_product_sku'] = $this->post('old_product_sku', 0);
|
|
|
$params['new_product_sku'] = $this->post('new_product_sku', 0);
|
|
|
$params['buy_number'] = $this->post('buy_number', 0);
|
|
|
$params['selected'] = $this->post('selected', null);
|
|
|
$result = CartModel::modifyCartProduct($this->_uid, $params);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -149,7 +150,8 @@ class ShoppingCartController extends AbstractAction |
|
|
'navBack' => true, 'navTitle' => '加价购'), 'shoppingCart' => $data));
|
|
|
}
|
|
|
|
|
|
public function orderEnsureAction() {
|
|
|
public function orderEnsureAction()
|
|
|
{
|
|
|
$data = array(
|
|
|
'orderEnsurePage' => true,
|
|
|
'orderEnsure' => array(
|
...
|
...
|
@@ -222,7 +224,7 @@ class ShoppingCartController extends AbstractAction |
|
|
*/
|
|
|
public function tplAction()
|
|
|
{
|
|
|
if($this->isAjax()) {
|
|
|
if ($this->isAjax()) {
|
|
|
$data = file_get_contents('../../../template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml');
|
|
|
|
|
|
echo($data);
|
...
|
...
|
@@ -246,4 +248,5 @@ class ShoppingCartController extends AbstractAction |
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|