diff --git a/backend/modules/shop/controllers/ExpressTemplateController.php b/backend/modules/shop/controllers/ExpressTemplateController.php index 2e56221..c704b50 100755 --- a/backend/modules/shop/controllers/ExpressTemplateController.php +++ b/backend/modules/shop/controllers/ExpressTemplateController.php @@ -253,9 +253,8 @@ class ExpressTemplateController extends Controller */ public function actionExpressAreaUpdate($id) { - $expressTemplateId = Yii::$app->request->get('expressTemplateId'); - $expressTemplateModel = ExpressTemplate::findOne($expressTemplateId); $model = ExpressArea::findOne($id); + $expressTemplateModel = ExpressTemplate::findOne($model->express_template); $model->basic_price /= 100; $model->extra_price /= 100; if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { @@ -319,10 +318,10 @@ class ExpressTemplateController extends Controller */ public function actionExpressAreaView($id) { - $expressTemplateId = Yii::$app->request->get('expressTemplateId'); - $expressTemplateModel = ExpressTemplate::findOne($expressTemplateId); + $expressAreaModel = ExpressArea::findOne($id); + $expressTemplateModel = ExpressTemplate::findOne($expressAreaModel->express_template); return $this->render('express_area_view', [ - 'model' => ExpressArea::findOne($id), + 'model' => $expressAreaModel, 'expressTemplateModel' => $expressTemplateModel ]); }