質問 > 管理機能 > Best5をカスタマイズしてワケあり商品を作成 |
管理機能
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
mkhkck |
投稿日時: 2010/4/26 17:00
対応状況: 確認中
|
一人前 登録日: 2009/7/18 居住地: 投稿: 98 |
Best5をカスタマイズしてワケあり商品を作成 Best5をカスタマイズして"ワケあり商品"を作成しています。
ページ中央部参照(HTML): http://aokiflower.net/_sample/index.html しかし、HTMLで作ったようには表示できなく、 http://aokiflower.net/ のように、何も表示されません。 仕組みは、商品登録の商品ステータスの「限定品」(5つのチェックボックスの一番右)をチェックすると、 最新の3つが表示される、というものです。 カスタマイズした内容は、 ?data/class_extends/page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5_Ex.php の中身を書き換え ・LC_Page_FrontParts_Bloc_Best5.php → LC_Page_FrontParts_Bloc_Actual-goods.php(25行目) ・class LC_Page_FrontParts_Bloc_Best5_Ex extends LC_Page_FrontParts_Bloc_Best5 { → class LC_Page_FrontParts_Bloc_Actual-goods_Ex extends LC_Page_FrontParts_Bloc_Actual-goods {(36行目) ?data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5.php の中身を書き換え。 ・LC_Page_FrontParts_Bloc_Best5 → LC_Page_FrontParts_Bloc_Actual-goods(34行目) ・$bloc_file = 'best5.tpl'; → $bloc_file = 'actual-goods.tpl';(46行目) ・$this->arrBestProducts = $this->lfGetRanking(); → $this->arrActualGoods = $this->lfGetActual-goods();(68行目 ) ・. BLOC_DIR . 'best5.tpl'; → . BLOC_DIR . 'actual-goods.tpl';(81行目) ・ //おすすめ商品検索 function lfGetRanking(){ $objQuery = new SC_Query(); $col = "DISTINCT A.*, name, price02_min, price01_min, main_list_image "; $from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)"; $where = "status = 1"; $order = "rank"; $objQuery->setorder($order); $arrBestProducts = $objQuery->select($col, $from, $where); return $arrBestProducts; } → //おすすめ商品検索 function lfGetActual-goods(){ $objQuery = new SC_Query(); $col = "product_id, name, price02_min, price01_min, main_list_image "; $from = "vw_products_allclass_detail AS alldtl"; //$where = "product_flag = %%%%1"; $order = "update_date DESC"; $objQuery->setorder($order); $objQuery->setlimit(RECOMMEND_NUM); $arrActualGoods = $objQuery->select($col, $from, $where); return $arrActualGoods; } (102行目から115行目) ?actual-goods.tpl <!--▼ワケあり商品ここから--> <!--{if count($arrActualGoods) > 0}--> <div id="ichioshi"> <img src="<!--{$TPL_DIR}-->img/middle/ichioshi.gif" width="530" height="40" border="0"><br> <!--{section name=cnt loop=3}--> <div class="ichioshi-products"> <!--{if $arrActualGoods[cnt].main_list_image != ""}--> <!--{assign var=image_path value="`$arrActualGoods[cnt].main_list_image`"}--> <!--{else}--> <!--{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}--> <!--{/if}--> <a href="<!--{$smarty.const.URL_DIR}-->products/detail.php?product_id=<!--{$arrActualGoods[cnt].product_id}-->"> <img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$image_path|sfRmDupSlash}-->" alt="<!--{$arrActualGoods[cnt].name|escape}-->" /></a> <p> <a href="<!--{$smarty.const.URL_DIR}-->products/detail.php?product_id=<!--{$arrActualGoods[cnt].product_id}-->"><!--{$arrActualGoods[cnt].name|escape}--></a> </p> <!--{assign var=price01 value=`$arrActualGoods[cnt].price01_min`}--> <!--{assign var=price02 value=`$arrActualGoods[cnt].price02_min`}--> <p>価格<span class="mini">(税込)</span>:<span class="price"> <!--{if $price02 == ""}--> <!--{$price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}--> <!--{else}--> <!--{$price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}--> <!--{/if}-->円 </span> </p> </div><!--class="ichioshi-products"--> <!--{/section}--> </div><!--id="ichioshi"--> <!--{/if}--> <!--▲ワケあり商品ここまで--> です。 何かお気づきの点はございませんでしょうか? よろしくお願い致します。 |
mkhkck |
投稿日時: 2010/4/28 18:11
対応状況: 解決済
|
一人前 登録日: 2009/7/18 居住地: 投稿: 98 |
Re: Best5をカスタマイズしてワケあり商品を作成 ファイル名に"-"を使えても、
ソース内では、"-"を使えないそうです。 解決致しました。 |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |