diff --git a/controllers/OrderController.php b/controllers/OrderController.php index 5c901f8..d64925c 100755 --- a/controllers/OrderController.php +++ b/controllers/OrderController.php @@ -113,7 +113,7 @@ public function actionCreate() { $model = new Order(); - + if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect( [ diff --git a/controllers/OrderProductController.php b/controllers/OrderProductController.php index 7dee4c5..10ded5f 100755 --- a/controllers/OrderProductController.php +++ b/controllers/OrderProductController.php @@ -5,6 +5,7 @@ use artbox\order\models\OrderProductSearch; use Yii; use artbox\order\models\OrderProduct; + use yii\helpers\Html; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; @@ -21,7 +22,7 @@ public function behaviors() { return [ - 'verbs' => [ + 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => [ 'POST' ], @@ -171,4 +172,32 @@ throw new NotFoundHttpException('The requested page does not exist.'); } } + + public function actionAdd(int $variant_id, int $count = 1) + { + + $result = '