$query->andWhere(['product.category_id' => $category]); $popup = PopupBanner::find()->andFilterWhere(['vi_tri'=>PopupBanner::MENU,'menu'=>intval($params['cid'])])->andWhere("(website = :t or website = :t1) and (file <> 'no-images.jpg' or file is not null)",[ ':t' => PopupBanner::TAT_CA,':t1'=>PopupBanner::EMIX ])->one(); } if ($params != []){ if (array_key_exists('cid',$params)){ $Category = Category::find()->andFilterWhere(['id'=>$params['cid']])->one(); $description = $Category->description_emix; $keywords = $Category->keywords_emix; Yii::$app->view->title = $Category->title_emix == null ? '' : $Category->title_emix; }else{ $mo_ta = MoTa::find()->andFilterWhere(['ghi_chu'=>'danh_sach_san_pham'])->andFilterWhere(['or',['website'=>MoTa::TAT_CA],['website'=>MoTa::EMIX]])->one(); if (!is_null($mo_ta)){ $description = $mo_ta->description; $keywords = $mo_ta->keywords; Yii::$app->view->title = $mo_ta->title; }else{
])->one(); } if ($params != []){ if (array_key_exists('cid',$params)){ $Category = Category::find()->andFilterWhere(['id'=>$params['cid']])->one(); $description = $Category->description_emix; $keywords = $Category->keywords_emix; Yii::$app->view->title = $Category->title_emix == null ? '' : $Category->title_emix; }else{ $mo_ta = MoTa::find()->andFilterWhere(['ghi_chu'=>'danh_sach_san_pham'])->andFilterWhere(['or',['website'=>MoTa::TAT_CA],['website'=>MoTa::EMIX]])->one(); if (!is_null($mo_ta)){ $description = $mo_ta->description;
} /** * 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 = [ 'cname' => 'phu-kien', 'cid' => '16', ];