バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > 商品詳細ページに「カゴに入れる」部分をもう一つ付けましたが規格2が表示されません

フロント機能

新規スレッドを追加する

スレッド表示 | 古いものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
karin
投稿日時: 2015/10/19 14:43
対応状況: −−−
仙人
登録日: 2008/9/15
居住地: 東京都
投稿: 689
Re: 商品詳細ページに「カゴに入れる」部分をもう一つ付けましたが規格2が表示されません
ページ表示時に呼び出されるJavaScriptが設定されていない為かと思われます。
商品詳細ページの<head>内で宣言/呼び出しが行われている下記の部分です。

例:

<script type="text/javascript">//<![CDATA[
    eccube.classCategories = {"__unselected":{"__unselected":{"name":"\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","product_class_id":"23","product_type":"1"}},"6":{"#":{"classcategory_id2":"","name":"\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044"},"#3":{"classcategory_id2":"3","name":"\u62b9\u8336","stock_find":true,"price01":"1,080","price02":"1,008","point":"93","product_code":"ice-01","product_class_id":"23","product_type":"1"}},"5":{"#":{"classcategory_id2":"","name":"\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044"},"#2":{"classcategory_id2":"2","name":"\u30c1\u30e7\u30b3","stock_find":true,"price01":"1,080","price02":"1,008","point":"93","product_code":"ice-01","product_class_id":"27","product_type":"1"}}};function lnOnLoad()
        {fnSetClassCategories(document.form1, ""); }
    $(function(){
        lnOnLoad();
    });
//]]></script>


これは、LC_Page_Products_Detail.phpの148行目あたりで下記のように設定しています。

$this->tpl_javascript .= 'eccube.classCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories[$product_id]) . ';';
$this->tpl_javascript .= 'function lnOnLoad()
{' . $this->js_lnOnload . '}';
$this->tpl_onload .= 'lnOnLoad();';



----------------

jun_0318
投稿日時: 2015/10/17 2:36
対応状況: −−−
新米
登録日: 2015/9/25
居住地:
投稿: 3
商品詳細ページに「カゴに入れる」部分をもう一つ付けましたが規格2が表示されません
こんばんは。

取り合えず、ただいまやろうとしていることを説明させて頂きます。

「スクロールしても付いてくるCARTボタンを追加し、そのボタンをクリックすると規格・数量・カートに入れるボタンが合うまれているポップアップが出るようにカスタマイズする」

なのですが、規格2部分の表示が出来ませんね。





要約すると、商品詳細ページに「規格」、「規格2」「数量」、「カートに入れるボタン」をもう一つ付けたいのですが、なぜか「規格2」の方がまったく表示されません。


現状では空白のセレクトボタンだけ出ている感じです。



ちなみにEC-CUBEは2.13.2を使わせて頂いてます。




現在のポップアップウィンドウは商品詳細ページからそのままコピーして来たもので、下のような感じでTPLファイルになっています。


-------------------------------------------------------
<script type="text/javascript">//<![CDATA[
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var $form = $(form);
var product_id = $form.find('input[name=product_id]').val();
var $sele1 = $form.find('select[name=classcategory_id1]');
var $sele2 = $form.find('select[name=classcategory_id2]');
eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
}
//]]></script>

<div class="cart_area clearfix">
<input type="hidden" name="mode" value="cart" />
<input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" />
<input type="hidden" name="product_class_id" value="<!--{$tpl_product_class_id}-->" id="product_class_id" />
<input type="hidden" name="favorite_product_id" value="" />

<!--{if $tpl_stock_find}-->

<!--★規格★-->

<!--{if $tpl_classcat_find1}-->
<!--▼規格1-->
<table class="classlist">
<tr>
<td style="width:100px;">
<b><!--{$tpl_class_name1|h}--></b>
</td>
<td style="width:20px;">
<b>:</b>
</td>
<td>
<select name="classcategory_id1" style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->">
<!--{html_options options=$arrClassCat1 selected=$arrForm.classcategory_id1.value}-->
</select>
<!--{if $arrErr.classcategory_id1 != ""}-->
<br /><span class="attention">※ <!--{$tpl_class_name1}-->を入力して下さい。</span>
<!--{/if}-->
</td>
</tr>
</table>

<div style="height: 1px; background: #ECECEC;"></div>

<!--▼規格1-->

<!--{if $tpl_classcat_find2}-->
<!--▼規格2-->
<table class="classlist">
<tr>
<td style="width:100px;">
<b><!--{$tpl_class_name2|h}--></b>
</td>
<td style="width:20px;">
<b>:</b>
</td>
<td>
<select name="classcategory_id2" style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->">
</select>
<!--{if $arrErr.classcategory_id2 != ""}-->
<br /><span class="attention">※ <!--{$tpl_class_name2}-->を入力して下さい。</span>
<!--{/if}-->
</td>
</tr>
</table>

<div style="height: 1px; background: #ECECEC;"></div>

<!--▲規格2-->
<!--{/if}-->
<!--{/if}-->

<!--★数量★-->
<table class="quantity">
<tr>
<td style="width:100px;">
<b>数量</b>
</td>
<td style="width:20px;">
<b>:</b>
</td>
<td>
<input type="text" class="box60" name="quantity" value="<!--{$arrForm.quantity.value|default:1|h}-->" maxlength="<!--{$smarty.const.INT_LEN}-->" style="width: 30px; <!--{$arrErr.quantity|sfGetErrorColor}-->"/>
<!--{if $arrErr.quantity != ""}-->
<br /><span class="attention"><!--{$arrErr.quantity}--></span>
<!--{/if}-->
</td>
</tr>
</table>

<div style="height: 1px; background: #ECECEC;"></div>
<div style="height: 23px; background: #ffffff;"></div>

<div class="cartin" style="margin: 10px 0 10px 0; width:220px; float:left;">
<div class="cartin_btn" style="margin: 0px 0px 0px 0px; width:200px; float:left;">
<div id="cartbtn_default">




<!--★カゴに入れる★-->
<a href="java script:void(document.form1.submit())">
<img src="/images/layout/cartin.gif" />
</a>


</div>
</div>
</div>
<div class="attention" id="cartbtn_dynamic"></div>
<!--{else}-->
<div class="attention">申し訳ございませんが、只今品切れ中です。</div>
<!--{/if}-->
</div>

-------------------------------------------------------

申し訳ありませんが、どの部分が間違っていて規格2を読み込めないのか教えて頂けると幸いです。
スレッド表示 | 古いものから 前のトピック | 次のトピック | トップ


 



ログイン


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

統計情報

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

投稿数ランキング

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