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

Revision 20651, 15.3 KB checked in by kotani, 13 years ago (diff)

#1144 ([フロント]購入(お支払方法・お届け時間等の指定):配送業者の「説明」コンテンツに改行コードが入っている場合改行されない)

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