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

Revision 23494, 15.5 KB checked in by pineray, 10 years ago (diff)

#2386 PHP 警告撲滅 for 2.13.3

ロケール処理も考慮に入れて、Smartyの修飾子で対応するように変更.

  • 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-2013 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('指定なし').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('通信中にエラーが発生しました。カート画面に移動します。');
103            location.href = '<!--{$smarty.const.CART_URL}-->';
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="購入手続きの流れ" />
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|h}-->" id="deliv_id" />
135            <!--{else}-->
136            <div class="pay_area">
137                <h3>配送方法の指定</h3>
138                <p>配送方法をご選択ください。</p>
139
140                <!--{if $arrErr[$key] != ""}-->
141                <p class="attention"><!--{$arrErr[$key]}--></p>
142                <!--{/if}-->
143                <table summary="配送方法選択">
144                    <col width="20%" />
145                    <col width="80%" />
146                    <tr>
147                        <th class="alignC">選択</th>
148                        <th class="alignC" colspan="2">配送方法</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>お支払方法の指定</h3>
165                <p class="select-msg">お支払方法をご選択ください。</p>
166                <p class="non-select-msg">まずはじめに、配送方法を選択ください。</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="お支払方法選択" id="payment">
173                    <col width="20%" />
174                    <col width="80%" />
175                    <thead>
176                        <tr>
177                            <th class="alignC">選択</th>
178                            <th class="alignC" colspan="<!--{if !$img_show}-->2<!--{else}-->3<!--{/if}-->" id="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>お届け時間の指定</h3>
204                <p class="select-msg">ご希望の方は、お届け時間を選択してください。</p>
205                <p class="non-select-msg">まずはじめに、配送方法を選択ください。</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                    お届け日:
217                    <!--{if !$arrDelivDate}-->
218                        ご指定頂けません。
219                    <!--{else}-->
220                        <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
221                            <option value="" selected="">指定なし</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                    お届け時間:
230                    <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
231                        <option value="" selected="">指定なし</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>ポイント使用の指定</h3>
244                        <p><span class="attention">1ポイントを<!--{$smarty.const.POINT_VALUE|n2s}-->円</span>として使用する事ができます。<br />
245                            使用する場合は、「ポイントを使用する」にチェックを入れた後、使用するポイントをご記入ください。
246                        </p>
247                        <div class="point_announce">
248                            <p><span class="user_name"><!--{$name01|h}--> <!--{$name02|h}-->様</span>の、現在の所持ポイントは「<span class="point"><!--{$tpl_user_point|default:0|n2s}-->Pt</span>」です。<br />
249                                今回ご購入合計金額:<span class="price"><!--{$arrPrices.subtotal|n2s}-->円</span> <span class="attention">(送料、手数料を含みません。)</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="eccube.togglePointForm();" /><label for="point_on">ポイントを使用する</label>
254                                    <!--{assign var=key value="use_point"}--><br />
255                                今回のお買い物で、<input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|default:$tpl_user_point}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box60" />&nbsp;Ptを使用する。<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="eccube.togglePointForm();" /><label for="point_off">ポイントを使用しない</label></li>
258                            </ul>
259                    </div>
260                </div>
261            <!--{/if}-->
262            <!-- ▲ポイント使用 -->
263
264            <div class="pay_area02">
265                <h3>その他お問い合わせ</h3>
266                <p>その他お問い合わせ事項がございましたら、こちらにご入力ください。</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"> (<!--{$smarty.const.LTEXT_LEN}-->文字まで)</p>
273                </div>
274            </div>
275
276            <div class="btn_area">
277                <ul>
278                    <li>
279                    <a href="?mode=return">
280                        <img class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/button/btn_back.jpg" alt="戻る" border="0" name="back03" id="back03" /></a>
281                    </li>
282                    <li>
283                        <input type="image" class="hover_change_image" src="<!--{$TPL_URLPATH}-->img/button/btn_next.jpg" alt="次へ" name="next" id="next" />
284                    </li>
285                </ul>
286            </div>
287        </form>
288    </div>
289</div>
Note: See TracBrowser for help on using the repository browser.