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

Revision 21537, 14.4 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<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/products.js"></script>
23<script type="text/javascript">//<![CDATA[
24    function fnSetClassCategories(form, classcat_id2_selected) {
25        var $form = $(form);
26        var product_id = $form.find('input[name=product_id]').val();
27        var $sele1 = $form.find('select[name=classcategory_id1]');
28        var $sele2 = $form.find('select[name=classcategory_id2]');
29        setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
30    }
31    // 並び順を変更
32    function fnChangeOrderby(orderby) {
33        fnSetVal('orderby', orderby);
34        fnSetVal('pageno', 1);
35        fnSubmit();
36    }
37    // 表示件数を変更
38    function fnChangeDispNumber(dispNumber) {
39        fnSetVal('disp_number', dispNumber);
40        fnSetVal('pageno', 1);
41        fnSubmit();
42    }
43    // カゴに入れる
44    function fnInCart(productForm) {
45        var product_id = productForm["product_id"].value;
46        fnChangeAction("?#product" + product_id);
47        if (productForm["classcategory_id1"]) {
48            fnSetVal("classcategory_id1", productForm["classcategory_id1"].value);
49        }
50        if (productForm["classcategory_id2"]) {
51            fnSetVal("classcategory_id2", productForm["classcategory_id2"].value);
52        }
53        fnSetVal("quantity", productForm["quantity"].value);
54        fnSetVal("product_id", productForm["product_id"].value);
55        fnSetVal("product_class_id", productForm["product_class_id"].value);
56        fnSubmit();
57    }
58//]]></script>
59
60<div id="undercolumn">
61    <form name="form1" id="form1" method="get" action="?">
62        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
63        <input type="hidden" name="mode" value="<!--{$mode|h}-->" />
64        <!--{* ▼検索条件 *}-->
65        <input type="hidden" name="category_id" value="<!--{$arrSearchData.category_id|h}-->" />
66        <input type="hidden" name="maker_id" value="<!--{$arrSearchData.maker_id|h}-->" />
67        <input type="hidden" name="name" value="<!--{$arrSearchData.name|h}-->" />
68        <!--{* ▲検索条件 *}-->
69        <!--{* ▼ページナビ関連 *}-->
70        <input type="hidden" name="orderby" value="<!--{$orderby|h}-->" />
71        <input type="hidden" name="disp_number" value="<!--{$disp_number|h}-->" />
72        <input type="hidden" name="pageno" value="<!--{$tpl_pageno|h}-->" />
73        <!--{* ▲ページナビ関連 *}-->
74        <!--{* ▼注文関連 *}-->
75        <input type="hidden" name="product_id" value="" />
76        <input type="hidden" name="classcategory_id1" value="" />
77        <input type="hidden" name="classcategory_id2" value="" />
78        <input type="hidden" name="product_class_id" value="" />
79        <input type="hidden" name="quantity" value="" />
80        <!--{* ▲注文関連 *}-->
81        <input type="hidden" name="rnd" value="<!--{$tpl_rnd|h}-->" />
82    </form>
83
84    <!--★タイトル★-->
85    <h2 class="title"><!--{$tpl_subtitle|h}--></h2>
86
87    <!--▼検索条件-->
88    <!--{if $tpl_subtitle == "検索結果"}-->
89        <ul class="pagecond_area">
90            <li><strong>商品カテゴリ:</strong><!--{$arrSearch.category|h}--></li>
91        <!--{if $arrSearch.maker|strlen >= 1}--><li><strong>メーカー:</strong><!--{$arrSearch.maker|h}--></li><!--{/if}-->
92            <li><strong>商品名:</strong><!--{$arrSearch.name|h}--></li>
93        </ul>
94    <!--{/if}-->
95    <!--▲検索条件-->
96
97    <!--▼ページナビ(本文)-->
98    <!--{capture name=page_navi_body}-->
99        <div class="pagenumber_area clearfix">
100            <div class="change">
101                <!--{if $orderby != 'price'}-->
102                    <a href="javascript:fnChangeOrderby('price');">価格順</a>
103                <!--{else}-->
104                    <strong>価格順</strong>
105                <!--{/if}-->&nbsp;
106                <!--{if $orderby != "date"}-->
107                        <a href="javascript:fnChangeOrderby('date');">新着順</a>
108                <!--{else}-->
109                    <strong>新着順</strong>
110                <!--{/if}-->
111                表示件数
112                <select name="disp_number" onchange="javascript:fnChangeDispNumber(this.value);">
113                    <!--{foreach from=$arrPRODUCTLISTMAX item="dispnum" key="num"}-->
114                        <!--{if $num == $disp_number}-->
115                            <option value="<!--{$num}-->" selected="selected" ><!--{$dispnum}--></option>
116                        <!--{else}-->
117                            <option value="<!--{$num}-->" ><!--{$dispnum}--></option>
118                        <!--{/if}-->
119                    <!--{/foreach}-->
120                </select>
121            </div>
122            <div class="navi"><!--{$tpl_strnavi}--></div>
123        </div>
124    <!--{/capture}-->
125    <!--▲ページナビ(本文)-->
126
127    <!--{foreach from=$arrProducts item=arrProduct name=arrProducts}-->
128
129        <!--{if $smarty.foreach.arrProducts.first}-->
130            <!--▼件数-->
131            <div>
132                <span class="attention"><!--{$tpl_linemax}-->件</span>の商品がございます。
133            </div>
134            <!--▲件数-->
135
136            <!--▼ページナビ(上部)-->
137            <form name="page_navi_top" id="page_navi_top" action="?">
138                <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
139                <!--{if $tpl_linemax > 0}--><!--{$smarty.capture.page_navi_body|smarty:nodefaults}--><!--{/if}-->
140            </form>
141            <!--▲ページナビ(上部)-->
142        <!--{/if}-->
143
144        <!--{assign var=id value=$arrProduct.product_id}-->
145        <!--{assign var=arrErr value=$arrProduct.arrErr}-->
146        <!--▼商品-->
147        <form name="product_form<!--{$id|h}-->" action="?" onsubmit="return false;">
148        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
149        <div class="list_area clearfix">
150            <a name="product<!--{$id|h}-->"></a>
151            <div class="listphoto">
152                <!--★画像★-->
153                <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrProduct.product_id|u}-->">
154                    <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_list_image|sfNoImageMainList|h}-->" alt="<!--{$arrProduct.name|h}-->" class="picture" /></a>
155            </div>
156
157            <div class="listrightbloc">
158                <!--▼商品ステータス-->
159                <!--{if count($productStatus[$id]) > 0}-->
160                    <ul class="status_icon clearfix">
161                        <!--{foreach from=$productStatus[$id] item=status}-->
162                            <li>
163                                <img src="<!--{$TPL_URLPATH}--><!--{$arrSTATUS_IMAGE[$status]}-->" width="60" height="17" alt="<!--{$arrSTATUS[$status]}-->"/>
164                            </li>
165                        <!--{/foreach}-->
166                    </ul>
167                <!--{/if}-->
168                <!--▲商品ステータス-->
169
170                <!--★商品名★-->
171                <h3>
172                    <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrProduct.product_id|u}-->"><!--{$arrProduct.name|h}--></a>
173                </h3>
174                <!--★価格★-->
175                <div class="pricebox sale_price">
176                    <!--{$smarty.const.SALE_PRICE_TITLE}-->(税込):
177                    <span class="price">
178                        <span id="price02_default_<!--{$id}-->"><!--{strip}-->
179                            <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
180                                <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
181                            <!--{else}-->
182                                <!--{$arrProduct.price02_min|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfCalcIncTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
183                            <!--{/if}-->
184                        </span><span id="price02_dynamic_<!--{$id}-->"></span><!--{/strip}-->
185                        円</span>
186                </div>
187
188                <!--★コメント★-->
189                <div class="listcomment"><!--{$arrProduct.main_list_comment|h|nl2br}--></div>
190
191                <!--★商品詳細を見る★-->
192                <div class="detail_btn">
193                    <!--{assign var=name value="detail`$id`"}-->
194                    <a href="<!--{$smarty.const.P_DETAIL_URLPATH}--><!--{$arrProduct.product_id|u}-->" onmouseover="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_detail_on.jpg','<!--{$name}-->');" onmouseout="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_detail.jpg','<!--{$name}-->');">
195                    <img src="<!--{$TPL_URLPATH}-->img/button/btn_detail.jpg" alt="商品詳細を見る" name="<!--{$name}-->" id="<!--{$name}-->" /></a>
196                </div>
197
198                <!--▼買い物かご-->
199                <input type="hidden" name="product_id" value="<!--{$id|h}-->" />
200                <input type="hidden" name="product_class_id" id="product_class_id<!--{$id|h}-->" value="<!--{$tpl_product_class_id[$id]}-->" />
201
202                <div class="cart_area clearfix">
203                    <!--{if $tpl_stock_find[$id]}-->
204                        <!--{if $tpl_classcat_find1[$id]}-->
205                            <div class="classlist">
206                                <dl class="size01 clearfix">
207                                        <!--▼規格1-->
208                                        <dt><!--{$tpl_class_name1[$id]|h}-->:</dt>
209                                        <dd>
210                                            <select name="classcategory_id1" style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->">
211                                                <!--{html_options options=$arrClassCat1[$id] selected=$arrProduct.classcategory_id1}-->
212                                            </select>
213                                            <!--{if $arrErr.classcategory_id1 != ""}-->
214                                                <p class="attention">※ <!--{$tpl_class_name1[$id]}-->を入力して下さい。</p>
215                                            <!--{/if}-->
216                                        </dd>
217                                        <!--▲規格1-->
218                                </dl>
219                                <!--{if $tpl_classcat_find2[$id]}-->
220                                    <dl class="size02 clearfix">
221                                        <!--▼規格2-->
222                                        <dt><!--{$tpl_class_name2[$id]|h}-->:</dt>
223                                        <dd>
224                                            <select name="classcategory_id2" style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->">
225                                            </select>
226                                            <!--{if $arrErr.classcategory_id2 != ""}-->
227                                                <p class="attention">※ <!--{$tpl_class_name2[$id]}-->を入力して下さい。</p>
228                                            <!--{/if}-->
229                                        </dd>
230                                        <!--▲規格2-->
231                                    </dl>
232                                <!--{/if}-->
233                            </div>
234                        <!--{/if}-->
235                        <div class="cartin clearfix">
236                            <div class="quantity">
237                                数量:<input type="text" name="quantity" class="box" value="<!--{$arrProduct.quantity|default:1|h}-->" maxlength="<!--{$smarty.const.INT_LEN}-->" style="<!--{$arrErr.quantity|sfGetErrorColor}-->" />
238                                <!--{if $arrErr.quantity != ""}-->
239                                    <br /><span class="attention"><!--{$arrErr.quantity}--></span>
240                                <!--{/if}-->
241                            </div>
242                            <div class="cartin_btn">
243                                <!--★カゴに入れる★-->
244                                <div id="cartbtn_default_<!--{$id}-->">
245                                    <input type="image" id="cart<!--{$id}-->" src="<!--{$TPL_URLPATH}-->img/button/btn_cartin.jpg" alt="カゴに入れる" onclick="fnInCart(this.form); return false;" onmouseover="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_cartin_on.jpg', this);" onmouseout="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_cartin.jpg', this);" />
246                                </div>
247                                <div class="attention" id="cartbtn_dynamic_<!--{$id}-->"></div>
248                            </div>
249                        </div>
250                    <!--{else}-->
251                        <div class="cartbtn attention">申し訳ございませんが、只今品切れ中です。</div>
252                    <!--{/if}-->
253                </div>
254                <!--▲買い物かご-->
255            </div>
256        </div>
257        </form>
258        <!--▲商品-->
259
260        <!--{if $smarty.foreach.arrProducts.last}-->
261            <!--▼ページナビ(下部)-->
262            <form name="page_navi_bottom" id="page_navi_bottom" action="?">
263                <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
264                <!--{if $tpl_linemax > 0}--><!--{$smarty.capture.page_navi_body|smarty:nodefaults}--><!--{/if}-->
265            </form>
266            <!--▲ページナビ(下部)-->
267        <!--{/if}-->
268
269    <!--{foreachelse}-->
270        <!--{include file="frontparts/search_zero.tpl"}-->
271    <!--{/foreach}-->
272
273</div>
Note: See TracBrowser for help on using the repository browser.