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

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

#1613 (ソース整形・ソースコメントの改善)

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