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

Revision 21856, 14.6 KB checked in by sakamoto, 12 years ago (diff)

ページ移動時にformからproduct_idを消すように変更

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