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

Revision 21537, 21.7 KB checked in by Seasoft, 12 years ago (diff)

#1613 (ソース整形・ソースコメントの改善)

  • 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-2011 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 statewhobought = 0;
61    function fnWhoboughtToggle(areaEl, imgEl) {
62        areaEl.slideToggle(speed);
63        if (statewhobought == 0) {
64            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_plus.png");
65            statewhobought = 1;
66        } else {
67            $(imgEl).attr("src", "<!--{$TPL_URLPATH}-->img/button/btn_minus.png");
68            statewhobought = 0
69        }
70    }
71//]]></script>
72
73<section id="product_detail">
74
75    <!--★タイトル★-->
76    <h2 class="title"><!--{$tpl_subtitle|h}--></h2>
77    <!--★画像★-->
78
79    <div id="detailphotoblock" class="mainImageInit">
80        <ul>
81            <!--{assign var=key value="main_image"}-->
82            <li id="mainImage0">
83
84            <!--{* 画像の縦横倍率を算出 *}-->
85            <!--{assign var=detail_image_size value=200}-->
86            <!--{assign var=main_image_factor value=`$arrFile[$key].width/$detail_image_size`}-->
87            <!--{if $arrProduct.main_large_image|strlen >= 1}-->
88                <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_large_image|h}-->" target="_blank">
89                    <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>
90            <!--{else}-->
91                <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}-->" />
92            <!--{/if}-->
93            </li>
94            <!--★サブ画像★-->
95            <!--{section name=cnt loop=$smarty.const.PRODUCTSUB_MAX}-->
96            <!--{assign var=key value="sub_image`$smarty.section.cnt.index+1`"}-->
97            <!--{assign var=sub_image_factor value=`$arrFile[$key].width/$detail_image_size`}-->
98            <!--{assign var=lkey value="sub_large_image`$smarty.section.cnt.index+1`"}-->
99            <!--{if $arrFile[$key].filepath != ""}-->
100                <li id="mainImage<!--{$smarty.section.cnt.index+1}-->">
101                <!--{if $arrProduct[$lkey] != ""}-->
102                    <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct[$lkey]|h}-->" target="_blank">
103                    <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>
104                <!--{else}-->
105                    <img src="<!--{$arrFile[$key].filepath|h}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
106                <!--{/if}-->
107                </li>
108            <!--{/if}-->
109            <!--{/section}-->
110        </ul>
111    </div>
112
113    <section id="detailarea">
114
115        <!--★詳細メインコメント★-->
116        <p class="main_comment"><!--{$arrProduct.main_comment|nl2br_html}--></p>
117
118        <form name="form1" id="form1" method="post" action="<!--{$smarty.const.ROOT_URLPATH}-->products/detail.php">
119            <div id="detailrightblock">
120                <!--▼商品ステータス-->
121                <!--{assign var=ps value=$productStatus[$tpl_product_id]}-->
122                <!--{if count($ps) > 0}-->
123                    <ul class="status_icon">
124                    <!--{foreach from=$ps item=status}-->
125                        <li><!--{$arrSTATUS[$status]}--></li>
126                    <!--{/foreach}-->
127                    </ul>
128                <!--{/if}-->
129                <!--▲商品ステータス-->
130
131                <div class="product_detail">
132
133                    <!--★商品名★-->
134                    <h3 class="product_name"><!--{$arrProduct.name|h}--></h3>
135
136                    <p class="product_code">
137                        <span class="mini">商品コード:</span>
138
139                        <span id="product_code_default">
140                            <!--{if $arrProduct.product_code_min == $arrProduct.product_code_max}-->
141                                <!--{$arrProduct.product_code_min|h}-->
142                            <!--{else}-->
143                                <!--{$arrProduct.product_code_min|h}-->~<!--{$arrProduct.product_code_max|h}-->
144                            <!--{/if}-->
145                        </span><span id="product_code_dynamic"></span>
146                    </p>
147
148                    <!--★関連カテゴリ★-->
149                    <p class="relative_cat"><span class="mini">関連カテゴリ:</span>
150                        <!--{section name=r loop=$arrRelativeCat}-->
151                            <!--{section name=s loop=$arrRelativeCat[r]}-->
152                            <a rel="external" href="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php?category_id=<!--{$arrRelativeCat[r][s].category_id}-->"><!--{$arrRelativeCat[r][s].category_name}--></a>
153                            <!--{if !$smarty.section.s.last}--><!--{$smarty.const.SEPA_CATNAVI}--><!--{/if}-->
154                            <!--{/section}--><br />
155                        <!--{/section}-->
156                    </p>
157
158                    <!--★通常価格★-->
159                    <!--{if $arrProduct.price01_max > 0}-->
160                        <p class="normal_price">
161                            <span class="mini"><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(税込):</span>
162                            <span id="price01_default">
163                                <!--{if $arrProduct.price01_min == $arrProduct.price01_max}-->
164                                    <!--{$arrProduct.price01_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
165                                <!--{else}-->
166                                    <!--{$arrProduct.price01_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price01_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
167                                <!--{/if}--></span>
168                            <span id="price01_dynamic"></span>円
169                        </p>
170                    <!--{/if}-->
171
172                    <!--★販売価格★-->
173                    <p class="sale_price">
174                        <span class="mini"><!--{$smarty.const.SALE_PRICE_TITLE}-->(税込):</span>
175                        <span class="price"><span id="price02_default">
176                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
177                                <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
178                            <!--{else}-->
179                                <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
180                            <!--{/if}-->
181                        </span><span id="price02_dynamic"></span>円</span>
182                    </p>
183
184                    <!--★ポイント★-->
185                    <!--{if $smarty.const.USE_POINT !== false}-->
186                        <p class="sale_price"><span class="mini">ポイント:</span><span id="point_default">
187                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
188                                <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->
189                            <!--{else}-->
190                                <!--{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}-->
191                                    <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id|number_format}-->
192                                <!--{else}-->
193                                    <!--{$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}-->
194                                <!--{/if}-->
195                            <!--{/if}-->
196                            </span><span id="point_dynamic"></span>Pt
197                        </p>
198                    <!--{/if}-->
199
200                    <!--▼メーカーURL-->
201                    <!--{if $arrProduct.comment1|strlen >= 1}-->
202                        <p class="sale_price">
203                            <span class="mini">メーカーURL:</span><span>
204                                <a rel="external" href="<!--{$arrProduct.comment1|h}-->" target="_blank">
205                                    <!--{$arrProduct.comment1|h}--></a>
206                            </span>
207                        </p>
208                    <!--{/if}-->
209                    <!--▲メーカーURL-->
210                </div><!-- /.product_detail -->
211
212                <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
213                <input type="hidden" name="mode" value="cart" />
214                <input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" />
215                <input type="hidden" name="product_class_id" value="<!--{$tpl_product_class_id}-->" id="product_class_id" />
216                <input type="hidden" name="favorite_product_id" value="" />
217
218                <!--▼買い物かご-->
219                <!--{if $tpl_stock_find}-->
220
221                    <!--{if $tpl_classcat_find1}-->
222                        <div class="cart_area">
223                            <dl>
224                                <!--▼規格1-->
225                                <dt><!--{$tpl_class_name1|h}--></dt>
226                                <dd>
227                                    <select name="classcategory_id1"
228                                        style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->"
229                                        class="data-role-none">
230                                        <!--{html_options options=$arrClassCat1 selected=$arrForm.classcategory_id1.value}-->
231                                    </select>
232                                    <!--{if $arrErr.classcategory_id1 != ""}-->
233                                        <br /><span class="attention">※ <!--{$tpl_class_name1}-->を入力して下さい。</span>
234                                    <!--{/if}-->
235                                </dd>
236                                <!--▲規格1-->
237
238                                <!--{if $tpl_classcat_find2}-->
239                                    <!--▼規格2-->
240                                    <dt><!--{$tpl_class_name2|h}--></dt>
241                                    <dd>
242                                        <select name="classcategory_id2"
243                                            style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->"
244                                            class="data-role-none">
245                                        </select>
246                                        <!--{if $arrErr.classcategory_id2 != ""}-->
247                                            <br /><span class="attention">※ <!--{$tpl_class_name2}-->を入力して下さい。</span>
248                                        <!--{/if}-->
249                                    </dd>
250                                    <!--▲規格2-->
251                                <!--{/if}-->
252                            </dl>
253                        </div>
254                    <!--{/if}-->
255
256                    <div class="cartin_btn">
257                        <dl>
258                            <dt>数量</dt>
259                            <dd>
260                                <input type="number" name="quantity" class="quantitybox" value="<!--{$arrForm.quantity.value|default:1|h}-->" max="<!--{$smarty.const.INT_LEN}-->" style="<!--{$arrErr.quantity|sfGetErrorColor}-->" />
261                                <!--{if $arrErr.quantity != ""}-->
262                                    <br /><span class="attention"><!--{$arrErr.quantity}--></span>
263                                <!--{/if}-->
264                            </dd>
265                        </dl>
266
267                        <!--★カートに入れる★-->
268                        <div id="cartbtn_default">
269                            <a rel="external" href="javascript:void(document.form1.submit());" class="btn cartbtn_default">カートに入れる</a>
270                        </div>
271                        <div class="attention" id="cartbtn_dynamic"></div>
272                    </div>
273                <!--{else}-->
274                    <div class="cartin_btn">
275                        <div class="attention">申し訳ございませんが、只今品切れ中です。</div>
276                    </div>
277                <!--{/if}-->
278                <!--▲買い物かご-->
279
280                <!--{if $tpl_login}-->
281                    <!--{if !$is_favorite}-->
282                        <div class="btn_favorite">
283                            <p><a rel="external" href="javascript:void(0);" onclick="fnAddFavoriteSphone(<!--{$arrProduct.product_id|h}-->); return false;" class="btn_sub">お気に入りに追加</a></p>
284                        </div>
285                    <!--{else}-->
286                        <div class="btn_favorite">
287                            <p>お気に入り登録済み</p>
288                        </div>
289                    <!--{/if}-->
290                <!--{/if}-->
291            </div>
292        </form>
293    </section>
294    <!--詳細ここまで-->
295
296    <!--▼サブエリアここから-->
297    <!--{if $arrProduct.sub_title1 != ""}-->
298        <div class="title_box_sub clearfix">
299            <h2>商品情報</h2>
300            <!--{assign var=ckey value="sub_comment`$smarty.section.cnt.index+1`"}-->
301            <span class="b_expand"><img src="<!--{$TPL_URLPATH}-->img/button/btn_minus.png" onclick="fnSubToggle($('#sub_area'), this);" alt=""></span>
302        </div>
303        <div id="sub_area">
304            <!--{section name=cnt loop=$smarty.const.PRODUCTSUB_MAX}-->
305                <!--{assign var=key value="sub_title`$smarty.section.cnt.index+1`"}-->
306                <!--{if $arrProduct[$key] != ""}-->
307                    <!--▼サブ情報-->
308                    <div class="subarea clearfix">
309                        <!--★サブタイトル★-->
310                        <h3><!--{$arrProduct[$key]|h}--></h3>
311
312                        <!--★サブ画像★-->
313                        <!--{assign var=sub_image_size value=80}-->
314                        <!--{assign var=key value="sub_image`$smarty.section.cnt.index+1`"}-->
315                        <!--{assign var=lkey value="sub_large_image`$smarty.section.cnt.index+1`"}-->
316                        <!--{assign var=ckey value="sub_comment`$smarty.section.cnt.index+1`"}-->
317                        <!--{assign var=sub_image_factor value=`$arrFile[$key].width/$sub_image_size`}-->
318                        <!--{if $arrProduct[$key]|strlen >= 1}-->
319                            <p class="subphotoimg">
320                                <!--{if $arrProduct[$lkey]|strlen >= 1}-->
321                                    <a rel="external" class="expansion" href="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct[$lkey]|h}-->" target="_blank">
322                                        <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
323                                    </a>
324                                <!--{else}-->
325                                    <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|h}-->" width="<!--{$arrFile[$key].width/$sub_image_factor}-->" height="<!--{$arrFile[$key].height/$sub_image_factor}-->" />
326                                <!--{/if}-->
327                            </p>
328                        <!--{/if}-->
329                        <!--★サブテキスト★-->
330                        <p class="subtext"><!--★サブテキスト★--><!--{$arrProduct[$ckey]|nl2br_html}--></p>
331                    </div>
332                <!--{/if}-->
333            <!--{/section}-->
334        </div>
335    <!--{/if}-->
336    <!--サブエリアここまで-->
337
338
339    <!--▼その他おすすめ商品-->
340    <!--{if $arrRecommend}-->
341        <div class="title_box_sub clearfix">
342            <h2>その他のオススメ商品</h2>
343            <span class="b_expand"><img src="<!--{$TPL_URLPATH}-->img/button/btn_minus.png" onclick="fnWhoboughtToggle($('#whobought_area'), this);" alt=""></span>
344        </div>
345
346        <div id="whobought_area" class="mainImageInit">
347            <ul>
348                <!--{section name=cnt loop=$arrRecommend}-->
349                    <!--{if $arrRecommend[cnt].product_id}-->
350                        <li id="mainImage1<!--{$smarty.section.cnt.index}-->">
351                            <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}-->" />
352                            <!--{assign var=price02_min value=`$arrRecommend[cnt].price02_min`}-->
353                            <!--{assign var=price02_max value=`$arrRecommend[cnt].price02_max`}-->
354                            <h3><a rel="external" href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrRecommend[cnt].product_id|u}-->"><!--{$arrRecommend[cnt].name|h}--></a></h3>
355                            <p class="sale_price"><span class="price">
356                                <!--{if $price02_min == $price02_max}-->
357                                    <!--{$price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
358                                <!--{else}-->
359                                    <!--{$price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
360                                <!--{/if}-->
361                                円</span>
362                            </p>
363                        </li>
364                    <!--{/if}-->
365                <!--{/section}-->
366            </ul>
367        </div>
368    <!--{/if}-->
369    <!--▲その他おすすめ商品-->
370
371    <div class="btn_area">
372        <p><a href="javascript:void(0);" class="btn_more" data-rel="back">商品一覧に戻る</a></p>
373    </div>
374</section>
375
376<!--▼検索バー -->
377<section id="search_area">
378    <form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php">
379        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
380        <input type="hidden" name="mode" value="search" />
381        <input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" >
382    </form>
383</section>
384<!--▲検索バー -->
Note: See TracBrowser for help on using the repository browser.