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

Revision 23546, 14.5 KB checked in by shutta, 10 years ago (diff)

#2580 Copyrightを更新
Copyrightを2014に更新

  • 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-2014 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">//<![CDATA[
24    $(function() {
25        if ($('input[name=deliv_id]:checked').val()
26            || $('#deliv_id').val()) {
27            showForm(true);
28        } else {
29            showForm(false);
30        }
31        $('input[id^=deliv_]').click(function() {
32            showForm(true);
33            var data = {};
34            data.mode = 'select_deliv';
35            data.deliv_id = $(this).val();
36            data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->';
37            $.ajax({
38                type : 'POST',
39                url : location.pathname,
40                data: data,
41                cache : false,
42                dataType : 'json',
43                error : remoteException,
44                success : function(data, dataType) {
45                    if (data.error) {
46                        remoteException();
47                    } else {
48                        // 支払い方法の行を生成
49                        var payment = $('#payment');
50                        payment.empty();
51                        for (var i in data.arrPayment) {
52                            // ラジオボタン
53                            var radio = $('<input type="radio" />')
54                                .attr('name', 'payment_id')
55                                .attr('id', 'pay_' + i)
56                                .val(data.arrPayment[i].payment_id);
57                            // ラベル
58                            var label = $('<label />')
59                                .attr('for', 'pay_' + i)
60                                .text(data.arrPayment[i].payment_method);
61                            // 行
62                            var li = $('<li />')
63                                .append($('<td />')
64                                .addClass('centertd')
65                                .append(radio)
66                                .append(label));
67
68                            li.appendTo(payment);
69                        }
70                        // お届け時間を生成
71                        var deliv_time_id_select = $('select[id^=deliv_time_id]');
72                        deliv_time_id_select.empty();
73                        deliv_time_id_select.append($('<option />').text('指定なし').val(''));
74                        for (var i in data.arrDelivTime) {
75                            var option = $('<option />')
76                                .val(i)
77                                .text(data.arrDelivTime[i])
78                                .appendTo(deliv_time_id_select);
79                        }
80                    }
81                }
82            });
83        });
84
85        /**
86         * 通信エラー表示.
87         */
88        function remoteException(XMLHttpRequest, textStatus, errorThrown) {
89            alert('通信中にエラーが発生しました。カート画面に移動します。');
90            location.href = '<!--{$smarty.const.CART_URL}-->';
91        }
92
93        /**
94         * 配送方法の選択状態により表示を切り替える
95         */
96        function showForm(show) {
97            if (show) {
98                $('#payment, div.delivdate, .select-msg').show();
99                $('.non-select-msg').hide();
100            } else {
101                $('#payment, div.delivdate, .select-msg').hide();
102                $('.non-select-msg').show();
103            }
104        }
105
106        $('#etc')
107            .css('font-size', '100%')
108            .autoResizeTextAreaQ({
109                'max_rows': 50,
110                'extra_rows': 0
111            });
112    });
113//]]></script>
114
115<!--▼コンテンツここから -->
116<section id="undercolumn">
117
118    <h2 class="title"><!--{$tpl_title|h}--></h2>
119
120    <form name="form1" id="form1" method="post" action="<!--{$smarty.const.ROOT_URLPATH}-->shopping/payment.php">
121        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
122        <input type="hidden" name="mode" value="confirm" />
123        <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" />
124
125        <!--★インフォメーション★-->
126        <div class="information end">
127            <p>各項目を選択してください。</p>
128        </div>
129
130        <!--★配送方法の指定★-->
131        <!--{assign var=key value="deliv_id"}-->
132        <!--{if $is_single_deliv}-->
133            <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" id="deliv_id" />
134        <!--{else}-->
135            <section class="pay_area">
136                <h3 class="subtitle">配送方法の指定</h3>
137                <!--{if $arrErr[$key] != ""}-->
138                    <p class="attention"><!--{$arrErr[$key]}--></p>
139                <!--{/if}-->
140                <ul>
141                    <!--{section name=cnt loop=$arrDeliv}-->
142                        <li>
143                            <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" />
144                            <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h}--></p><!--{/if}--></label>
145                        </li>
146                    <!--{/section}-->
147                </ul>
148            </section>
149        <!--{/if}-->
150
151        <!--★インフォメーション★-->
152        <section class="pay_area">
153            <h3 class="subtitle">お支払方法の指定</h3>
154            <!--{assign var=key value="payment_id"}-->
155            <!--{if $arrErr[$key] != ""}-->
156                <p class="attention"><!--{$arrErr[$key]}--></p>
157            <!--{/if}-->
158            <p class="non-select-msg information">まずはじめに、配送方法を選択ください。</p>
159            <ul id="payment">
160                <!--{section name=cnt loop=$arrPayment}-->
161                    <li>
162                        <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" />
163                        <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
164                        <!--{if $img_show}-->
165                            <!--{if $arrPayment[cnt].payment_image != ""}-->
166                                <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
167                            <!--{/if}-->
168                        <!--{/if}-->
169                    </li>
170                <!--{/section}-->
171            </ul>
172        </section>
173
174
175        <!--★お届け時間の指定★-->
176        <!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
177            <section class="pay_area02">
178                <h3 class="subtitle">お届け時間の指定</h3>
179
180                <div class="form_area">
181                    <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
182                        <!--{assign var=index value=$shippingItem.shipping_id}-->
183
184                        <!--▼フォームボックスここから -->
185                        <!--{if $is_multiple}-->
186                            <div class="formBox"><!--{* FIXME *}-->
187                                <div class="box_header">
188                                    お届け先<!--{$smarty.foreach.shippingItem.iteration}-->
189                                </div>
190                                <div class="innerBox">
191                                    <!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}--><br />
192                                    <span class="mini"><!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}--></span>
193                                </div>
194                        <!--{else}-->
195                            <div class="time_select"><!--{* FIXME *}-->
196                        <!--{/if}-->
197
198                            <div class="btn_area_btm">
199                                <!--★お届け日★-->
200                                <!--{assign var=key value="deliv_date`$index`"}-->
201                                <span class="attention"><!--{$arrErr[$key]}--></span>
202                                <!--{if !$arrDelivDate}-->
203                                    ご指定頂けません。
204                                <!--{else}-->
205                                    <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong top data-role-none">
206                                        <option value="" selected="">お届け日:指定なし</option>
207                                        <!--{assign var=shipping_date_value value=$arrForm[$key].value|default:$shippingItem.shipping_date}-->
208                                        <!--{html_options options=$arrDelivDate selected=$shipping_date_value}-->
209                                    </select>
210                                <!--{/if}-->
211
212                                <!--★お届け時間★-->
213                                <!--{assign var=key value="deliv_time_id`$index`"}-->
214                                <span class="attention"><!--{$arrErr[$key]}--></span>
215                                <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong data-role-none">
216                                    <option value="" selected="">お届け時間:指定なし</option>
217                                    <!--{assign var=shipping_time_value value=$arrForm[$key].value|default:$shippingItem.time_id}-->
218                                    <!--{html_options options=$arrDelivTime selected=$shipping_time_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|n2s}-->Pt</span>」です。<br />
237                            今回ご購入合計金額:<span class="price"><!--{$arrPrices.subtotal|n2s}-->円</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="eccube.togglePointForm();" 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="eccube.togglePointForm();" 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"><!--{"\n"}--><!--{$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="?mode=return" class="btn_back">戻る</a></li>
276            </ul>
277        </div>
278
279    </form>
280</section>
281
282<!--{include file= 'frontparts/search_area.tpl'}-->
283
284<!--▲コンテンツここまで -->
Note: See TracBrowser for help on using the repository browser.