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

Revision 20463, 14.5 KB checked in by nanasess, 13 years ago (diff)

#1059(商品詳細 商品規格「選択してください」でもカートインされる)

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