Commit 4eefbba0605cf92756d6368ff6063fe93d7f866a
Merge remote-tracking branch 'origin/master'
Showing
1 changed file
with
17 additions
and
1 deletions
Show diff stats
controllers/OrderController.php
| @@ -218,7 +218,23 @@ | @@ -218,7 +218,23 @@ | ||
| 218 | ); | 218 | ); |
| 219 | } | 219 | } |
| 220 | } | 220 | } |
| 221 | - | 221 | + |
| 222 | + | ||
| 223 | + | ||
| 224 | + | ||
| 225 | + public function actionPrint(){ | ||
| 226 | + $orderId = Yii::$app->request->get("order_id"); | ||
| 227 | + if(!empty($orderId)){ | ||
| 228 | + $order = $this->findModel($orderId); | ||
| 229 | + return $this->renderPartial('@frontend/views/cabinet/order_print',[ | ||
| 230 | + 'order' => $order | ||
| 231 | + ]); | ||
| 232 | + } else { | ||
| 233 | + throw new NotFoundHttpException('The requested page does not exist.'); | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + } | ||
| 237 | + | ||
| 222 | public function actionUpdate($id) | 238 | public function actionUpdate($id) |
| 223 | { | 239 | { |
| 224 | if (\Yii::$app->request->post('hasEditable')) { | 240 | if (\Yii::$app->request->post('hasEditable')) { |