source: branches/version-2_12-multilang/data/Smarty/templates/default_en/shopping/payment.tpl @ 22210

Revision 22210, 14.5 KB checked in by m_uehara, 11 years ago (diff)

#1991 & を $ に修正しました。

Line 
1<!--{*
2 * This file is part of EC-CUBE
3 *
4 * Copyright(c) 2000-2012 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_tbody = $('#payment tbody');
50                        payment_tbody.empty();
51                        for (var i in data.arrPayment) {
52                            // ラジオボタン
53                            <!--{* IE7未満対応のため name と id をベタ書きする *}-->
54                            var radio = $('<input type="radio" name="payment_id" id="pay_' + i + '" />')
55                                .val(data.arrPayment[i].payment_id);
56                            // ラベル
57                            var label = $('<label />')
58                                .attr('for', 'pay_' + i)
59                                .text(data.arrPayment[i].payment_method);
60                            // 行
61                            var tr = $('<tr />')
62                                .append($('<td />')
63                                    .addClass('alignC')
64                                    .append(radio))
65                                .append($('<td />').append(label));
66
67                            // 支払方法の画像が登録されている場合は表示
68                            if (data.img_show) {
69                                var payment_image = data.arrPayment[i].payment_image;
70                                $('th#payment_method').attr('colspan', 3);
71                                if (payment_image) {
72                                    var img = $('<img />').attr('src', '<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->' + payment_image);
73                                    tr.append($('<td />').append(img));
74                                } else {
75                                    tr.append($('<td />'));
76                                }
77                            } else {
78                                $('th#payment_method').attr('colspan', 2);
79                            }
80
81                            tr.appendTo(payment_tbody);
82                        }
83                        // お届け時間を生成
84                        var deliv_time_id_select = $('select[id^=deliv_time_id]');
85                        deliv_time_id_select.empty();
86                        deliv_time_id_select.append($('<option />').text('No designation').val(''));
87                        for (var i in data.arrDelivTime) {
88                            var option = $('<option />')
89                                .val(i)
90                                .text(data.arrDelivTime[i])
91                                .appendTo(deliv_time_id_select);
92                        }
93                    }
94                }
95            });
96        });
97
98        /**
99         * 通信エラー表示.
100         */
101        function remoteException(XMLHttpRequest, textStatus, errorThrown) {
102            alert('An error occurred during transmission. The screen will switch to the cart screen.');
103            location.href = '<!--{$smarty.const.CART_URLPATH}-->';
104        }
105
106        /**
107         * 配送方法の選択状態により表示を切り替える
108         */
109        function showForm(show) {
110            if (show) {
111                $('#payment, div.delivdate, .select-msg').show();
112                $('.non-select-msg').hide();
113            } else {
114                $('#payment, div.delivdate, .select-msg').hide();
115                $('.non-select-msg').show();
116            }
117        }
118    });
119//]]></script>
120<div id="undercolumn">
121    <div id="undercolumn_shopping">
122        <p class="flow_area">
123            <img src="<!--{$TPL_URLPATH}-->img/picture/img_flow_02.jpg" alt="Flow of purchase procedure" />
124        </p>
125        <h2 class="title"><!--{$tpl_title|h}--></h2>
126
127        <form name="form1" id="form1" method="post" action="?">
128        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
129        <input type="hidden" name="mode" value="confirm" />
130        <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" />
131
132        <!--{assign var=key value="deliv_id"}-->
133        <!--{if $is_single_deliv}-->
134            <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" id="deliv_id" />
135        <!--{else}-->
136        <div class="pay_area">
137            <h3>Designate delivery method</h3>
138            <p>Select the delivery method.</p>
139
140            <!--{if $arrErr[$key] != ""}-->
141            <p class="attention"><!--{$arrErr[$key]}--></p>
142            <!--{/if}-->
143            <table summary="Delivery method selection">
144                <col width="20%" />
145                <col width="80%" />
146                <tr>
147                    <th class="alignC">Selection</th>
148                    <th class="alignC" colspan="2">Delivery method</th>
149                </tr>
150                <!--{section name=cnt loop=$arrDeliv}-->
151                <tr>
152                    <td class="alignC"><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}--> />
153                    </td>
154                    <td>
155                        <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h|nl2br}--></p><!--{/if}--></label>
156                    </td>
157                </tr>
158                <!--{/section}-->
159            </table>
160        </div>
161        <!--{/if}-->
162
163        <div class="pay_area">
164            <h3>Designation of payment method</h3>
165            <p class="select-msg">Select the payment method.</p>
166            <p class="non-select-msg">First, select the delivery method.</p>
167
168            <!--{assign var=key value="payment_id"}-->
169            <!--{if $arrErr[$key] != ""}-->
170            <p class="attention"><!--{$arrErr[$key]}--></p>
171            <!--{/if}-->
172            <table summary="Payment method selection" id="payment">
173                <col width="20%" />
174                <col width="80%" />
175                <thead>
176                    <tr>
177                        <th class="alignC">Selection</th>
178                        <th class="alignC" colspan="<!--{if !$img_show}-->2<!--{else}-->3<!--{/if}-->" id="payment_method">Payment method</th>
179                    </tr>
180                </thead>
181                <tbody>
182                    <!--{section name=cnt loop=$arrPayment}-->
183                        <tr>
184                        <td class="alignC"><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}--> /></td>
185                        <td>
186                            <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
187                        </td>
188                        <!--{if $img_show}-->
189                            <td>
190                                <!--{if $arrPayment[cnt].payment_image != ""}-->
191                                    <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
192                                <!--{/if}-->
193                            </td>
194                        <!--{/if}-->
195                        </tr>
196                    <!--{/section}-->
197                </tbody>
198            </table>
199        </div>
200
201        <!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
202        <div class="pay_area02">
203            <h3>Designation of delivery time</h3>
204            <p class="select-msg">If you wish, please select a delivery time.</p>
205            <p class="non-select-msg">First, select the delivery method.</p>
206            <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
207            <!--{assign var=index value=$shippingItem.shipping_id}-->
208            <div class="delivdate top">
209                <!--{if $is_multiple}-->
210                    <span class="st">▼<!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}-->
211                    <!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}--></span><br/>
212                <!--{/if}-->
213                <!--★お届け日★-->
214                <!--{assign var=key value="deliv_date`$index`"}-->
215                <span class="attention"><!--{$arrErr[$key]}--></span>
216                Delivery date:
217                <!--{if !$arrDelivDate}-->
218                    Designation is not possible.
219                <!--{else}-->
220                    <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
221                        <option value="" selected="">No designation</option>
222                        <!--{assign var=shipping_date_value value=$arrForm[$key].value|default:$shippingItem.shipping_date}-->
223                        <!--{html_options options=$arrDelivDate selected=$shipping_date_value}-->
224                    </select>&nbsp;
225                <!--{/if}-->
226                <!--★お届け時間★-->
227                <!--{assign var=key value="deliv_time_id`$index`"}-->
228                <span class="attention"><!--{$arrErr[$key]}--></span>
229                Delivery time:
230                <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
231                    <option value="" selected="">No designation</option>
232                    <!--{assign var=shipping_time_value value=$arrForm[$key].value|default:$shippingItem.time_id}-->
233                    <!--{html_options options=$arrDelivTime selected=$shipping_time_value}-->
234                </select>
235            </div>
236            <!--{/foreach}-->
237        </div>
238        <!--{/if}-->
239
240        <!-- ▼ポイント使用 ここから -->
241        <!--{if $tpl_login == 1 && $smarty.const.USE_POINT !== false}-->
242            <div class="point_area">
243                <h3>Designated point usage</h3>
244                    <p>It is possible to use <span class="attention">1 point as &#036; <!--{$smarty.const.POINT_VALUE|number_format}--></span>.<br />
245                       If using points, check the box next to "Use points" and enter the number of points you want to use.
246                    </p>
247                    <div class="point_announce">
248                        <p><span class="user_name"><!--{$name01|h}--> <!--{$name02|h}--></span>, you currently have "<span class="point"><!--{$tpl_user_point|default:0|number_format}-->Pt</span>" points.<br />
249                            Total amount for this purchase:<span class="price">&#036; <!--{$arrPrices.subtotal|number_format}--></span> <span class="attention">(Does not include shipping fees and processing fees.)</span>
250                        </p>
251                        <ul>
252                            <li>
253                            <input type="radio" id="point_on" name="point_check" value="1" <!--{$arrForm.point_check.value|sfGetChecked:1}--> onclick="fnCheckInputPoint();" /><label for="point_on">Use points</label>
254                                <!--{assign var=key value="use_point"}--><br />
255                                Use <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|default:$tpl_user_point}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box60" /> Pt for this purchase.<span class="attention"><!--{$arrErr[$key]}--></span>
256                            </li>
257                            <li><input type="radio" id="point_off" name="point_check" value="2" <!--{$arrForm.point_check.value|sfGetChecked:2}--> onclick="fnCheckInputPoint();" /><label for="point_off">Do not use points</label></li>
258                        </ul>
259                </div>
260            </div>
261        <!--{/if}-->
262        <!-- ▲ポイント使用 ここまで -->
263
264        <div class="pay_area02">
265            <h3>Other inquiries</h3>
266            <p>If you have any other inquiries, please input them here.</p>
267            <div>
268                <!--★その他お問い合わせ事項★-->
269                <!--{assign var=key value="message"}-->
270                <span class="attention"><!--{$arrErr[$key]}--></span>
271                <textarea name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" cols="70" rows="8" class="txtarea" wrap="hard"><!--{"\n"}--><!--{$arrForm[$key].value|h}--></textarea>
272                <p class="attention">(Up to <!--{$smarty.const.LTEXT_LEN}--> characters)</p>
273            </div>
274        </div>
275
276
277        <div class="btn_area">
278            <ul>
279                <li><a class="bt04" href="?mode=return">Go back</a></li>
280                <li><button class="bt02">Next</button></li>
281            </ul>
282        </div>
283        </form>
284    </div>
285</div>
Note: See TracBrowser for help on using the repository browser.