/** * Page のプロセス. * * @return void */ public function process() { parent::process(); $objView = new SiteView(); $objSess = new Session(); Utils::sfIsSuccess($objSess); if (isset($_SESSION['preview']) && $_SESSION['preview'] === 'ON') { // プレビュー用のレイアウトデザインを取得 /* @var $objLayout PageLayoutHelper */ $objLayout = Application::alias('eccube.helper.page_layout'); $objLayout->sfGetPageLayout($this, true); // 画面の表示 $objView->assignobj($this); $objView->display(SITE_FRAME); return; } Utils::sfDispSiteError(PAGE_ERROR); }
/** * Page のプロセス. * * @return void */ public function process() { $objView = new SiteView(false); //新着情報を取得 $arrNews = $this->lfGetNews(); //キャッシュしない(念のため) header('pragma: no-cache'); //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため) header('Content-type: application/xml'); //新着情報をセット $this->arrNews = $arrNews; //店名をセット $this->site_title = $arrNews[0]['shop_name']; //代表Emailアドレスをセット $this->email = $arrNews[0]['email']; //セットしたデータをテンプレートファイルに出力 $objView->assignobj($this); //画面表示 $objView->display($this->tpl_mainpage, true); }
/** * Page のアクション. * * @return void */ public function action() { $objView = new SiteView(); //店舗情報をセット $this->arrSiteInfo = Application::alias('eccube.helper.db')->getBasisData(); //商品IDを取得 if (isset($_GET['product_id']) && $_GET['product_id'] != '' && is_numeric($_GET['product_id'])) { $product_id = $_GET['product_id']; } else { $product_id = ''; } // モードによって分岐 $mode = $this->getMode(); switch ($mode) { case 'all': $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); break; case 'list': if ($product_id != '' && is_numeric($product_id)) { $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); } else { $arrProducts = $this->lfGetProductsListData(); } break; default: if ($product_id != '' && is_numeric($product_id)) { $arrProducts = $this->lfGetProductsDetailData($mode, $product_id); } else { $arrProducts = $this->lfGetProductsAllData(); } break; } // 商品情報をセット $this->arrProducts = $arrProducts; // 従来互換 (for 2.11) $this->arrProduct =& $this->arrProducts; //セットしたデータをテンプレートファイルに出力 $objView->assignobj($this); //キャッシュしない(念のため) header('Pragma: no-cache'); //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため) header('Content-type: application/xml'); P_DETAIL_URLPATH; //画面表示 $objView->display($this->tpl_mainpage, true); }