source: branches/version-2_11-dev/data/Smarty/templates/sphone/shopping/payment.tpl @ 21094

Revision 21094, 12.8 KB checked in by 468, 13 years ago (diff)

#1413 スマートフォン版テンプレートファイル修正対応

  • 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                            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('centertd')
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 
123<!--▼コンテンツここから -->
124<section id="undercolumn">
125
126<h2 class="title"><!--{$tpl_title|h}--></h2>
127
128<form name="form1" id="form1" method="post" action="<!--{$smarty.const.HTTP_URL}-->shopping/payment.php">
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<!--★インフォメーション★-->
134<div class="information end">
135  <p>各項目をを選択してください。</p> 
136</div>
137
138<!--★配送方法の指定★-->
139<!--{assign var=key value="deliv_id"}-->
140 <!--{if $is_single_deliv}-->
141 <input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" id="deliv_id" />
142  <!--{else}-->
143<section class="pay_area">
144 <h3 class="subtitle">配送方法の指定</h3>
145  <!--{if $arrErr[$key] != ""}-->
146  <p class="attention"><!--{$arrErr[$key]}--></p>
147  <!--{/if}-->
148  <ul>
149  <!--{section name=cnt loop=$arrDeliv}-->
150   <li>
151     <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}--> class="data-role-none" />
152     <label for="deliv_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrDeliv[cnt].name|h}--><!--{if $arrDeliv[cnt].remark != ""}--><p><!--{$arrDeliv[cnt].remark|h}--></p><!--{/if}--></label>
153   </li>
154  <!--{/section}-->
155  </ul>
156</section>
157<!--{/if}-->
158
159<!--★インフォメーション★-->
160<section class="pay_area">
161 <h3 class="subtitle">お支払方法の指定</h3>
162  <!--{assign var=key value="payment_id"}-->
163  <!--{if $arrErr[$key] != ""}-->
164    <p class="attention"><!--{$arrErr[$key]}--></p>
165  <!--{/if}-->
166  <ul>
167  <!--{section name=cnt loop=$arrPayment}-->
168   <li>
169     <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}--> class="data-role-none" />
170     <label for="pay_<!--{$smarty.section.cnt.iteration}-->"><!--{$arrPayment[cnt].payment_method|h}--><!--{if $arrPayment[cnt].note != ""}--><!--{/if}--></label>
171     <!--{if $img_show}-->
172         <!--{if $arrPayment[cnt].payment_image != ""}-->
173             <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrPayment[cnt].payment_image}-->" />
174         <!--{/if}-->
175     <!--{/if}-->
176   </li>
177  <!--{/section}-->
178  </ul>
179</section>
180
181
182<!--★お届け時間の指定★-->
183<!--{if $cartKey != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
184<section class="pay_area02">
185 <h3 class="subtitle">お届け時間の指定</h3>
186
187 <div class="form_area">
188  <!--{foreach item=shippingItem name=shippingItem from=$arrShipping}-->
189  <!--{assign var=index value=$shippingItem.shipping_id}-->
190 
191 <!--▼フォームボックスここから -->
192  <div class="formBox">
193
194    <div class="box_header">
195      お届け先<!--{$smarty.foreach.shippingItem.iteration}-->
196        </div>
197
198  <!--{if $is_multiple}-->
199     <div class="innerBox">
200       <!--{$shippingItem.shipping_name01}--><!--{$shippingItem.shipping_name02}--><br />
201        <span class="mini"><!--{$arrPref[$shippingItem.shipping_pref]}--><!--{$shippingItem.shipping_addr01}--><!--{$shippingItem.shipping_addr02}--></span>
202          </div>
203  <!--{/if}-->
204       <div class="btn_area_btm">
205       <!--★お届け日★-->
206       <!--{assign var=key value="deliv_date`$index`"}-->
207       <span class="attention"><!--{$arrErr[$key]}--></span>
208        <!--{if !$arrDelivDate}-->
209            ご指定頂けません。
210        <!--{else}-->
211             <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong top data-role-none">
212                <option value="" selected="">お届け日:指定なし</option>
213                <!--{html_options options=$arrDelivDate selected=$arrForm[$key].value}-->
214             </select>
215<!--{/if}-->
216
217<!--★お届け時間★-->
218<!--{assign var=key value="deliv_time_id`$index`"}-->
219        <span class="attention"><!--{$arrErr[$key]}--></span>
220           <select name="<!--{$key}-->" id="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="boxLong data-role-none">
221                <option value="" selected="">お届け時間:指定なし</option>
222                <!--{html_options options=$arrDelivTime selected=$arrForm[$key].value}-->
223           </select>
224                </div>
225                  </div><!--▲formBox -->
226<!--{/foreach}-->
227
228         </div><!--▲form_area -->
229     </section>
230<!--{/if}-->
231
232
233<!--★ポイント使用の指定★-->
234<!--{if $tpl_login == 1 && $smarty.const.USE_POINT !== false}-->
235<section class="point_area">
236<h3 class="subtitle">ポイント使用の指定</h3>
237 
238 <div class="form_area">
239   <p class="fb"><span class="point">1ポイントを1円</span>として使用する事ができます。</p>
240     <div class="point_announce">
241       <p><span class="user_name">現在の所持ポイントは「<span class="price"><!--{$tpl_user_point|default:0|number_format}-->Pt</span>」です。<br />
242            今回ご購入合計金額:<span class="price"><!--{$arrPrices.subtotal|number_format}-->円</span> (送料、手数料を含みません。)</p>
243             </div>
244
245  <!--▼ポイントフォームボックスここから -->
246     <div class="formBox">
247        <div class="innerBox fb">
248           <p><input type="radio" id="point_on" name="point_check" value="1" <!--{$arrForm.point_check.value|sfGetChecked:1}--> onchange="fnCheckInputPoint();" class="data-role-none" />
249               <label for="point_on">ポイントを使用する</label></p>
250           <!--{assign var=key value="use_point"}-->
251           
252           <p class="check_point"><input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|default:$tpl_user_point}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box_point data-role-none" />ポイントを使用する。<span class="attention"><!--{$arrErr[$key]}--></span></p>
253            </div>
254       <div class="innerBox fb">
255         <input type="radio" id="point_off" name="point_check" value="2" <!--{$arrForm.point_check.value|sfGetChecked:2}--> onchange="fnCheckInputPoint();" class="data-role-none" />
256           <label for="point_off">ポイントを使用しない</label>
257         </div>
258             </div><!--▲formBox -->
259               </div><!--▲form_area -->
260                 </section>
261<!--{/if}-->
262
263<!--★その他お問い合わせ★-->
264<section class="contact_area">
265 <h3 class="subtitle">その他お問い合わせ</h3>
266  <div class="form_area">
267    <p>その他お問い合わせ事項がございましたら、こちらにご入力ください。</p>
268   
269       <!--{assign var=key value="message"}-->
270       <span class="attention"><!--{$arrErr[$key]}--></span>
271       <textarea name="<!--{$key}-->" id="etc" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" cols="62" rows="8" class="textarea data-role-none" wrap="hard"><!--{$arrForm[$key].value|h}--></textarea><br />
272       
273         </div><!--▲form_area -->
274          </section>
275
276<!--★ボタン★-->
277<div class="btn_area">
278  <ul class="btn_btm">
279    <li><a rel="external" href="javascript:void(document.form1.submit());" class="btn">確認ページへ</a></li>
280    <li><a rel="external" href="<!--{$tpl_back_url|h}-->" class="btn_back">戻る</a></li>
281     </ul>
282       </div>
283
284</form>
285</section>
286<!--▲コンテンツここまで -->
287 
288<!--{* テキストエリアのリサイズ *}-->
289<script type="text/javascript">
290  $('#etc').autoResize({limit: 9000});
291  $('#etc').keydown();
292</script>
Note: See TracBrowser for help on using the repository browser.