source: branches/version-2_12-dev/data/Smarty/templates/sphone/shopping/payment.tpl @ 21535

Revision 21535, 14.7 KB checked in by Seasoft, 12 years ago (diff)

#1613 (ソース整形・ソースコメントの改善)

  • 主にテンプレートのスペース関連
  • 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<!--▼CONTENTS-->
24<script type="text/javascript">//<![CDATA[
25    $(function() {
26        if ($('input[name=deliv_id]:checked').val()
27            || $('#deliv_id').val()) {
28            showForm(true);
29        } else {
30            showForm(false);
31        }
32        $('input[id^=deliv_]').click(function() {
33            showForm(true);
34            var data = {};
35            data.mode = 'select_deliv';
36            data.deliv_id = $(this).val();
37            data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->';
38            $.ajax({
39                type : 'POST',
40                url : location.pathname,
41                data: data,
42                cache : false,
43                dataType : 'json',
44                error : remoteException,
45                success : function(data, dataType) {
46                    if (data.error) {
47                        remoteException();
48                    } else {
49                        // 支払い方法の行を生成
50                        var payment = $('#payment');
51                        payment.empty();
52                        for (var i in data.arrPayment) {
53                            // ラジオボタン
54                            var radio = $('<input type="radio" />')
55                                .attr('name', 'payment_id')
56                                .attr('id', 'pay_' + i)
57                                .val(data.arrPayment[i].payment_id);
58                            // ラベル
59                            var label = $('<label />')
60                                .attr('for', 'pay_' + i)
61                                .text(data.arrPayment[i].payment_method);
62                            // 行
63                            var li = $('<li />')
64                                .append($('<td />')
65                                .addClass('centertd')
66                                .append(radio)
67                                .append(label));
68
69                            li.appendTo(payment);
70                        }
71                        // お届け時間を生成
72                        var deliv_time_id_select = $('select[id^=deliv_time_id]');
73                        deliv_time_id_select.empty();
74                        deliv_time_id_select.append($('<option />').text('指定なし').val(''));
75                        for (var i in data.arrDelivTime) {
76                            var option = $('<option />')
77                                .val(i)
78                                .text(data.arrDelivTime[i])
79                                .appendTo(deliv_time_id_select);
80                        }
81                    }
82                }
83            });
84        });
85
86        /**
87         * 通信エラー表示.
88         */
89        function remoteException(XMLHttpRequest, textStatus, errorThrown) {
90            alert('通信中にエラーが発生しました。カート画面に移動します。');
91            location.href = '<!--{$smarty.const.CART_URLPATH}-->';
92        }
93
94        /**
95         * 配送方法の選択状態により表示を切り替える
96         */
97        function showForm(show) {
98            if (show) {
99                $('#payment, div.delivdate, .select-msg').show();
100                $('.non-select-msg').hide();
101            } else {
102                $('#payment, div.delivdate, .select-msg').hide();
103                $('.non-select-msg').show();
104            }
105        }
106
107        $('#etc')
108            .css('font-size', '100%')
109            .autoResizeTextAreaQ({
110                'max_rows': 50,
111                'extra_rows': 0
112            });
113    });
114//]]>
115</script>
116
117<!--▼コンテンツここから -->
118<section id="undercolumn">
119
120    <h2 class="title"><!--{$tpl_title|h}--></h2>
121
122    <form name="form1" id="form1" method="post" action="<!--{$smarty.const.ROOT_URLPATH}-->shopping/payment.php">
123        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
124        <input type="hidden" name="mode" value="confirm" />
125        <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" />
126
127        <!--★インフォメーション★-->
128        <div class="information end">
129            <p>各項目を選択してください。</p>
130        </div>
131
132        <!--★配送方法の指定★-->
133        <!--{assign var=key value="deliv_id"}-->
134        <!--{if $is_single_deliv}-->
135            <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" id="deliv_id" />
136        <!--{else}-->
137            <section class="pay_area">
138                <h3 class="subtitle">配送方法の指定</h3>
139                <!--{if $arrErr[$key] != ""}-->
140                    <p class="attention"><!--{$arrErr[$key]}--></p>
141                <!--{/if}-->
142                <ul>
143                    <!--{section name=cnt loop=$arrDeliv}-->
144                        <li>
145                            <input type="radio" id="deliv_<!--{$smarty.section.cnt.iteration}-->" name="<!--{$key}-->"  value="<!--{$arrDeliv[cnt].deliv_id}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" <!--{$arrDeliv[cnt].deliv_id|sfGetChecked:$arrForm[$key].value}--> class="data-role-none" />
146                            <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h}--></p><!--{/if}--></label>
147                        </li>
148                    <!--{/section}-->
149                </ul>
150            </section>
151        <!--{/if}-->
152
153        <!--★インフォメーション★-->
154        <section class="pay_area">
155            <h3 class="subtitle">お支払方法の指定</h3>
156            <!--{assign var=key value="payment_id"}-->
157            <!--{if $arrErr[$key] != ""}-->
158                <p class="attention"><!--{$arrErr[$key]}--></p>
159            <!--{/if}-->
160            <p class="non-select-msg information">まずはじめに、配送方法を選択ください。</p>
161            <ul id="payment">
162                <!--{section name=cnt loop=$arrPayment}-->
163                    <li>
164                        <input type="radio" id="pay_<!--{$smarty.section.cnt.iteration}-->" name="<!--{$key}-->" value="<!--{$arrPayment[cnt].payment_id}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" <!--{$arrPayment[cnt].payment_id|sfGetChecked:$arrForm[$key].value}--> class="data-role-none" />
165                        <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
166                        <!--{if $img_show}-->
167                            <!--{if $arrPayment[cnt].payment_image != ""}-->
168                                <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
169                            <!--{/if}-->
170                        <!--{/if}-->
171                    </li>
172                <!--{/section}-->
173            </ul>
174        </section>
175
176
177        <!--★お届け時間の指定★-->
178        <!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
179            <section class="pay_area02">
180                <h3 class="subtitle">お届け時間の指定</h3>
181
182                <div class="form_area">
183                    <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
184                        <!--{assign var=index value=$shippingItem.shipping_id}-->
185
186                        <!--▼フォームボックスここから -->
187                        <!--{if $is_multiple}-->
188                            <div class="formBox"><!--{* FIXME *}-->
189                                <div class="box_header">
190                                    お届け先<!--{$smarty.foreach.shippingItem.iteration}-->
191                                </div>
192                                <div class="innerBox">
193                                    <!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}--><br />
194                                    <span class="mini"><!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}--></span>
195                                </div>
196                        <!--{else}-->
197                            <div class="time_select"><!--{* FIXME *}-->
198                        <!--{/if}-->
199
200                            <div class="btn_area_btm">
201                                <!--★お届け日★-->
202                                <!--{assign var=key value="deliv_date`$index`"}-->
203                                <span class="attention"><!--{$arrErr[$key]}--></span>
204                                <!--{if !$arrDelivDate}-->
205                                    ご指定頂けません。
206                                <!--{else}-->
207                                    <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong top data-role-none">
208                                        <option value="" selected="">お届け日:指定なし</option>
209                                        <!--{html_options options=$arrDelivDate selected=$arrForm[$key].value}-->
210                                    </select>
211                                <!--{/if}-->
212
213                                <!--★お届け時間★-->
214                                <!--{assign var=key value="deliv_time_id`$index`"}-->
215                                <span class="attention"><!--{$arrErr[$key]}--></span>
216                                <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong data-role-none">
217                                    <option value="" selected="">お届け時間:指定なし</option>
218                                    <!--{html_options options=$arrDelivTime selected=$arrForm[$key].value}-->
219                                </select>
220                            </div>
221                        </div><!-- /.formBox --><!-- /.time_select --><!--{* FIXME *}-->
222                    <!--{/foreach}-->
223
224                </div><!-- /.form_area -->
225            </section>
226        <!--{/if}-->
227
228        <!--★ポイント使用の指定★-->
229        <!--{if $tpl_login == 1 && $smarty.const.USE_POINT !== false}-->
230            <section class="point_area">
231                <h3 class="subtitle">ポイント使用の指定</h3>
232
233                    <div class="form_area">
234                        <p class="fb"><span class="point">1ポイントを1円</span>として使用する事ができます。</p>
235                        <div class="point_announce">
236                            <p>現在の所持ポイントは「<span class="price"><!--{$tpl_user_point|default:0|number_format}-->Pt</span>」です。<br />
237                            今回ご購入合計金額:<span class="price"><!--{$arrPrices.subtotal|number_format}-->円</span> (送料、手数料を含みません。)</p>
238                        </div>
239
240                        <!--▼ポイントフォームボックスここから -->
241                        <div class="formBox">
242                            <div class="innerBox fb">
243                                <p>
244                                    <input type="radio" id="point_on" name="point_check" value="1" <!--{$arrForm.point_check.value|sfGetChecked:1}--> onchange="fnCheckInputPoint();" class="data-role-none" />
245                                    <label for="point_on">ポイントを使用する</label>
246                                </p>
247                                <!--{assign var=key value="use_point"}-->
248                                <p class="check_point"><input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|default:$tpl_user_point}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box_point data-role-none" />ポイントを使用する。<span class="attention"><!--{$arrErr[$key]}--></span></p>
249                            </div>
250                        <div class="innerBox fb">
251                            <input type="radio" id="point_off" name="point_check" value="2" <!--{$arrForm.point_check.value|sfGetChecked:2}--> onchange="fnCheckInputPoint();" class="data-role-none" />
252                            <label for="point_off">ポイントを使用しない</label>
253                        </div>
254                    </div><!-- /.formBox -->
255                </div><!-- /.form_area -->
256            </section>
257        <!--{/if}-->
258
259        <!--★その他お問い合わせ★-->
260        <section class="contact_area">
261            <h3 class="subtitle">その他お問い合わせ</h3>
262            <div class="form_area">
263                <p>その他お問い合わせ事項がございましたら、こちらにご入力ください。</p>
264
265                <!--{assign var=key value="message"}-->
266                <span class="attention"><!--{$arrErr[$key]}--></span>
267                <textarea name="<!--{$key}-->" id="etc" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" cols="62" rows="8" class="textarea data-role-none" wrap="hard"><!--{$arrForm[$key].value|h}--></textarea><br />
268            </div><!--▲form_area -->
269        </section>
270
271        <!--★ボタン★-->
272        <div class="btn_area">
273            <ul class="btn_btm">
274                <li><a rel="external" href="javascript:void(document.form1.submit());" class="btn">確認ページへ</a></li>
275                <li><a rel="external" href="<!--{$tpl_back_url|h}-->" class="btn_back">戻る</a></li>
276            </ul>
277        </div>
278
279    </form>
280</section>
281
282<!--▼検索バー -->
283<section id="search_area">
284    <form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php">
285        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
286        <input type="hidden" name="mode" value="search" />
287        <input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" >
288    </form>
289</section>
290<!--▲検索バー -->
291<!--▲コンテンツここまで -->
Note: See TracBrowser for help on using the repository browser.