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

Revision 20969, 13.5 KB checked in by Seasoft, 13 years ago (diff)

#1345 (未使用 CSS / class を削除)

  • 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<!--▼CONTENTS-->
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_tbody = $('#payment tbody');
50                        payment_tbody.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 tr = $('<tr />')
63                                .append($('<td />')
64                                        .addClass('centertd')
65                                        .append(radio))
66                                .append($('<td />').append(label));
67
68                            // 支払方法の画像が登録されている場合は表示
69                            if (data.img_show) {
70                                var payment_image = data.arrPayment[i].payment_image;
71                                $('th#payment_method').attr('colspan', 3);
72                                if (payment_image) {
73                                    var img = $('<img />').attr('src', '<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->' + payment_image);
74                                    tr.append($('<td />').append(img));
75                                } else {
76                                    tr.append($('<td />'));
77                                }
78                            } else {
79                                $('th#payment_method').attr('colspan', 2);
80                            }
81
82                            tr.appendTo(payment_tbody);
83                        }
84                        // お届け時間を生成
85                        var deliv_time_id_select = $('select[id^=deliv_time_id]');
86                        deliv_time_id_select.empty();
87                        deliv_time_id_select.append($('<option />').text('指定なし').val(''));
88                        for (var i in data.arrDelivTime) {
89                            var option = $('<option />')
90                                .val(i)
91                                .text(data.arrDelivTime[i])
92                                .appendTo(deliv_time_id_select);
93                        }
94                    }
95                }
96            });
97        });
98
99        /**
100         * 通信エラー表示.
101         */
102        function remoteException(XMLHttpRequest, textStatus, errorThrown) {
103            alert('通信中にエラーが発生しました。カート画面に移動します。');
104            location.href = '<!--{$smarty.const.CART_URLPATH}-->';
105        }
106
107        /**
108         * 配送方法の選択状態により表示を切り替える
109         */
110        function showForm(show) {
111            if (show) {
112                $('#payment, div.delivdate, .select-msg').show();
113                $('.non-select-msg').hide();
114            } else {
115                $('#payment, div.delivdate, .select-msg').hide();
116                $('.non-select-msg').show();
117            }
118        }
119    });
120//]]>
121</script>
122
123<h2 class="title"><!--{$tpl_title|h}--></h2><br />
124
125<form name="form1" id="form1" method="post" action="?">
126    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
127    <input type="hidden" name="mode" value="confirm" />
128    <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" />
129    <!--{assign var=key value="deliv_id"}-->
130    <!--{if $is_single_deliv}-->
131        <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" id="deliv_id" />
132    <!--{else}-->
133    <div class="payarea">
134        <h2>配送方法の指定</h2><br />
135        <p>配送方法をご選択ください。</p>
136
137        <!--{if $arrErr[$key] != ""}-->
138        <p class="attention"><!--{$arrErr[$key]}--></p>
139        <!--{/if}-->
140        <table summary="配送方法選択">
141            <tr>
142                <th>選択</th>
143                <th colspan="2">配送方法</th>
144            </tr>
145            <!--{section name=cnt loop=$arrDeliv}-->
146            <tr>
147                <td class="centertd"><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}--> />
148                </td>
149                <td>
150                    <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h}--></p><!--{/if}--></label>
151                </td>
152            </tr>
153            <!--{/section}-->
154        </table>
155    </div>
156    <!--{/if}-->
157
158    <div class="payarea">
159        <h2>お支払方法の指定</h2>
160        <p class="select-msg">お支払方法をご選択ください。</p>
161        <p class="non-select-msg">まずはじめに、配送方法を選択ください。</p>
162
163        <!--{assign var=key value="payment_id"}-->
164        <!--{if $arrErr[$key] != ""}-->
165        <p class="attention"><!--{$arrErr[$key]}--></p>
166        <!--{/if}-->
167        <table summary="お支払方法選択" id="payment" class="payment">
168          <thead>
169            <tr>
170                <th class="select">選択</th>
171                <th colspan="<!--{if !$img_show}-->2<!--{else}-->3<!--{/if}-->" id="payment_method">お支払方法</th>
172            </tr>
173          </thead>
174          <tbody>
175            <!--{section name=cnt loop=$arrPayment}-->
176            <tr>
177                <td class="centertd"><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}--> />
178                </td>
179                <td class="right">
180                    <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
181                </td>
182                <!--{if $img_show}-->
183                    <td>
184                        <!--{if $arrPayment[cnt].payment_image != ""}-->
185                            <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
186                        <!--{/if}-->
187                    </td>
188                <!--{/if}-->
189            </tr>
190            <!--{/section}-->
191          </tbody>
192        </table>
193    </div>
194
195    <!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
196    <div class="payarea02">
197        <h2>お届け時間の指定</h2>
198        <p class="select-msg">ご希望の方は、お届け時間を選択してください。</p>
199        <p class="non-select-msg">まずはじめに、配送方法を選択ください。</p>
200        <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
201        <!--{assign var=index value=$shippingItem.shipping_id}-->
202        <!--{if $is_multiple}-->
203        <div class="delivdate">
204                ▼<!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}--><br />
205                <!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}-->
206        </div>
207        <!--{/if}-->
208        <div class="delivdate">
209            <!--★お届け日★-->
210            <!--{assign var=key value="deliv_date`$index`"}-->
211            <span class="attention"><!--{$arrErr[$key]}--></span>
212            お届け日:
213            <!--{if !$arrDelivDate}-->
214                ご指定頂けません。
215            <!--{else}-->
216                <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
217                    <option value="" selected="">指定なし</option>
218                    <!--{html_options options=$arrDelivDate selected=$arrForm[$key].value}-->
219                </select>
220            <!--{/if}-->
221        </div>
222        <div class="delivdate02">
223            <!--★お届け時間★-->
224            <!--{assign var=key value="deliv_time_id`$index`"}-->
225            <span class="attention"><!--{$arrErr[$key]}--></span>
226            お届け時間:
227            <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
228                <option value="" selected="">指定なし</option>
229                <!--{html_options options=$arrDelivTime selected=$arrForm[$key].value}-->
230            </select>
231        </div>
232        <!--{/foreach}-->
233    </div>
234    <!--{/if}-->
235
236    <div class="payarea02">
237        <h2>その他お問い合わせ</h2>
238        <p>その他お問い合わせ事項がございましたら、こちらにご入力ください。</p>
239        <div>
240            <!--★その他お問い合わせ事項★-->
241            <!--{assign var=key value="message"}-->
242            <span class="attention"><!--{$arrErr[$key]}--></span>
243            <textarea name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" cols="80" rows="8" class="area660" wrap="hard"><!--{$arrForm[$key].value|h}--></textarea>
244        </div>
245        <div>
246            <span class="attention"> (<!--{$smarty.const.LTEXT_LEN}-->文字まで)</span>
247        </div>
248    </div>
249
250    <!-- ▼ポイント使用 ここから -->
251    <!--{if $tpl_login == 1 && $smarty.const.USE_POINT !== false}-->
252        <div class="pointarea">
253            <h2>ポイント使用の指定</h2>
254
255                <p><span class="attention">1ポイントを1円</span>として使用する事ができます。<br />
256                    使用する場合は、「ポイントを使用する」にチェックを入れた後、使用するポイントをご記入ください。</p>
257            <div>
258                <p><!--{$name01|h}--> <!--{$name02|h}-->様の、現在の所持ポイントは「<em><!--{$tpl_user_point|default:0|number_format}-->Pt</em>」です。</p>
259                <p>今回ご購入合計金額:<span class="paymentprice"><!--{$arrPrices.subtotal|number_format}-->円</span> <span class="attention">(送料、手数料を含みません。)</span></p>
260                <ul id="paymentP">
261                    <li><input class="radio_btn" type="radio" id="point_on" name="point_check" value="1" <!--{$arrForm.point_check.value|sfGetChecked:1}--> onclick="fnCheckInputPoint();" /><label for="point_on">ポイントを使用する</label></li>
262                     <!--{assign var=key value="use_point"}-->
263
264                     <li class="underline">今回のお買い物で、<input type="number" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|default:$tpl_user_point}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="6" class="box100 pointP" />&nbsp;ポイントを使用する。<span class="attention"><!--{$arrErr[$key]}--></span></li>
265                     <li><input class="radio_btn" type="radio" id="point_off" name="point_check" value="2" <!--{$arrForm.point_check.value|sfGetChecked:2}--> onclick="fnCheckInputPoint();" /><label for="point_off">ポイントを使用しない</label></li>
266                </ul>
267            </div>
268        </div>
269    <!--{/if}-->
270    <!-- ▲ポイント使用 ここまで -->
271
272    <div class="tblareabtn">
273        <p><input type="submit" value="次へ" class="spbtn spbtn-shopping" width="130" height="30" alt="次へ" name="next" id="next" /></p>
274        <p><a href="<!--{$tpl_back_url|h}-->" class="spbtn spbtn-medeum">戻る</a></p>
275    </div>
276</form>
277<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.