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

Revision 19661, 11.8 KB checked in by nanasess, 13 years ago (diff)

source:branches/camp/camp-2_5-E のマージ

  • スマートフォン対応(#787)
  • プラグイン機能(#494)
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">//<![CDATA[
23// 規格2に選択肢を割り当てる。
24function fnSetClassCategories(form, classcat_id2_selected) {
25    sele1 = form.classcategory_id1;
26    sele2 = form.classcategory_id2;
27    product_id = form.product_id.value;
28
29    if (sele1) {
30        if (sele2) {
31            // 規格2の選択肢をクリア
32            count = sele2.options.length;
33            for(i = count; i >= 0; i--) {
34                sele2.options[i] = null;
35            }
36           
37            // 規格2に選択肢を割り当てる
38            classcats = productsClassCategories[product_id][sele1.value];
39            i = 0;
40            for (var classcat_id2_key in classcats) {
41                sele2.options[i] = new Option(classcats[classcat_id2_key].name, classcat_id2_key);
42                if (classcat_id2_key == classcat_id2_selected) {
43                    sele2.options[i].selected = true;
44                }
45                i++;
46            }
47        }
48        fnCheckStock(form);
49    }
50}
51// 並び順を変更
52function fnChangeOrderby(orderby) {
53    fnSetVal('orderby', orderby);
54    fnSetVal('pageno', 1);
55    fnSubmit();
56}
57// 表示件数を変更
58function fnChangeDispNumber(dispNumber) {
59    fnSetVal('disp_number', dispNumber);
60    fnSetVal('pageno', 1);
61    fnSubmit();
62}
63// カゴに入れる
64function fnInCart(productForm) {
65    var product_id = productForm["product_id"].value;
66    fnChangeAction("?#product" + product_id);
67    if (productForm["classcategory_id1"]) {
68        fnSetVal("classcategory_id1", productForm["classcategory_id1"].value);
69    }
70    if (productForm["classcategory_id2"]) {
71        fnSetVal("classcategory_id2", productForm["classcategory_id2"].value);
72    }
73    fnSetVal("quantity", productForm["quantity"].value);
74    fnSetVal("product_id", productForm["product_id"].value);
75    fnSetVal("product_class_id", productForm["product_class_id"].value);
76    fnSetVal("product_type", productForm["product_type"].value);
77    fnSubmit();
78}
79function fnCheckStock(form) {
80    product_id = form.product_id.value;
81    classcat_id1 = form.classcategory_id1.value;
82    classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : 0;
83    classcat2 = productsClassCategories[product_id][classcat_id1][classcat_id2];
84   
85    // 在庫(品切れ)
86    eleDefault = document.getElementById('cartbtn_default_' + product_id);
87    eleDynamic = document.getElementById('cartbtn_dynamic_' + product_id);
88    if (
89           classcat2
90        && classcat2.stock_find === false
91    ) {
92        eleDefault.style.display = 'none';
93        eleDynamic.innerHTML = '申し訳ございませんが、只今品切れ中です。';
94    } else {
95        eleDefault.style.display = '';
96        eleDynamic.innerHTML = '';
97    }
98   
99    // 販売価格
100    eleDefault = document.getElementById('price02_default_' + product_id);
101    eleDynamic = document.getElementById('price02_dynamic_' + product_id);
102    if (
103           classcat2
104        && typeof classcat2.price02 != 'undefined'
105        && String(classcat2.price02).length >= 1
106    ) {
107        eleDefault.style.display = 'none';
108        eleDynamic.innerHTML = classcat2.price02;
109    } else {
110        eleDefault.style.display = '';
111        eleDynamic.innerHTML = '';
112    }
113    // 商品規格
114    eleDynamic = document.getElementById('product_class_id' + product_id);
115    if (
116           classcat2
117        && typeof classcat2.product_class_id != 'undefined'
118        && String(classcat2.product_class_id).length >= 1
119    ) {
120        eleDynamic.value = classcat2.product_class_id;
121    } else {
122        eleDynamic.value = ''
123    }
124    // 商品種別
125    eleDynamic = document.getElementById('product_type' + product_id);
126    if (
127           classcat2
128        && typeof classcat2.product_type != 'undefined'
129        && String(classcat2.product_type).length >= 1
130    ) {
131        eleDynamic.value = classcat2.product_type;
132    } else {
133        eleDynamic.value = ''
134    }
135}
136//]]>
137</script>
138
139<!--▼CONTENTS-->
140<div id="undercolumn" class="product product_list">
141    <form name="form1" id="form1" method="get" action="?">
142        <input type="hidden" name="mode" value="<!--{$mode|escape}-->" />
143        <!--{* ▼検索条件 *}-->
144        <input type="hidden" name="category_id" value="<!--{$arrSearchData.category_id|escape}-->" />
145        <input type="hidden" name="maker_id" value="<!--{$arrSearchData.maker_id|escape}-->" />
146        <input type="hidden" name="name" value="<!--{$arrSearchData.name|escape}-->" />
147        <!--{* ▲検索条件 *}-->
148        <!--{* ▼ページナビ関連 *}-->
149        <input type="hidden" name="orderby" value="<!--{$orderby|escape}-->" />
150        <input type="hidden" name="disp_number" value="<!--{$disp_number|escape}-->" />
151        <input type="hidden" name="pageno" value="<!--{$tpl_pageno|escape}-->" />
152        <!--{* ▲ページナビ関連 *}-->
153        <!--{* ▼注文関連 *}-->
154        <input type="hidden" name="product_id" value="" />
155        <input type="hidden" name="classcategory_id1" value="" />
156        <input type="hidden" name="classcategory_id2" value="" />
157        <input type="hidden" name="product_class_id" value="" />
158        <input type="hidden" name="product_type" value="" />
159        <input type="hidden" name="quantity" value="" />
160        <!--{* ▲注文関連 *}-->
161        <input type="hidden" name="rnd" value="<!--{$tpl_rnd|escape}-->" />
162    </form>
163   
164    <!--★タイトル★-->
165    <h2 class="title"><!--{$tpl_subtitle|escape}--></h2>
166   
167    <!--▼検索条件-->
168    <!--{if $tpl_subtitle == "検索結果"}-->
169        <ul class="pagecondarea">
170            <li><strong>商品カテゴリ:</strong><!--{$arrSearch.category|escape}--></li>
171        <!--{if $arrSearch.maker|strlen >= 1}--><li><strong>メーカー:</strong><!--{$arrSearch.maker|escape}--></li><!--{/if}-->
172            <li><strong>商品名:</strong><!--{$arrSearch.name|escape}--></li>
173        </ul>
174    <!--{/if}-->
175    <!--▲検索条件-->
176
177    <!--▼ページナビ(本文)-->
178    <!--{capture name=page_navi_body}-->
179        <div class="pagenumberarea">
180            <div class="change">
181                <!--{if $orderby != 'price'}-->
182                    <a href="javascript:fnChangeOrderby('price');">価格順</a>
183                <!--{else}-->
184                    <strong>価格順</strong>
185                <!--{/if}-->
186                <!--{if $orderby != "date"}-->
187                        <a href="javascript:fnChangeOrderby('date');">新着順</a>
188                <!--{else}-->
189                    <strong>新着順</strong>
190                <!--{/if}-->
191            </div>
192            <div class="navi"><!--{$tpl_strnavi}--></div>
193        </div>
194    <!--{/capture}-->
195    <!--▲ページナビ(本文)-->
196
197    <!--{foreach from=$arrProducts item=arrProduct name=arrProducts}-->
198
199        <!--{if $smarty.foreach.arrProducts.first}-->
200            <!--▼件数-->
201            <div>
202                <span class="pagenumber"><!--{$tpl_linemax}--></span>件の商品
203               
204                <select name="disp_number" onchange="javascript:fnChangeDispNumber(this.value);">
205                    <!--{foreach from=$arrPRODUCTLISTMAX item="dispnum" key="num"}-->
206                        <!--{if $num == $disp_number}-->
207                        <option value="<!--{$num}-->" selected="selected" ><!--{$dispnum}--></option>
208                        <!--{else}-->
209                        <option value="<!--{$num}-->" ><!--{$dispnum}--></option>
210                        <!--{/if}-->
211                    <!--{/foreach}-->
212                </select>
213            </div>
214            <!--▲件数-->
215           
216            <!--▼ページナビ(上部)-->
217            <form name="page_navi_top" id="page_navi_top" action="?">
218                <!--{if $tpl_linemax > 0}--><!--{$smarty.capture.page_navi_body|smarty:nodefaults}--><!--{/if}-->
219            </form>
220            <!--▲ページナビ(上部)-->
221        <!--{/if}-->
222
223        <!--{assign var=id value=$arrProduct.product_id}-->
224        <!--{assign var=arrErr value=$arrProduct.arrErr}-->
225        <!--▼商品-->
226        <div class="listarea">
227        <a name="product<!--{$id|escape}-->" />
228            <div class="listphoto">
229                <!--★画像★-->
230                <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id|escape:url}-->" class="over"><!--商品写真--><img src="<!--{$smarty.const.IMAGE_SAVE_URL|sfTrimURL}-->/<!--{$arrProduct.main_list_image|sfNoImageMainList|escape}-->" alt="<!--{$arrProduct.name|escape}-->" class="picture" /></a>
231            </div>
232           
233            <div class="listrightblock">
234                <!--▼商品ステータス-->
235                <!--{if count($productStatus[$id]) > 0}-->
236                    <ul class="status_icon">
237                        <!--{foreach from=$productStatus[$id] item=status}-->
238                            <li>
239                                <img src="<!--{$TPL_DIR}--><!--{$arrSTATUS_IMAGE[$status]}-->" width="65" height="17" alt="<!--{$arrSTATUS[$status]}-->"/>
240                            </li>
241                        <!--{/foreach}-->
242                    </ul>
243                <!--{/if}-->
244                <!--▲商品ステータス-->
245               
246                <!--★商品名★-->
247                <h3>
248                    <a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id|escape:url}-->" name="product<!--{$arrProduct.product_id}-->"><!--{$arrProduct.name|escape}--></a>
249                </h3>
250               
251                <!--★コメント★-->
252                <p class="listcomment"><!--{$arrProduct.main_list_comment|escape|nl2br}--></p>
253               
254                <p>
255                    <span class="pricebox sale_price">
256                        <span class="mini">税込</span>:
257                        <span class="price">
258                            <span id="price02_default_<!--{$id}-->">
259                                <!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
260                                    <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
261                                <!--{else}-->
262                                    <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
263                                <!--{/if}-->
264                            </span><span id="price02_dynamic_<!--{$id}-->"></span>
265                            円</span>
266                    </span>
267                </p>
268
269            </div>
270        </div>
271        <!--▲商品-->
272
273        <!--{if $smarty.foreach.arrProducts.last}-->
274            <!--▼ページナビ(下部)-->
275            <form name="page_navi_bottom" id="page_navi_bottom" action="?">
276                <!--{if $tpl_linemax > 0}--><!--{$smarty.capture.page_navi_body|smarty:nodefaults}--><!--{/if}-->
277            </form>
278            <!--▲ページナビ(下部)-->
279        <!--{/if}-->
280
281    <!--{foreachelse}-->
282        <!--{include file="frontparts/search_zero.tpl"}-->
283    <!--{/foreach}-->
284
285</div>
286<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.