source: branches/version-2_13-dev/data/Smarty/templates/sphone/products/detail.tpl @ 22856

Revision 22856, 24.1 KB checked in by Seasoft, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)

  • 主に空白・空白行の調整。もう少し整えたいが、一旦現状コミット。
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
1<!--{*
2 * This file is part of EC-CUBE
3 *
4 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
5 *
6 * http://www.lockon.co.jp/
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 *}-->
22
23<script src="<!--{$smarty.const.ROOT_URLPATH}-->js/products.js"></script>
24<script src="<!--{$TPL_URLPATH}-->js/jquery.facebox/facebox.js"></script>
25<script>//<![CDATA[
26    // 規格2に選択肢を割り当てる。
27    function fnSetClassCategories(form, classcat_id2_selected) {
28        var $form = $(form);
29        var product_id = $form.find('input[name=product_id]').val();
30        var $sele1 = $form.find('select[name=classcategory_id1]');
31        var $sele2 = $form.find('select[name=classcategory_id2]');
32        setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
33    }
34    $(function(){
35        $('#detailphotoblock ul li').flickSlide({target:'#detailphotoblock>ul', duration:5000, parentArea:'#detailphotoblock', height: 200});
36        $('#whobought_area ul li').flickSlide({target:'#whobought_area>ul', duration:5000, parentArea:'#whobought_area', height: 80});
37
38        //お勧め商品のリンクを張り直し(フリックスライドによるエレメント生成後)
39        $('#whobought_area li').biggerlink();
40        //商品画像の拡大
41        $('a.expansion').facebox({
42            loadingImage : '<!--{$TPL_URLPATH}-->js/jquery.facebox/loading.gif',
43            closeImage   : '<!--{$TPL_URLPATH}-->js/jquery.facebox/closelabel.png'
44        });
45    });
46    //サブエリアの表示/非表示
47    var speed = 500;
48    var stateSub = 0;
49    function fnSubToggle(areaEl, imgEl) {
50        areaEl.slideToggle(speed);
51        if (stateSub == 0) {
52            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_plus.png");
53            stateSub = 1;
54        } else {
55            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_minus.png");
56            stateSub = 0
57        }
58    }
59    //この商品に対するお客様の声エリアの表示/非表示
60    var stateReview = 0;
61    function fnReviewToggle(areaEl, imgEl) {
62        areaEl.slideToggle(speed);
63        if (stateReview == 0) {
64            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_plus.png");
65            stateReview = 1;
66        } else {
67            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_minus.png");
68            stateReview = 0
69        }
70    }
71    //お勧めエリアの表示/非表示
72    var statewhobought = 0;
73    function fnWhoboughtToggle(areaEl, imgEl) {
74        areaEl.slideToggle(speed);
75        if (statewhobought == 0) {
76            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_plus.png");
77            statewhobought = 1;
78        } else {
79            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_minus.png");
80            statewhobought = 0
81        }
82    }
83//]]></script>
84
85<section id="product_detail">
86
87    <!--★タイトル★-->
88    <h2 class="title"><!--{$tpl_subtitle|h}--></h2>
89    <!--★画像★-->
90
91    <div id="detailphotoblock" class="mainImageInit">
92        <ul>
93            <!--{assign var=key value="main_image"}-->
94            <li id="mainImage0">
95
96            <!--{* 画像の縦横倍率を算出 *}-->
97            <!--{assign var=detail_image_size value=200}-->
98            <!--{assign var=main_image_factor value=`$arrFile[$key].width/$detail_image_size`}-->
99            <!--{if $arrProduct.main_large_image|strlen >= 1}-->
100                <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_large_image|h}-->" target="_blank">
101                    <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_image|h}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile.main_image.width/$main_image_factor}-->" height="<!--{$arrFile.main_image.height/$main_image_factor}-->" /></a>
102            <!--{else}-->
103                <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_image|h}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile.main_image.width/$main_image_factor}-->" height="<!--{$arrFile.main_image.height/$main_image_factor}-->" />
104            <!--{/if}-->
105            </li>
106            <!--★サブ画像★-->
107            <!--{section name=cnt loop=$smarty.const.PRODUCTSUB_MAX}-->
108            <!--{assign var=key value="sub_image`$smarty.section.cnt.index+1`"}-->
109            <!--{assign var=sub_image_factor value=`$arrFile[$key].width/$detail_image_size`}-->
110            <!--{assign var=lkey value="sub_large_image`$smarty.section.cnt.index+1`"}-->
111            <!--{if $arrFile[$key].filepath != ""}-->
112                <li id="mainImage<!--{$smarty.section.cnt.index+1}-->">
113                <!--{if $arrProduct[$lkey] != ""}-->
114                    <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct[$lkey]|h}-->" target="_blank">
115                    <img src="<!--{$arrFile[$key].filepath|h}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" /></a>
116                <!--{else}-->
117                    <img src="<!--{$arrFile[$key].filepath|h}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
118                <!--{/if}-->
119                </li>
120            <!--{/if}-->
121            <!--{/section}-->
122        </ul>
123    </div>
124
125    <section id="detailarea">
126
127        <!--★詳細メインコメント★-->
128        <p class="main_comment"><!--{$arrProduct.main_comment|nl2br_html}--></p>
129
130        <form name="form1" id="form1" method="post" action="<!--{$smarty.const.ROOT_URLPATH}-->products/detail.php">
131            <div id="detailrightblock">
132                <!--▼商品ステータス-->
133                <!--{assign var=ps value=$productStatus[$tpl_product_id]}-->
134                <!--{if count($ps) > 0}-->
135                    <ul class="status_icon">
136                    <!--{foreach from=$ps item=status}-->
137                        <li><!--{$arrSTATUS[$status]}--></li>
138                    <!--{/foreach}-->
139                    </ul>
140                <!--{/if}-->
141                <!--▲商品ステータス-->
142
143                <div class="product_detail">
144
145                    <!--★商品名★-->
146                    <h3 class="product_name"><!--{$arrProduct.name|h}--></h3>
147
148                    <p class="product_code">
149                        <span class="mini">商品コード:</span>
150
151                        <span id="product_code_default">
152                            <!--{if $arrProduct.product_code_min == $arrProduct.product_code_max}-->
153                                <!--{$arrProduct.product_code_min|h}-->
154                            <!--{else}-->
155                                <!--{$arrProduct.product_code_min|h}-->~<!--{$arrProduct.product_code_max|h}-->
156                            <!--{/if}-->
157                        </span><span id="product_code_dynamic"></span>
158                    </p>
159
160                    <!--★関連カテゴリ★-->
161                    <p class="relative_cat"><span class="mini">関連カテゴリ:</span>
162                        <!--{section name=r loop=$arrRelativeCat}-->
163                            <!--{section name=s loop=$arrRelativeCat[r]}-->
164                                <a rel="external" href="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php?category_id=<!--{$arrRelativeCat[r][s].category_id}-->"><!--{$arrRelativeCat[r][s].category_name}--></a>
165                                <!--{if !$smarty.section.s.last}--><!--{$smarty.const.SEPA_CATNAVI}--><!--{/if}-->
166                            <!--{/section}--><br />
167                        <!--{/section}-->
168                    </p>
169
170                    <!--★通常価格★-->
171                    <!--{if $arrProduct.price01_max_inctax > 0}-->
172                        <p class="normal_price">
173                            <span class="mini"><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(税込):</span>
174                            <span id="price01_default">
175                                <!--{if $arrProduct.price01_min_inctax == $arrProduct.price01_max_inctax}-->
176                                    <!--{$arrProduct.price01_min_inctax|number_format}-->
177                                <!--{else}-->
178                                    <!--{$arrProduct.price01_min_inctax|number_format}-->~<!--{$arrProduct.price01_max_inctax|number_format}-->
179                                <!--{/if}--></span>
180                            <span id="price01_dynamic"></span>円
181                        </p>
182                    <!--{/if}-->
183
184                    <!--★販売価格★-->
185                    <p class="sale_price">
186                        <span class="mini"><!--{$smarty.const.SALE_PRICE_TITLE}-->(税込):</span>
187                        <span class="price"><span id="price02_default">
188                            <!--{if $arrProduct.price02_min_inctax == $arrProduct.price02_max_inctax}-->
189                                <!--{$arrProduct.price02_min_inctax|number_format}-->
190                            <!--{else}-->
191                                <!--{$arrProduct.price02_min_inctax|number_format}-->~<!--{$arrProduct.price02_max_inctax|number_format}-->
192                            <!--{/if}-->
193                        </span><span id="price02_dynamic"></span>円</span>
194                    </p>
195
196                    <!--★ポイント★-->
197                    <!--{if $smarty.const.USE_POINT !== false}-->
198                        <p class="sale_price"><span class="mini">ポイント:</span><span id="point_default">
199                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
200                                <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->
201                            <!--{else}-->
202                                <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
203                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->
204                                <!--{else}-->
205                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->~<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->
206                                <!--{/if}-->
207                            <!--{/if}-->
208                            </span><span id="point_dynamic"></span>Pt
209                        </p>
210                    <!--{/if}-->
211
212                    <!--▼メーカー-->
213                    <!--{if $arrProduct.maker_name|strlen >= 1}-->
214                        <p class="maker">
215                            <span class="mini">メーカー:</span><span>
216                                <!--{$arrProduct.maker_name|h}-->
217                            </span>
218                        </p>
219                    <!--{/if}-->
220                    <!--▲メーカー-->
221
222                    <!--▼メーカーURL-->
223                    <!--{if $arrProduct.comment1|strlen >= 1}-->
224                        <p class="sale_price">
225                            <span class="mini">メーカーURL:</span><span>
226                                <a rel="external" href="<!--{$arrProduct.comment1|h}-->" target="_blank">
227                                    <!--{$arrProduct.comment1|h}--></a>
228                            </span>
229                        </p>
230                    <!--{/if}-->
231                    <!--▲メーカーURL-->
232                </div><!-- /.product_detail -->
233
234                <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
235                <input type="hidden" name="mode" value="cart" />
236                <input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" />
237                <input type="hidden" name="product_class_id" value="<!--{$tpl_product_class_id}-->" id="product_class_id" />
238                <input type="hidden" name="favorite_product_id" value="" />
239
240                <!--▼買い物かご-->
241                <!--{if $tpl_stock_find}-->
242
243                    <!--{if $tpl_classcat_find1}-->
244                        <div class="cart_area">
245                            <dl>
246                                <!--▼規格1-->
247                                <dt><!--{$tpl_class_name1|h}--></dt>
248                                <dd>
249                                    <select name="classcategory_id1"
250                                        style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->"
251                                        class="data-role-none">
252                                        <!--{html_options options=$arrClassCat1 selected=$arrForm.classcategory_id1.value}-->
253                                    </select>
254                                    <!--{if $arrErr.classcategory_id1 != ""}-->
255                                        <br /><span class="attention">※ <!--{$tpl_class_name1}-->を入力して下さい。</span>
256                                    <!--{/if}-->
257                                </dd>
258                                <!--▲規格1-->
259
260                                <!--{if $tpl_classcat_find2}-->
261                                    <!--▼規格2-->
262                                    <dt><!--{$tpl_class_name2|h}--></dt>
263                                    <dd>
264                                        <select name="classcategory_id2"
265                                            style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->"
266                                            class="data-role-none">
267                                        </select>
268                                        <!--{if $arrErr.classcategory_id2 != ""}-->
269                                            <br /><span class="attention">※ <!--{$tpl_class_name2}-->を入力して下さい。</span>
270                                        <!--{/if}-->
271                                    </dd>
272                                    <!--▲規格2-->
273                                <!--{/if}-->
274                            </dl>
275                        </div>
276                    <!--{/if}-->
277
278                    <div class="cartin_btn">
279                        <dl>
280                            <dt>数量</dt>
281                            <dd>
282                                <input type="number" name="quantity" class="quantitybox" value="<!--{$arrForm.quantity.value|default:1|h}-->" max="<!--{9|str_repeat:$smarty.const.INT_LEN}-->" style="<!--{$arrErr.quantity|sfGetErrorColor}-->" />
283                                <!--{if $arrErr.quantity != ""}-->
284                                    <br /><span class="attention"><!--{$arrErr.quantity}--></span>
285                                <!--{/if}-->
286                            </dd>
287                        </dl>
288
289                        <!--★カートに入れる★-->
290                        <div id="cartbtn_default">
291                            <a rel="external" href="javascript:void(document.form1.submit());" class="btn cartbtn_default">カートに入れる</a>
292                        </div>
293                        <div class="attention" id="cartbtn_dynamic"></div>
294                    </div>
295                <!--{else}-->
296                    <div class="cartin_btn">
297                        <div class="attention">申し訳ございませんが、只今品切れ中です。</div>
298                    </div>
299                <!--{/if}-->
300                <!--▲買い物かご-->
301
302                <!--{if $tpl_login}-->
303                    <!--{if !$is_favorite}-->
304                        <div class="btn_favorite">
305                            <p><a rel="external" href="javascript:void(0);" onclick="fnAddFavoriteSphone(<!--{$arrProduct.product_id|h}-->); return false;" class="btn_sub">お気に入りに追加</a></p>
306                        </div>
307                    <!--{else}-->
308                        <div class="btn_favorite">
309                            <p>お気に入り登録済み</p>
310                        </div>
311                    <!--{/if}-->
312                <!--{/if}-->
313            </div>
314        </form>
315    </section>
316    <!--詳細ここまで-->
317
318    <!--▼サブエリアここから-->
319    <!--{if $arrProduct.sub_title1 != ""}-->
320        <div class="title_box_sub clearfix">
321            <h2>商品情報</h2>
322            <!--{assign var=ckey value="sub_comment`$smarty.section.cnt.index+1`"}-->
323            <span class="b_expand"><img src="<!--{$TPL_URLPATH}-->img/button/btn_minus.png" onclick="fnSubToggle($('#sub_area'), this);" alt=""></span>
324        </div>
325        <div id="sub_area">
326            <!--{section name=cnt loop=$smarty.const.PRODUCTSUB_MAX}-->
327                <!--{assign var=key value="sub_title`$smarty.section.cnt.index+1`"}-->
328                <!--{if $arrProduct[$key] != ""}-->
329                    <!--▼サブ情報-->
330                    <div class="subarea clearfix">
331                        <!--★サブタイトル★-->
332                        <h3><!--{$arrProduct[$key]|h}--></h3>
333
334                        <!--★サブ画像★-->
335                        <!--{assign var=sub_image_size value=80}-->
336                        <!--{assign var=key value="sub_image`$smarty.section.cnt.index+1`"}-->
337                        <!--{assign var=lkey value="sub_large_image`$smarty.section.cnt.index+1`"}-->
338                        <!--{assign var=ckey value="sub_comment`$smarty.section.cnt.index+1`"}-->
339                        <!--{assign var=sub_image_factor value=`$arrFile[$key].width/$sub_image_size`}-->
340                        <!--{if $arrProduct[$key]|strlen >= 1}-->
341                            <p class="subphotoimg">
342                                <!--{if $arrProduct[$lkey]|strlen >= 1}-->
343                                    <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct[$lkey]|h}-->" target="_blank">
344                                        <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
345                                    </a>
346                                <!--{else}-->
347                                    <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
348                                <!--{/if}-->
349                            </p>
350                        <!--{/if}-->
351                        <!--★サブテキスト★-->
352                        <p class="subtext"><!--★サブテキスト★--><!--{$arrProduct[$ckey]|nl2br_html}--></p>
353                    </div>
354                <!--{/if}-->
355            <!--{/section}-->
356        </div>
357    <!--{/if}-->
358    <!--サブエリアここまで-->
359
360    <!--この商品に対するお客様の声-->
361    <div class="title_box_sub clearfix">
362        <h2>この商品に対するお客様の声</h2>
363            <span class="b_expand"><img src="<!--{$TPL_URLPATH}-->img/button/btn_minus.png" onclick="fnReviewToggle($('#review_bloc_area'), this);" alt=""></span>
364        </div>
365
366        <div id="review_bloc_area">
367            <div class="review_bloc clearfix">
368            <p>この商品に対するご感想をぜひお寄せください。</p>
369            <div class="review_btn">
370                <!--{if count($arrReview) < $smarty.const.REVIEW_REGIST_MAX}-->
371                    <!--★新規コメントを書き込む★-->
372                    <a href="./review.php?product_id=<!--{$arrProduct.product_id}-->" target="_blank" class="btn_sub">新規コメントを書き込む</a>
373                <!--{/if}-->
374            </div>
375            </div>
376
377            <!--{if count($arrReview) > 0}-->
378            <ul>
379                <!--{section name=cnt loop=$arrReview}-->
380                    <li>
381                        <p class="voicetitle"><!--{$arrReview[cnt].title|h}--></p>
382                        <p class="voicedate"><!--{$arrReview[cnt].create_date|sfDispDBDate:false}--> 投稿者:<!--{if $arrReview[cnt].reviewer_url}--><a href="<!--{$arrReview[cnt].reviewer_url}-->" target="_blank"><!--{$arrReview[cnt].reviewer_name|h}--></a><!--{else}--><!--{$arrReview[cnt].reviewer_name|h}--><!--{/if}--><br />おすすめレベル:<span class="recommend_level"><!--{assign var=level value=$arrReview[cnt].recommend_level}--><!--{$arrRECOMMEND[$level]|h}--></span></p>
383                        <p class="voicecomment"><!--{$arrReview[cnt].comment|h|nl2br}--></p>
384                    </li>
385                <!--{/section}-->
386            </ul>
387            <!--{/if}-->
388        </div>
389
390    <!--お客様の声ここまで-->
391
392
393    <!--▼その他おすすめ商品-->
394    <!--{if $arrRecommend}-->
395        <div class="title_box_sub clearfix">
396            <h2>その他のオススメ商品</h2>
397            <span class="b_expand"><img src="<!--{$TPL_URLPATH}-->img/button/btn_minus.png" onclick="fnWhoboughtToggle($('#whobought_area'), this);" alt=""></span>
398        </div>
399
400        <div id="whobought_area" class="mainImageInit">
401            <ul>
402                <!--{section name=cnt loop=$arrRecommend}-->
403                    <!--{if $arrRecommend[cnt].product_id}-->
404                        <li id="mainImage1<!--{$smarty.section.cnt.index}-->">
405                            <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrRecommend[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65" alt="<!--{$arrRecommend[cnt].name|h}-->" />
406                            <!--{assign var=price02_min value=`$arrRecommend[cnt].price02_min_inctax`}-->
407                            <!--{assign var=price02_max value=`$arrRecommend[cnt].price02_max_inctax`}-->
408                            <h3><a rel="external" href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrRecommend[cnt].product_id|u}-->"><!--{$arrRecommend[cnt].name|h}--></a></h3>
409                            <p class="sale_price"><span class="price">
410                                <!--{if $price02_min == $price02_max}-->
411                                    <!--{$price02_min|number_format}-->
412                                <!--{else}-->
413                                    <!--{$price02_min|number_format}-->~<!--{$price02_max|number_format}-->
414                                <!--{/if}-->
415                                円</span>
416                            </p>
417                        </li>
418                    <!--{/if}-->
419                <!--{/section}-->
420            </ul>
421        </div>
422    <!--{/if}-->
423    <!--▲その他おすすめ商品-->
424
425    <div class="btn_area">
426        <p><a href="javascript:void(0);" class="btn_more" data-rel="back">戻る</a></p>
427    </div>
428</section>
429
430<!--▼検索バー -->
431<section id="search_area">
432    <form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php">
433        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
434        <input type="hidden" name="mode" value="search" />
435        <input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" >
436    </form>
437</section>
438<!--▲検索バー -->
Note: See TracBrowser for help on using the repository browser.