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

Revision 20112, 13.5 KB checked in by nanasess, 13 years ago (diff)

#990(配送設定・支払方法設定の仕様変更)

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