change cart to plain post from ajax

This commit is contained in:
2016-01-04 22:02:59 +01:00
parent 2d9b527909
commit 1e206011d0
27 changed files with 622 additions and 349 deletions

View File

@@ -63,6 +63,7 @@ class AccountStateController extends Controller
$model = new AccountState();
$model->type = AccountState::TYPE_OPEN;
$model->id_user = Yii::$app->user->id;
$model->id_account = Account::readDefault();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
// return $this->redirect(['view', 'id' => $model->id_account_state]);
return $this->redirect(['index' ]);
@@ -89,6 +90,7 @@ class AccountStateController extends Controller
$model = new AccountState();
$model->type = AccountState::TYPE_CLOSE;
$model->id_user = Yii::$app->user->id;
$model->id_account = Account::readDefault();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index' ]);
// return $this->redirect(['view', 'id' => $model->id_account_state]);