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

Revision 18181, 13.5 KB checked in by miningbrownie, 15 years ago (diff)

products/list.phpで表示件数を変えるコンボボックスを表示。mtb_product_list_maxをそのまま利用しています。

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