バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > 新着商品の商品数を変更したい

フロント機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
inari
投稿日時: 2012/2/11 10:08
対応状況: −−−
常連
登録日: 2011/6/18
居住地:
投稿: 42
新着商品の商品数を変更したい
TOPページに表示する新着商品の件数を変更したいのですが、件数表示の内容がどこにもありません。

data以降の関係がありそうなファイルはほとんど確認したつもりです。

また、現在ブロックでTOPページに表示しています。

表示方法は自動的に表示される方法です。(商品登録時などのチェックはしていません)

現在の表示数は10件表示です。

箇条書きで申し訳ございません。
自分が構築したサイトではないので苦戦しています。
少ない情報ですがどなたかご教授下さい。

------------------------------------
EC-CUBEバージョン 2.3.4
PHPバージョン PHP 4.4.4
DBバージョン MySQL 5.0.51
aska824
投稿日時: 2012/2/11 12:20
対応状況: −−−
長老
登録日: 2010/2/20
居住地: 静岡県
投稿: 185
Re: 新着商品の商品数を変更したい
新着商品の件数変更とは、
ご自分で作成されたブロックでしょうか?
それとも、おすすめ商品のブロックの件数を変更したいのでしょうか?


----------------
-----------情報-----------
自分の分かる範囲でお答えします。

Shop Mate

inari
投稿日時: 2012/2/11 14:07
対応状況: −−−
常連
登録日: 2011/6/18
居住地:
投稿: 42
Re: 新着商品の商品数を変更したい
このようなブロック内容です。

<div class="topitem-line-list">
<!--{section name=cnt loop=$arrProducts}-->

<!--{assign var=id value=$arrProducts[cnt].product_id}-->

<!--{*
ステータスによって表示内容を変更する
flg_1 … オススメ flg_2 … 限定品 flg_3 … 先行予約 flg_4 … お問合せ商品
flg_5 … セール flg_6 … 会員限定 flg_7 … プレゼント
*}-->
<!--{assign var=flg_cnt value=1}-->
<!--{section name=flg loop=$arrProducts[cnt].product_flag|string_format:"%014d"|count_characters}-->
<!--{assign var=flg_$flg_cnt value=$arrProducts[cnt].product_flag[flg]}-->
<!--{assign var=flg_cnt value=$flg_cnt+1}-->
<!--{/section}-->

<!-- BEGIN <!--{$arrProducts[cnt].name|escape}-->の情報 -->

<!--{if $arrProducts[cnt].main_list_image != ""}-->
<!--{assign var=image_path value="`$arrProducts[cnt].main_list_image`"}-->
<!--{else}-->
<!--{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}-->
<!--{/if}-->

<div class="topitem-box-wrap">

<div class="topitem-box-photo" onkeypress="itemClick" onclick="itemClick('<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}--><!--{$smarty.const.PAGE_EXTENSION}-->')" title="<!--{$arrProducts[cnt].name|escape}-->の詳細へ"><!--{if $arrProducts[cnt].stock_max == 0 && $arrProducts[cnt].stock_unlimited_max != 1}--><div class="soldout_overlay"></div><!--{/if}--><!--{if $arrProducts[cnt].news_icon == "on"}--><div class="new_overlay"></div><!--{/if}--><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}--><!--{$smarty.const.PAGE_EXTENSION}-->"><img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$image_path|sfRmDupSlash}-->" alt="<!--{$arrProducts[cnt].name|escape}-->" /></a></div>

<div class="topitem-box-data">
<h3>
<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}--><!--{$smarty.const.PAGE_EXTENSION}-->"><!--{$arrProducts[cnt].name|escape}--></a>
</h3>

<!--{* プレゼント時 *}-->
<!--{if $flg_7}-->
<div class="topitem-box-price members center">PRESENT</div>

<!--{* 会員限定で非ログイン時 *}-->
<!--{elseif $flg_6 && !$tpl_login}-->
<div class="topitem-box-price members center">MEMBER PRICE</div>

