Skip to content

Commit

Permalink
CartController::actionUpdateQuantity - fixed broken redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Dec 25, 2015
1 parent 69b9a1f commit 06670cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/controllers/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@

namespace hiqdev\yii2\cart\controllers;

use hiqdev\yii2\cart\ShoppingCart;
use Yii;
use yii\data\ArrayDataProvider;
use yii\web\NotFoundHttpException;

/**
* Cart controller.
* Cart controller
*
* @property ShoppingCart $cart The shopping cart instance
*/
class CartController extends \yii\web\Controller
{
/**
* @return ShoppingCart
*/
public function getCart()
{
return $this->module->getCart();
Expand Down Expand Up @@ -61,7 +67,7 @@ public function actionUpdateQuantity()
$position = $this->getCart()->getPositionById($id);
if ($position) {
$this->getCart()->update($position, $quantity);
$this->redirect('index');
return $this->redirect('index');
}
}

Expand Down

0 comments on commit 06670cf

Please sign in to comment.