バージョン選択

フォーラム

メニュー

オンライン状況

39 人のユーザが現在オンラインです。 (31 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 39
もっと...

サイト内検索

質問 > 管理機能 > 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をカスタマイズしてワケあり商品を作成
ファイル名に"-"を使えても、
ソース内では、"-"を使えないそうです。

解決致しました。

スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,953名です
総投稿数は110,019件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.