<!--{else}-->
<div class="topitem-box-price">PRICE:
<!--{if $arrProducts[cnt].price02_min == $arrProducts[cnt].price02_max}-->
<!--{$arrProducts[cnt].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
<!--{else}-->
<!--{$arrProducts[cnt].price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->〜<!--{$arrProducts[cnt].price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
<!--{/if}--><!--{$smarty.const.MONETARY_UNIT}-->
</div>
<!--{/if}-->

<div class="topitem-box-comment">
<!--{$arrProducts[cnt].main_list_comment|escape|nl2br}-->
</div>

<div class="item-box-btn">
<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}--><!--{$smarty.const.PAGE_EXTENSION}-->" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/btn-detail-on.jpg','detail<!--{$arrProducts[cnt].product_id}-->');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/btn-detail.jpg','detail<!--{$arrProducts[cnt].product_id}-->');"><img src="<!--{$TPL_DIR}-->img/common/btn-detail.jpg" alt="商品詳細へ" name="detail<!--{$arrProducts[cnt].product_id}-->" id="detail<!--{$arrProducts[cnt].product_id}-->" /></a>
</div>
</div>

<br class="clear" />
</div>
<!-- END <!--{$arrProducts[cnt].name|escape}-->の情報 -->


<!--{/section}-->
</div>



</div>
<!--{* ▲ END #block-newitem *}-->
fukap
投稿日時: 2012/2/11 20:50
対応状況: −−−
仙人
登録日: 2009/7/7
居住地: 滋賀県
投稿: 907
Re: 新着商品の商品数を変更したい
$arrProducts をループで回して新着商品を表示させているようですので、
$arrProducts に値を代入しているPHPファイルを確認してみると良いと思います。

data/class/pages/frontparts/bloc の中に、
LC_Page_FrontParts_Bloc_ProductFlag.php といった名前のファイルはありませんか。
inari
投稿日時: 2012/2/13 8:20
対応状況: −−−
常連
登録日: 2011/6/18
居住地:
投稿: 42
Re: 新着商品の商品数を変更したい
LC_Page_FrontParts_Bloc_NewItemのファイルならあるのですが
LC_Page_FrontParts_Bloc_ProductFlag.phpのファイルはありません。

LC_Page_FrontParts_Bloc_NewItemの中身が以下です。


// {{{ requires
require_once(CLASS_PATH . "pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php");

/**
* 新着情報 のページクラス.
*
* @package Page
* @author ARATANA INC.
* @version $Id:LC_Page_FrontParts_Bloc_NewItem.php 2008-05-26 18:26:27Z homan $
*/
class LC_Page_FrontParts_Bloc_NewItem extends LC_Page_FrontParts_Bloc {

// }}}
// {{{ functions

/**
* Page を初期化する.
*
* @return void
*/
function init() {
parent::init();
$bloc_file = 'newitem.tpl';
$this->setTplMainpage($bloc_file);
}

/**
* Page のプロセス.
*
* @return void
*/
function process() {
if (defined("MOBILE_SITE") && MOBILE_SITE) {
$objSubView = new SC_SiteView();
} else {
$objSubView = new SC_MobileView();
}

//新着情報取得
$this->arrNewItem = $this->lfGetNewItem();

$objSubView->assignobj($this);
$objSubView->display($this->tpl_mainpage);
}


/**
* モバイルページを初期化する.
*
* @return void
*/
function mobileInit() {
$this->tpl_mainpage = MOBILE_TEMPLATE_DIR . "frontparts/"
. BLOC_DIR . 'newitem.tpl';
}

/**
* Page のプロセス(モバイル).
*
* @return void
*/
function mobileProcess() {
$this->process();
}

/**
* デストラクタ.
*
* @return void
*/
function destroy() {
parent::destroy();
}

function lfGetNewItem(){
$objQuery = new SC_Query();

$col = "product_id, name, main_list_image ";
$from = "dtb_products";
$where = "del_flg = 0 AND status = 1 AND sale_start_date <= now() AND sale_end_date > now() ";
$order = "create_date DESC";
$limit = "3";
$objQuery->setorder($order);
$objQuery->setlimit($limit);
$arrProducts = $objQuery->select($col, $from, $where);

return $arrProducts;
}
}
?>

よろしくお願いします。
fukap
投稿日時: 2012/2/13 18:25
対応状況: −−−
仙人
登録日: 2009/7/7
居住地: 滋賀県
投稿: 907
Re: 新着商品の商品数を変更したい
コードを張っていただいた LC_Page_FrontParts_Bloc_NewItem を見る限り、
$this->arrProducts の定義がないので、目的のファイルではなさそうですね。
$this->arrProducts の記述があるファイルはありませんか?
inari
投稿日時: 2012/2/13 19:45
対応状況: −−−
常連
登録日: 2011/6/18
居住地:
投稿: 42
Re: 新着商品の商品数を変更したい
fukap様

data/class/pages/frontparts/blocのLC_Page_FrontParts_Bloc_○○.php関連に$this->arrProductの記述は先ほどのNewItemしかありませんでした。。。

DBの情報があればどこを参照しているかわかるのですが、DB情報がないもので・・・

よろしくお願い致します。
fukap
投稿日時: 2012/2/14 13:57
対応状況: −−−
仙人
登録日: 2009/7/7
居住地: 滋賀県
投稿: 907
Re: 新着商品の商品数を変更したい
今までの断片的な情報では私には何とも言えません。

sale_start_date や sale_end_date は dtb_products にデフォルトで存在しないので、
データベースもカスタマイズしているようですね。
ご提示いただいたPHPとテンプレートの内容も噛み合っていないです。

ちょっと個別性の強いご相談ですので、どなたかEC-CUBEに詳しい方に見ていただいたほうが良いと思います。
inari
投稿日時: 2012/2/14 18:24
対応状況: −−−
常連
登録日: 2011/6/18
居住地:
投稿: 42
Re: 新着商品の商品数を変更したい
fukap様ご回答ありがとうございます。

自分で何とかやってみます。

今後ともよろしくお願い致します。
inari
投稿日時: 2012/2/15 14:24
対応状況: 解決済
常連
登録日: 2011/6/18
居住地:
投稿: 42
Re: 新着商品の商品数を変更したい
無事解決致しました。

LC_Page_Index.phpに記載してありました。

ありがとうございました。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


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

統計情報

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

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1638
8
red
1570
9
mcontact
1286
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.