public function actionCurrentprice() { $id = Yii::app()->request->getParam('id', 0); $companyId = Yii::app()->request->getParam('companyId'); $currentPrice = CreateOrder::getProductPrice($companyId, $id, 0); echo json_encode(array('cp' => $currentPrice)); }