質問 > フロント機能 > 2.11.4でのトップページのランキング表示について(キャッシュが残る、価格が0円表示になる) |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
maruuuuuun |
投稿日時: 2012/2/12 16:45
対応状況: −−−
|
半人前 登録日: 2012/2/12 居住地: 投稿: 22 |
2.11.4でのトップページのランキング表示について(キャッシュが残る、価格が0円表示になる) 皆さん、こんにちわ。
ご質問です。 ver2.11.4でのランキング表示がどうも上手く実装出来ません。 表示させる事自体は何とか実装出来たのですが、現在 ■既に削除した商品が残ってしまう。(非公開も同様) ■価格が0円表示になる の2点で詰まっています。 その他エラー等はまったく出ておらず、検索しても2.4系の情報で、試してみたものの思い通りになりません。 検索した感じでは「LC_Page_FrontParts_Bloc_Ranking.php」を変更すれば可能な気がするのですが…。 ちなみに現在はこうなっています。 ------------------------------------------------------- <?php /* * This file is part of EC-CUBE * * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. * * http://www.lockon.co.jp/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // {{{ requires require_once(CLASS_REALDIR . "pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php"); /** * ランキング のページクラス. */ class LC_Page_FrontParts_Bloc_Ranking extends LC_Page_FrontParts_Bloc { /** * Page を初期化する. * * @return void */ function init() { parent::init(); $bloc_file = 'ranking.tpl'; $this->setTplMainpage($bloc_file); } /** * Page のプロセス. * * @return void */ function process() { if (defined("MOBILE_SITE") && MOBILE_SITE) { $objView = new SC_MobileView(); } else { $objView = new SC_SiteView(); } $objSiteInfo = $objView->objSiteInfo; // 基本情報を渡す $objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); // ランキング表示 2009.05.08追加 $this->arrRanking = $this->lfGetRanking(); $objView->assignobj($this); $objView->display($this->tpl_mainpage); //おすすめ商品表示 //$this->arrBestProducts = $this->lfGetRanking(); //$objView->assignobj($this); //objView->display($this->tpl_mainpage); } /** * モバイルページを初期化する. * * @return void */ function mobileInit() { $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . "frontparts/" . BLOC_DIR . 'ranking.tpl'; } /** * Page のプロセス(モバイル). * * @return void */ function mobileProcess() { $this->process(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } // ランキング検索 function lfGetRanking(){ $objQuery = new SC_Query(); $col = "T1.product_id, T1.product_name as name, T3.main_list_image, COUNT(*) as order_count"; $from = "dtb_order_detail AS T1 INNER JOIN dtb_order AS T2 ON T1.order_id = T2.order_id INNER JOIN dtb_products AS T3 ON T1.product_id = T3.product_id"; $objQuery->setwhere("T3.status = 1"); $objQuery->setGroupBy("T1.product_id, T1.product_name, T3.main_list_image"); $objQuery->setOrder("order_count DESC"); $objQuery->setLimit(5); return $objQuery->select($col, $from); } } ?> ------------------------------------------------------- お手数を御掛け致しますが、どうかよろしくお願いいたします。 |
フラット表示 | 前のトピック | 次のトピック |