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

Revision 21343, 15.2 KB checked in by Seasoft, 12 years ago (diff)

#1526 (typo修正・ソース整形・ソースコメントの改善)

  • 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                            <!--{* 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_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//]]>
120</script>
121<div id="undercolumn">
122    <div id="undercolumn_shopping">
123        <p class="flow_area">
124            <img src="<!--{$TPL_URLPATH}-->img/picture/img_flow_02.jpg" alt="購入手続きの流れ" />
125        </p>
126        <h2 class="title"><!--{$tpl_title|h}--></h2>
127
128        <form name="form1" id="form1" method="post" action="?">
129        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
130        <input type="hidden" name="mode" value="confirm" />
131        <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" />
132
133        <!--{assign var=key value="deliv_id"}-->
134        <!--{if $is_single_deliv}-->
135            <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" id="deliv_id" />
136        <!--{else}-->
137        <div class="pay_area">
138            <h3>配送方法の指定</h3>
139            <p>配送方法をご選択ください。</p>
140
141            <!--{if $arrErr[$key] != ""}-->
142            <p class="attention"><!--{$arrErr[$key]}--></p>
143            <!--{/if}-->
144            <table summary="配送方法選択">
145                <col width="20%" />
146                <col width="80%" />
147                <tr>
148                    <th class="alignC">選択</th>
149                    <th class="alignC" colspan="2">配送方法</th>
150                </tr>
151                <!--{section name=cnt loop=$arrDeliv}-->
152                <tr>
153                    <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}--> />
154                    </td>
155                    <td>
156                        <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h|nl2br}--></p><!--{/if}--></label>
157                    </td>
158                </tr>
159                <!--{/section}-->
160            </table>
161        </div>
162        <!--{/if}-->
163
164        <div class="pay_area">
165            <h3>お支払方法の指定</h3>
166            <p class="select-msg">お支払方法をご選択ください。</p>
167            <p class="non-select-msg">まずはじめに、配送方法を選択ください。</p>
168
169            <!--{assign var=key value="payment_id"}-->
170            <!--{if $arrErr[$key] != ""}-->
171            <p class="attention"><!--{$arrErr[$key]}--></p>
172            <!--{/if}-->
173            <table summary="お支払方法選択" id="payment">
174                <col width="20%" />
175                <col width="80%" />
176                <thead>
177                    <tr>
178                        <th class="alignC">選択</th>
179                        <th class="alignC" colspan="<!--{if !$img_show}-->2<!--{else}-->3<!--{/if}-->" id="payment_method">お支払方法</th>
180                    </tr>
181                </thead>
182                <tbody>
183                    <!--{section name=cnt loop=$arrPayment}-->
184                        <tr>
185                        <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>
186                        <td>
187                            <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
188                        </td>
189                        <!--{if $img_show}-->
190                            <td>
191                                <!--{if $arrPayment[cnt].payment_image != ""}-->
192                                    <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
193                                <!--{/if}-->
194                            </td>
195                        <!--{/if}-->
196                        </tr>
197                    <!--{/section}-->
198                </tbody>
199            </table>
200        </div>
201
202        <!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
203        <div class="pay_area02">
204            <h3>お届け時間の指定</h3>
205            <p class="select-msg">ご希望の方は、お届け時間を選択してください。</p>
206            <p class="non-select-msg">まずはじめに、配送方法を選択ください。</p>
207            <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
208            <!--{assign var=index value=$shippingItem.shipping_id}-->
209            <div class="delivdate top">
210                <!--{if $is_multiple}-->
211                    <span class="st">▼<!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}-->
212                    <!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}--></span><br/>
213                <!--{/if}-->
214                <!--★お届け日★-->
215                <!--{assign var=key value="deliv_date`$index`"}-->
216                <span class="attention"><!--{$arrErr[$key]}--></span>
217                お届け日:
218                <!--{if !$arrDelivDate}-->
219                    ご指定頂けません。
220                <!--{else}-->
221                    <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
222                        <option value="" selected="">指定なし</option>
223                        <!--{assign var=shipping_date_value value=$arrForm[$key].value|default:$shippingItem.shipping_date}-->
224                        <!--{html_options options=$arrDelivDate selected=$shipping_date_value}-->
225                    </select>&nbsp;
226                <!--{/if}-->
227                <!--★お届け時間★-->
228                <!--{assign var=key value="deliv_time_id`$index`"}-->
229                <span class="attention"><!--{$arrErr[$key]}--></span>
230                お届け時間:
231                <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
232                    <option value="" selected="">指定なし</option>
233                    <!--{assign var=shipping_time_value value=$arrForm[$key].value|default:$shippingItem.time_id}-->
234                    <!--{html_options options=$arrDelivTime selected=$shipping_time_value}-->
235                </select>
236            </div>
237            <!--{/foreach}-->
238        </div>
239        <!--{/if}-->
240
241        <!-- ▼ポイント使用 ここから -->
242        <!--{if $tpl_login == 1 && $smarty.const.USE_POINT !== false}-->
243            <div class="point_area">
244                <h3>ポイント使用の指定</h3>
245                    <p><span class="attention">1ポイントを1円</span>として使用する事ができます。<br />
246                        使用する場合は、「ポイントを使用する」にチェックを入れた後、使用するポイントをご記入ください。
247                    </p>
248                    <div class="point_announce">
249                        <p><span class="user_name"><!--{$name01|h}--> <!--{$name02|h}-->様</span>の、現在の所持ポイントは「<span class="point"><!--{$tpl_user_point|default:0|number_format}-->Pt</span>」です。<br />
250                            今回ご購入合計金額:<span class="price"><!--{$arrPrices.subtotal|number_format}-->円</span> <span class="attention">(送料、手数料を含みません。)</span>
251                        </p>
252                        <ul>
253                            <li>
254                            <input type="radio" id="point_on" name="point_check" value="1" <!--{$arrForm.point_check.value|sfGetChecked:1}--> onclick="fnCheckInputPoint();" /><label for="point_on">ポイントを使用する</label>
255                                <!--{assign var=key value="use_point"}--><br />
256                            今回のお買い物で、<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>
257                            </li>
258                            <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>
259                        </ul>
260                </div>
261            </div>
262        <!--{/if}-->
263        <!-- ▲ポイント使用 ここまで -->
264
265        <div class="pay_area02">
266            <h3>その他お問い合わせ</h3>
267            <p>その他お問い合わせ事項がございましたら、こちらにご入力ください。</p>
268            <div>
269                <!--★その他お問い合わせ事項★-->
270                <!--{assign var=key value="message"}-->
271                <span class="attention"><!--{$arrErr[$key]}--></span>
272                <textarea name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" cols="70" rows="8" class="txtarea" wrap="hard"><!--{$arrForm[$key].value|h}--></textarea>
273                <p class="attention"> (<!--{$smarty.const.LTEXT_LEN}-->文字まで)</p>
274            </div>
275        </div>
276
277
278        <div class="btn_area">
279            <ul>
280                <li>
281                <a href="<!--{$tpl_back_url|h}-->" onmouseover="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_back_on.jpg','back03')" onmouseout="chgImg('<!--{$TPL_URLPATH}-->img/button/btn_back.jpg','back03')">
282                    <img src="<!--{$TPL_URLPATH}-->img/button/btn_back.jpg" alt="戻る" border="0" name="back03" id="back03" /></a>
283                </li>
284                <li>
285                    <input type="image" onmouseover="chgImgImageSubmit('<!--{$TPL_URLPATH}-->img/button/btn_next_on.jpg',this)" onmouseout="chgImgImageSubmit('<!--{$TPL_URLPATH}-->img/button/btn_next.jpg',this)" src="<!--{$TPL_URLPATH}-->img/button/btn_next.jpg" alt="次へ" name="next" id="next" />
286                </li>
287            </ul>
288        </div>
289        </form>
290    </div>
291</div>
292<!--▲CONTENTS-->
Note: See TracBrowser for help on using the repository browser.