バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > おすすめ商品ブロックに 寄与ポイントを表示させたいのですが

フロント機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
sais
投稿日時: 2013/11/21 4:25
対応状況: 確認中
新米
登録日: 2013/11/21
居住地:
投稿: 7
おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
EC-CUBE初心者ですスマーティーの事もまだ少ししか解りません  宜しくお願いいたします

タイトルの通りなんですが

詳細ページのtplの中から下記の部分をコピーして おすすめ商品ブロックの「foreach 」の内側に張り付けてみたけど
設定ポイントの数値は反映されずすべて「0ポイント」になってしまいました。

 
              <!--★ポイント★-->
                <!--{if $smarty.const.USE_POINT !== false}-->
                    <div class="point">ポイント:
                        <span id="point_default"><!--{strip}-->
                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
                                <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                            <!--{else}-->
                                <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{else}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->〜<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{/if}-->
                            <!--{/if}-->
                        <!--{/strip}--></span><span id="point_dynamic"></span>
                        Pt
                    </div>
               <!--{/if}-->



どうしたら実現できるのか自分なりに色々情報を探しているうちにここにたどり着きました。

どなたか 解り訳すご教授いただければありがたいです

なにとぞよろしくお願いいたします。
tsuji
投稿日時: 2013/11/21 9:17
対応状況: −−−
仙人
登録日: 2013/11/19
居住地:
投稿: 958
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
おすすめ商品のブロックのtpl側で$arrProductにデータはわたってきていますか?

EC-CUBEのバージョンやphp等のバージョンを記載すると解決に役立つかもしれません。
sais
投稿日時: 2013/11/21 12:26
対応状況: −−−
新米
登録日: 2013/11/21
居住地:
投稿: 7
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
tsujiさん

ありがとうございます。

バージョンは 2-13-0です
おそらくデータは渡ってないようです
flealog
投稿日時: 2013/11/21 12:52
対応状況: −−−
仙人
登録日: 2008/6/10
居住地:
投稿: 485
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが

/data/class/SC_Product.php
152行目辺りに以下を追加

            ,point_rate


/data/Smarty/templates/default/frontparts/bloc/recommend.tpl
適当なところに

                <!--{if $smarty.const.USE_POINT !== false}-->
                    <div class="point">ポイント:
                        <span id="point_default"><!--{strip}-->
                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
                                <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                            <!--{else}-->
                                <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{else}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->〜<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{/if}-->
                            <!--{/if}-->
                        <!--{/strip}--></span><span id="point_dynamic"></span>
                        Pt
                    </div>
                <!--{/if}-->



でいかがですか?


----------------
EC-CUBE3っぽいテンプレート
GitHub で公開中
https://github.com/bluestylejp

お問い合わせ番号CSV登録&メール送信プラグイン
http://urx.red/qDT6

sais
投稿日時: 2013/11/21 13:04
対応状況: −−−
新米
登録日: 2013/11/21
居住地:
投稿: 7
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
flealogさん ありがとうございます。

はじめに試しましたが 設定内容は反映されず すべて「0pt」になってしまいます....^^;
flealog
投稿日時: 2013/11/21 15:43
対応状況: −−−
仙人
登録日: 2008/6/10
居住地:
投稿: 485
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
何かプラグインをインストールしていませんでしょうか?


----------------
EC-CUBE3っぽいテンプレート
GitHub で公開中
https://github.com/bluestylejp

お問い合わせ番号CSV登録&メール送信プラグイン
http://urx.red/qDT6

sumida
投稿日時: 2013/11/21 16:57
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
ざっくりソースを見ると、そのままでも、渡ってきているように見えます。
まず、point_rateだけを表示させてみてはどうでしょうか?
(まさか、ポイント付与率:0%で登録はしていないですよね。)
sais
投稿日時: 2013/11/21 20:12
対応状況: −−−
新米
登録日: 2013/11/21
居住地:
投稿: 7
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
flealog さん
ありがとうございます。

たった今プラグインを全部削除して試してみたんですけど
やはり 結果は同じでした。
sais
投稿日時: 2013/11/21 20:24
対応状況: −−−
新米
登録日: 2013/11/21
居住地:
投稿: 7
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
sumida さん 
ありがとうございます。


念のためブロック全体の ソースを
<!--{*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2013 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.
 *}-->

<!--{strip}-->
    <!--{if count($arrBestProducts) > 0}-->
        <div class="block_outer clearfix">
            <div id="recommend_area">
                <h2><img src="<!--{$TPL_URLPATH}-->img/title/tit_bloc_recommend.png" alt="*" class="title_icon" /></h2>
                <div class="block_body clearfix">
                    <!--{foreach from=$arrBestProducts item=arrProduct name="recommend_products"}-->
                        <div class="product_item clearfix">
                            <div class="productImage">
                                <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrProduct.product_id|u}-->">
                                    <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_list_image|sfNoImageMainList|h}-->" style="max-width: 80px;max-height: 80px;" alt="<!--{$arrProduct.name|h}-->" />
                                </a>
                            </div>
                            <div class="productContents">
                                <h3>
                                    <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrProduct.product_id|u}-->"><!--{$arrProduct.name|h}--></a>
                                </h3>
                                <p class="sale_price">
                                    <!--{$smarty.const.SALE_PRICE_TITLE}-->(税込): <span class="price"><!--{$arrProduct.price02_min_inctax|number_format}--> 円</span>
                                </p>
<!-- ポイント埋め込み -->
                <!--{if $smarty.const.USE_POINT !== false}-->
                    <div class="point">ポイント:
                        <span id="point_default"><!--{strip}-->
                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
                                <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                            <!--{else}-->
                                <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{else}-->
                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate|number_format}-->〜<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate|number_format}-->
                                <!--{/if}-->
                            <!--{/if}-->
                        <!--{/strip}--></span><span id="point_dynamic"></span>
                        Pt
                    </div>
                <!--{/if}-->
                                <p class="mini comment"><!--{$arrProduct.comment|h|nl2br}--></p>
                            </div>
                        </div>
                        <!--{if $smarty.foreach.recommend_products.iteration % 2 === 0}-->
                            <div class="clear"></div>
                        <!--{/if}-->
                    <!--{/foreach}-->
                </div>
            </div>
        </div>
    <!--{/if}-->
<!--{/strip}-->


ポイントは 設定してあります 
詳細画面では 反映されています。
flealog
投稿日時: 2013/11/21 20:34
対応状況: −−−
仙人
登録日: 2008/6/10
居住地:
投稿: 485
Re: おすすめ商品ブロックに 寄与ポイントを表示させたいのですが
プラグインのキャッシュもありますので、パラメーター設定で SMARTY_FORCE_COMPILE_MODE も true に変更してみてください。


----------------
EC-CUBE3っぽいテンプレート
GitHub で公開中
https://github.com/bluestylejp

お問い合わせ番号CSV登録&メール送信プラグイン
http://urx.red/qDT6

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


 



ログイン


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

統計情報

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

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1568
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
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.