add changes sell product
This commit is contained in:
@@ -125,6 +125,24 @@ class ProductController extends Controller
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public function actionLookup($query = null)
|
||||
{
|
||||
$result = [];
|
||||
$product = Product::findProduct($query);
|
||||
$product = Product::modelToArray($product);
|
||||
|
||||
$result['product'] = $product;
|
||||
|
||||
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
|
||||
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds the Product model based on its primary key value.
|
||||
* If the model is not found, a 404 HTTP exception will be thrown.
|
||||
|
||||
Reference in New Issue
Block a user