public function renderPartial($view, $params = []) { return $this->getView()->render($view, $params, $this); }
public function actionGet_product_view() { if (Yii::$app->request->isAjax) { $id = $_POST['id']; $response['update_view'] = \yii\base\Controller::renderPartial('view', ['model' => $this->findModel($id)]); return json_encode($response); } }