$product = Product::findOne($image->product_id); } if (!is_null($sku)){ $skus = Sku::find()->andWhere("img <> 'no-images.jpg' and img is not null")->andFilterWhere(['product_id'=>$sku->product_id])->all(); $image_product = ProductImage::find()->andFilterWhere(['product_id'=>$sku->product_id])->all(); $product = Product::findOne($sku->product_id); } return $this->renderAjax('show-anh', [ 'skus' => $skus, 'image_product' => $image_product, 'sku'=>$sku, 'image' => $image, 'product'=> $product ]); } public function actionAnhMoTa($id){
$skus = Sku::find()->andWhere("img <> 'no-images.jpg' and img is not null")->andFilterWhere(['product_id'=>$sku->product_id])->all(); $image_product = ProductImage::find()->andFilterWhere(['product_id'=>$sku->product_id])->all(); $product = Product::findOne($sku->product_id); } return $this->renderAjax('show-anh', [ 'skus' => $skus, 'image_product' => $image_product, 'sku'=>$sku, 'image' => $image, 'product'=> $product ]);
} /** * Returns all ancestor modules of this controller. * The first module in the array is the outermost one (i.e., the application instance), * while the last is the innermost one. * @return Module[] all ancestor modules that this controller is located within. */ public function getModules() { $modules = [$this->module]; $module = $this->module; while ($module->module !== null) {
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/web.php'); date_default_timezone_set("Asia/Ho_Chi_Minh"); ini_set('max_execution_time', 0); (new yii\web\Application($config))->run();
$_GET = [ 'id' => '12603', ];