source: branches/comu-ver2/data/Smarty/templates/default/list.tpl @ 18260

Revision 18260, 15.1 KB checked in by Seasoft, 15 years ago (diff)

r18252 に伴う改善。

  • FX3.0にて、[かごに入れる]で入力エラーを伴った場合、入力内容を変更しない限り送信(リクエスト)されない不具合を解消。
  • Property svn:eol-style set to LF
  • 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-2007 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">//<![CDATA[
23// セレクトボックスに項目を割り当てる。
24function fnSetSelect(form, val) {
25    sele1 = form['classcategory_id1'];
26    sele2 = form['classcategory_id2'];
27    id = form['product_id'].value;
28    lists = eval('lists' + id);
29    vals = eval('vals' + id);
30
31    if(sele1 && sele2) {
32        index = sele1.selectedIndex;
33
34        // セレクトボックスのクリア
35        count = sele2.options.length;
36        for(i = count; i >= 0; i--) {
37            sele2.options[i] = null;
38        }
39
40        // セレクトボックスに値を割り当てる
41        len = lists[index].length;
42        for(i = 0; i < len; i++) {
43            sele2.options[i] = new Option(lists[index][i], vals[index][i]);
44            if(val != "" && vals[index][i] == val) {
45                sele2.options[i].selected = true;
46            }
47        }
48    }
49}
50// 並び順を変更
51function fnChangeOrderby(orderby) {
52    fnSetVal('orderby', orderby);
53    fnSetVal('pageno', 1);
54    fnSubmit();
55}
56// 表示件数を変更
57function fnChangeDispNumber(dispNumber) {
58    fnSetVal('disp_number', dispNumber);
59    fnSetVal('pageno', 1);
60    fnSubmit();
61}
62// カゴに入れる
63function fnInCart(productForm) {
64    var product_id = productForm["product_id"].value;
65    fnChangeAction("?#product" + product_id);
66    if (productForm["classcategory_id1"]) {
67        fnSetVal("classcategory_id1", productForm["classcategory_id1"].value);
68    }
69    if (productForm["classcategory_id2"]) {
70        fnSetVal("classcategory_id2", productForm["classcategory_id2"].value);
71    }
72    fnSetVal("quantity", productForm["quantity"].value);
73    fnSetVal("product_id", productForm["product_id"].value);
74    fnSubmit();
75}
76//]]>
77</script>
78
79<!--▼CONTENTS-->
80<div id="undercolumn" class="product product_list">
81    <form name="form1" id="form1" method="get" action="?">
82        <input type="hidden" name="mode" value="<!--{$mode|escape}-->" />
83        <!--{* ▼検索条件 *}-->
84        <input type="hidden" name="category_id" value="<!--{$arrSearchData.category_id|escape}-->" />
85        <input type="hidden" name="maker_id" value="<!--{$arrSearchData.maker_id|escape}-->" />
86        <input type="hidden" name="name" value="<!--{$arrSearchData.name|escape}-->" />
87        <!--{* ▲検索条件 *}-->
88        <!--{* ▼ページナビ関連 *}-->
89        <input type="hidden" name="orderby" value="<!--{$orderby|escape}-->" />
90        <input type="hidden" name="disp_number" value="<!--{$disp_number|escape}-->" />
91        <input type="hidden" name="pageno" value="<!--{$tpl_pageno|escape}-->" />
92        <!--{* ▲ページナビ関連 *}-->
93        <!--{* ▼注文関連 *}-->
94        <input type="hidden" name="product_id" value="" />
95        <input type="hidden" name="classcategory_id1" value="" />
96        <input type="hidden" name="classcategory_id2" value="" />
97        <input type="hidden" name="quantity" value="" />
98        <!--{* ▲注文関連 *}-->
99        <input type="hidden" name="rnd" value="<!--{$tpl_rnd|escape}-->" />
100    </form>
101   
102    <!--★タイトル★-->
103    <h2 class="title"><!--{$tpl_subtitle|escape}--></h2>
104   
105    <!--▼検索条件-->
106    <!--{if $tpl_subtitle == "検索結果"}-->
107        <ul class="pagecondarea">
108            <li><strong>商品カテゴリ:</strong><!--{$arrSearch.category|escape}--></li>
109            <!--{if $arrSearch.maker|strlen >= 1}--><li><strong>メーカー:</strong><!--{$arrSearch.maker|escape}--></li><!--{/if}-->
110            <li><strong>商品名:</strong><!--{$arrSearch.name|escape}--></li>
111        </ul>
112    <!--{/if}-->
113    <!--▲検索条件-->
114
115    <!--▼ページナビ(上部)-->
116    <form name="page_navi_top" id="page_navi_top" action="?">
117        <!--{if $tpl_linemax > 0}-->
118            <ul class="pagenumberarea">
119                <li class="left"><span class="pagenumber"><!--{$tpl_linemax}--></span>件の商品がございます。</li>
120                <li class="center"><!--{$tpl_strnavi}--></li>
121                <li class="right">
122                    <!--{if $orderby != 'price'}-->
123                        <a href="javascript:fnChangeOrderby('price');">価格順</a>
124                    <!--{else}-->
125                        <strong>価格順</strong>
126                    <!--{/if}-->&nbsp;
127                    <!--{if $orderby != "date"}-->
128                        <a href="javascript:fnChangeOrderby('date');">新着順</a>
129                    <!--{else}-->
130                        <strong>新着順</strong>
131                    <!--{/if}-->
132                    表示件数
133                    <select name="disp_number" onchange="javascript:fnChangeDispNumber(this.value);">
134                        <!--{foreach from=$arrPRODUCTLISTMAX item="dispnum" key="num"}-->
135                            <!--{if $num == $disp_number}-->
136                                <option value="<!--{$num}-->" selected="selected" ><!--{$dispnum}--></option>
137                            <!--{else}-->
138                                <option value="<!--{$num}-->" ><!--{$dispnum}--></option>
139                            <!--{/if}-->
140                        <!--{/foreach}-->
141                    </select>
142                </li>
143            </ul>
144        <!--{else}-->
145            <!--{include file="frontparts/search_zero.tpl"}-->
146        <!--{/if}-->
147    </form>
148    <!--▲ページナビ(上部)-->
149
150    <!--{foreach from=$arrProducts item=arrProduct}-->
151        <!--{assign var=id value=$arrProduct.product_id}-->
152        <!--▼商品-->
153        <div class="listarea">
154            <a name="product<!--{$id|escape}-->" />
155            <div class="listphoto">
156                <!--★画像★-->
157                <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->" class="over"><!--商品写真--><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProduct.main_list_image|sfNoImageMainList|escape}-->" alt="<!--{$arrProduct.name|escape}-->" class="picture" /></a>
158            </div>
159           
160            <div class="listrightblock">
161                <!--アイコン-->
162                <!--商品ステータス-->
163                <!--{if count($arrProduct.product_flag) > 0}-->
164                    <ul class="status_icon">
165                        <!--{section name=flg loop=$arrProduct.product_flag|count_characters}-->
166                            <!--{if $arrProduct.product_flag[flg] == "1"}-->
167                                <!--{assign var=key value="`$smarty.section.flg.iteration`"}-->
168                                <li><img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$key]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$key]}-->"/></li>
169                                <!--{assign var=sts_cnt value=$sts_cnt+1}-->
170                            <!--{/if}-->
171                        <!--{/section}-->
172                    </ul>
173                <!--{/if}-->
174                <!--商品ステータス-->
175                <!--アイコン-->
176               
177                <!--★商品名★-->
178                <h3>
179                    <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->"><!--{$arrProduct.name|escape}--></a>
180                </h3>
181               
182                <!--★コメント★-->
183                <p class="listcomment"><!--{$arrProduct.main_list_comment|escape|nl2br}--></p>
184               
185                <p>
186                    <span class="pricebox sale_price">
187                        <!--{$smarty.const.SALE_PRICE_TITLE}--><span class="mini">(税込)</span>:
188                        <span class="price">
189                        <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
190                            <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
191                        <!--{else}-->
192                            <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
193                        <!--{/if}-->円</span>
194                    </span>
195                   
196                    <!--★詳細ボタン★-->
197                    <span class="btnbox">
198                        <!--{assign var=name value="detail`$id`"}-->
199                        <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->" onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_detail_on.gif','<!--{$name}-->');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_detail.gif','<!--{$name}-->');">
200                            <img src="<!--{$TPL_DIR}-->img/products/b_detail.gif" width="115" height="25" alt="詳しくはこちら" name="<!--{$name}-->" id="<!--{$name}-->" /></a>
201                    </span>
202                </p>
203
204                <!--{if $arrProduct.stock_max == 0 && $arrProduct.stock_unlimited_max != 1}-->
205                    <p class="soldout"><em>申し訳ございませんが、只今品切れ中です。</em></p>
206                <!--{else}-->
207                    <!--▼買い物かご-->
208                    <form name="product_form<!--{$id|escape}-->" action="?">
209                        <input type="hidden" name="product_id" value="<!--{$id|escape}-->" />
210                        <div class="in_cart">
211                            <dl>
212                                <!--{if $tpl_classcat_find1[$id]}-->
213                                    <dt><!--{$tpl_class_name1[$id]|escape}-->:</dt>
214                                    <dd>
215                                        <select name="classcategory_id1" style="<!--{$arrProduct.arrErr.classcategory_id1|sfGetErrorColor}-->" onchange="fnSetSelect(this.form);">
216                                        <option value="">選択してください</option>
217                                        <!--{html_options options=$arrClassCat1[$id] selected=$arrProduct.classcategory_id1}-->
218                                        </select>
219                                        <!--{if $arrProduct.arrErr.classcategory_id1 != ""}-->
220                                            <br /><span class="attention">※ <!--{$tpl_class_name1[$id]}-->を入力して下さい。</span>
221                                        <!--{/if}-->
222                                    </dd>
223                                <!--{/if}-->
224                                <!--{if $tpl_classcat_find2[$id]}-->
225                                    <dt><!--{$tpl_class_name2[$id]|escape}-->:</dt>
226                                    <dd>
227                                        <select name="classcategory_id2" style="<!--{$arrProduct.arrErr.classcategory_id2|sfGetErrorColor}-->">
228                                        <option value="">選択してください</option>
229                                        </select>
230                                        <!--{if $arrProduct.arrErr.classcategory_id2 != ""}-->
231                                            <br /><span class="attention">※ <!--{$tpl_class_name2[$id]}-->を入力して下さい。</span>
232                                        <!--{/if}-->
233                                    </dd>
234                                <!--{/if}-->
235
236                                <dt>数量:</dt>
237                                <dd>
238                                    <input type="text" name="quantity" size="3" class="box54" value="<!--{$arrProduct.quantity|default:1|escape}-->" maxlength="<!--{$smarty.const.INT_LEN}-->" style="<!--{$arrProduct.arrErr.quantity|sfGetErrorColor}-->" />
239                                    <!--{if $arrProduct.arrErr.quantity != ""}-->
240                                        <br /><span class="attention"><!--{$arrProduct.arrErr.quantity}--></span>
241                                    <!--{/if}-->
242                                </dd>
243                            </dl>
244                            <div class="cartbtn">
245                                <input
246                                    type="image"
247                                    id="cart<!--{$id}-->"
248                                    src="<!--{$TPL_DIR}-->img/products/b_cartin.gif"
249                                    alt="カゴに入れる"
250                                    onclick="fnInCart(this.form); return false;"
251                                    onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin_on.gif', this);"
252                                    onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin.gif', this);"
253                                />
254                            </div>
255                        </div>
256                    </form>
257                    <!--▲買い物かご-->
258                <!--{/if}-->
259               
260            </div>
261        </div>
262        <!--▲商品-->
263    <!--{/foreach}-->
264
265    <!--▼ページナビ(下部)-->
266    <form name="page_navi_bottom" id="page_navi_bottom" action="?">
267        <!--{if $tpl_linemax > 0}-->
268            <ul class="pagenumberarea">
269                <li class="left"><span class="pagenumber"><!--{$tpl_linemax}--></span>件の商品がございます。</li>
270                <li class="center"><!--{$tpl_strnavi}--></li>
271                <li class="right">
272                    <!--{if $orderby != 'price'}-->
273                        <a href="javascript:fnChangeOrderby('price');">価格順</a>
274                    <!--{else}-->
275                        <strong>価格順</strong>
276                    <!--{/if}-->&nbsp;
277                    <!--{if $orderby != "date"}-->
278                        <a href="javascript:fnChangeOrderby('date');">新着順</a>
279                    <!--{else}-->
280                        <strong>新着順</strong>
281                    <!--{/if}-->
282                     表示件数
283                    <select name="disp_number" onchange="javascript:fnChangeDispNumber(this.value);">
284                        <!--{foreach from=$arrPRODUCTLISTMAX item="dispnum" key="num"}-->
285                            <!--{if $num == $disp_number}-->
286                                <option value="<!--{$num}-->" selected="selected" ><!--{$dispnum}--></option>
287                            <!--{else}-->
288                                <option value="<!--{$num}-->" ><!--{$dispnum}--></option>
289                            <!--{/if}-->
290                        <!--{/foreach}-->
291                    </select>
292                </li>
293            </ul>
294        <!--{/if}-->
295    </form>
296    <!--▲ページナビ(下部)-->
297</div>
298<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.