-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow_checkout.dwt.php
executable file
·225 lines (210 loc) · 11.1 KB
/
flow_checkout.dwt.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
/*
Name: 订单确认模板
Description: 订单确认页
Libraries: page_menu,page_header
*/
defined('IN_ECJIA') or header("HTTP/1.0 404 Not Found");exit('404 Not Found');
?>
{nocache}
<!-- {extends file="ecjia-touch.dwt.php"} -->
<!-- {block name="footer"} -->
<script type="text/javascript">
ecjia.touch.flow.init();
ecjia.touch.flow.init_pay();
$.localStorage('address_title', $(document).attr("title"));
$.localStorage('address_url', window.location.href);
</script>
<!-- {/block} -->
<!-- {block name="main-content"} -->
<!-- #EndLibraryItem -->
<div class="ecjia-checkout ecjia-padding-b">
{if $show_storepickup}
<div class="ecjia-checkout-tab">
<a href="{if $shipping_type eq 'default'}javascript:;{else}{RC_Uri::url('cart/flow/checkout')}&store_id={$store_id}&rec_id={$rec_id}{/if}"><span class="tab tab-left {if $shipping_type eq 'default' || $shipping_type eq 'default_storepickup'}active{/if}">{t domain="h5"}配送上门{/t}</span></a><a href="{if $shipping_type eq 'storepickup'}javascript:;{else}{RC_Uri::url('cart/flow/storepickup_checkout')}&store_id={$store_id}&rec_id={$rec_id}{/if}"><span class="tab tab-right {if $shipping_type eq 'storepickup'}active{/if}">{t domain="h5"}门店提货{/t}</span></a>
</div>
{/if}
<form id="theForm" name="checkForm" action="{$done_url}" method="post">
{if $shipping_type eq 'default' || $shipping_type eq 'default_storepickup'}
<a class="ecjia-default-shipping" href="{if !$address_list && !$address_id}{RC_Uri::url('user/address/add_address')}&clear=1{else}{RC_Uri::url('user/address/address_list')}&store_id={$store_id}&rec_id={$rec_id}&type=choose{/if}">
<div class="flow-address ecjia-margin-b {if !$data.consignee}choose-address{/if}">
<label class="ecjiaf-fl"><i class="icon-position"></i></label>
<!-- {if !$address_id && !$address_list} -->
<p class="notice">{t domain="h5"}新建收货地址{/t}</p>
<!-- {else} -->
{if $data.consignee}
<div class="ecjiaf-fl address-info">
<span>{$data.consignee.consignee|escape}</span>
<span>{$data.consignee.mobile}</span>
<p class="ecjia-truncate2 address-desc">{$data.consignee.province_name}{$data.consignee.city_name}{$data.consignee.district_name}{$data.consignee.street_name} {$data.consignee.address}{$data.consignee.address_info}</p>
</div>
{else}
<p class="notice">{t domain="h5"}已有地址超过配送范围,请重新选择或添加{/t}</p>
{/if}
<!-- {/if} -->
<i class="iconfont icon-jiantou-right"></i>
</div>
</a>
<section class="checklist line flex">
<a class="check_address" href='{url path="cart/flow/pay_shipping" args="address_id={$address_id}&rec_id={$rec_id}"}'>
<span class="pay_title">{t domain="h5"}支付配送{/t}</span>
<div class="ecjia-select-pay">
<div class="select-pay-left">
<span class="select_nav ecjia-truncate">{$selected_payment.pay_name}</span>
<span class="select_nav ecjia-truncate">{$selected_shipping.shipping_name}</span>
{if $selected_shipping.shipping_date_enable && $selected_shipping.shipping_date}
<span class="select_nav ecjia-truncate">{if !$selected_shipping.shipping_date}<span class="ecjia-color-999">{t domain="h5"}暂无可选时间{/t}</span>{elseif $temp.shipping_date && $temp.shipping_time}{$temp.shipping_date} {$temp.shipping_time}{/if}</span>
<input type="hidden" name="shipping_date" value="{$temp.shipping_date}" />
<input type="hidden" name="shipping_time" value="{$temp.shipping_time}" />
{/if}
</div>
<i class="iconfont icon-jiantou-right"></i>
<input type="hidden" name="shipping_id" value="{$selected_shipping.shipping_id}" />
<input type="hidden" name="pay_id" value="{$selected_payment.pay_id}" />
</div>
</a>
</section>
{/if}
{if $shipping_type eq 'storepickup'}
<div class="ecjia-storepickup">
<div class="flow-address ecjia-margin-b {if !$data.consignee}choose-address{/if}">
<label class="ecjiaf-fl"><i class="icon-store"></i></label>
<div class="ecjiaf-fl address-info">
<span>{t domain="h5" 1={$store_info.seller_name}}前往【%1】门店提货{/t}</span>
<p class="ecjia-truncate2 address-desc">{t domain="h5"}店铺电话:{/t}{$store_info.telephone}</p>
<p class="ecjia-truncate2 address-desc">{$store_info.shop_address}</p>
</div>
<a class="nopjax external" href="{$location_url}"><i class="icon-shopguide"></i></a>
</div>
</div>
<section class="checklist line border-top-none flex">
<a class="check_address" href='{url path="cart/flow/pay_pickup" args="address_id={$address_id}&rec_id={$rec_id}"}'>
<span class="pay_title">{t domain="h5"}支付提货{/t}</span>
<div class="ecjia-select-pay">
<div class="select-pay-left">
<span class="select_nav ecjia-truncate">{$selected_payment.pay_name}</span>
<span class="select_nav ecjia-truncate">{t domain="h5"}提货时间{/t}</span>
{if $temp.pickup_date && $temp.pickup_date}
<span class="select_nav ecjia-truncate">{if $temp.pickup_date && $temp.pickup_time}{$temp.pickup_date} {$temp.pickup_time}{/if}</span>
<input type="hidden" name="pickup_date" value="{$temp.pickup_date}" />
<input type="hidden" name="pickup_time" value="{$temp.pickup_time}" />
{/if}
</div>
<i class="iconfont icon-jiantou-right"></i>
<input type="hidden" name="pay_id" value="{$selected_payment.pay_id}" />
<input type="hidden" name="shipping_id" value="{$selected_shipping.shipping_id}" />
</div>
</a>
</section>
{/if}
<section class="flow-goods-list border">
{if count($data.goods_list) gt 1}<a href='{url path="cart/flow/goods_list" args="address_id={$address_id}&rec_id={$rec_id}"}'>{/if}
<ul class="{if count($data.goods_list) > 1}goods-list{else}goods-item{/if}"><!-- goods-list 多个商品隐藏商品名称,goods-item -->
<!-- {foreach from=$data.goods_list item=goods name=goods} -->
<!-- {if $smarty.foreach.goods.iteration gt 3} -->
<!-- {break} -->
<!-- {/if} -->
<li class="goods-img ecjiaf-fl ecjia-margin-r ecjia-icon">
{if 0}<img class="ecjiaf-fl" src="{$goods.img.thumb}" alt="{$goods.goods_name}" title="{$goods.goods_name}" />
{if $goods.goods_number gt 1}<span class="ecjia-icon-num top">{$goods.goods_number}</span>{/if}
<span class="ecjiaf-fl goods-name ecjia-truncate2">{$goods.goods_name}</span>{/if}
<div class="ecjiaf-fl">
<img class="ecjiaf-fl" src="{$goods.img.thumb}" alt="{$goods.goods_name}" title="{$goods.goods_name}" />
{if $goods.goods_number gt 1}<span class="ecjia-icon-num top">{$goods.goods_number}</span>{/if}
</div>
<div class="ecjiaf-fl goods-info">
<p class="ecjia-truncate2">{$goods.goods_name}</p>
<p class="ecjia-goods-attr goods-attr">
<!-- {foreach from=$goods.goods_attr item=attr} -->
{if $attr.name}{$attr.name}:{$attr.value}{/if}
<!-- {/foreach} -->
</p>
<p class="ecjia-color-red">{$goods.formated_goods_price}</p>
</div>
<span class="ecjiaf-fr goods-price"> x {$goods.goods_number}</span>
</li>
<!-- {/foreach} -->
<!-- {if count($data.goods_list) gt 1} -->
<!-- 判断不能大于4个 -->
<li class="goods-img-more">
<!-- {if count($data.goods_list) gt 3} --><i class="icon iconfont"></i>{/if}
<p class="ecjiaf-ib">{t domain="h5" 1={$total_goods_number}}共%1件{/t}</p>
<i class="icon iconfont icon-right"></i>
</li>
<!-- {/if} -->
</ul>
{if count($data.goods_list) gt 1}</a>{/if}
</section>
<section class="checklist border note">
<span class="note-title">{t domain="h5"}备注{/t}</span>
<input class="note" type="text" name="note" placeholder='{t domain="h5"}我们将尽力满足您的要求{/t}' />
</section>
<div class="ecjia-margin-b"></div>
{if $data.allow_can_invoice}
<section class="checklist">
<a class="check_address" href='{url path="cart/flow/invoice" args="address_id={$address_id}&rec_id={$rec_id}"}'>
<span>{t domain="h5"}发票信息{/t}<!-- invoice --></span>
<i class="iconfont icon-jiantou-right"></i>
<span class="ecjiaf-fr select_nav ecjia-truncate">{if $temp.inv_type_name == 'personal'}{t}个人{/t}{else if}{$temp.inv_payee}{/if}</span>
<input type="hidden" name="inv_title_type" value="{$temp.inv_type_name}" />
<input type="hidden" name="inv_payee" value="{$temp.inv_payee}" />
<input type="hidden" name="inv_tax_no" value="{$temp.inv_bill_code}" />
<input type="hidden" name="inv_content" value="{$temp.inv_content}" />
<input type="hidden" name="inv_type" value="{$temp.inv_type}" />
</a>
</section>
<div class="ecjia-margin-b"></div>
{/if}
{if $data.allow_use_bonus}
<section class="checklist">
{if $data.bonus|count gt 0}
<a class="check_address" href='{url path="cart/flow/bonus" args="address_id={$address_id}&rec_id={$rec_id}"}'>
<span>{t domain="h5"}使用红包{/t}</span>
<span class="ecjia-tag">{t domain="h5" 1={count($data.bonus)}}%1个可用{/t}</span>
<i class="iconfont icon-jiantou-right"></i>
<span class="ecjiaf-fr select_nav_short ecjia-truncate">{$data.bonus[$temp.bonus].bonus_name}</span>
<input type="hidden" name="bonus" value="{$temp.bonus}">
</a>
{else}
<a href='javascript:;' title='{t domain="h5"}不可用{/t}'>
<span class="ecjia-color-999">{t domain="h5"}使用红包{/t}</span>
<span class="ecjia-tag ecjia-tag-disable">{t domain="h5"}不可用{/t}</span>
</a>
{/if}
</section>
{/if}
{if $data.allow_use_integral}
<section class="checklist ecjia-margin-b">
{if $data.order_max_integral eq 0}
<a href='javascript:;' title='{t domain="h5"}不可用{/t}'>
<span class="ecjia-color-999">{t domain="h5" 1={$integral_name}}使用%1{/t}</span>
<span class="ecjia-tag ecjia-tag-disable">{t domain="h5"}不可用{/t}</span>
</a>
{else}
<a class="check_address" href='{url path="cart/flow/integral" args="address_id={$address_id}&rec_id={$rec_id}"}'>
<span>{t domain="h5" 1={$integral_name}}使用%1{/t}</span>
{if $temp.integral gt 0}
<span class="ecjiaf-fr select_nav ecjia-truncate">{$temp.integral}{$integral_name}</span>
<input type="hidden" name="integral" value="{$temp.integral}" />
{else}
<span class="ecjia-tag">{if $data.your_integral lt $data.order_max_integral }{$data.your_integral}{else}{$data.order_max_integral}{/if}{$integral_name}{t domain="h5"}可用{/t}</span>
{/if}
<i class="iconfont icon-jiantou-right"></i>
</a>
{/if}
</section>
{/if}
<section class="ecjia-margin-t checkout-select checkout-pro-list">
<!-- #BeginLibraryItem "/library/order_total.lbi" --><!-- #EndLibraryItem -->
</section>
<p class="ecjia-margin-t ecjia-margin-l ecjia-color-green">{t domain="h5" 1={$store_info.seller_name}}本订单由%1发货并提供售后服务{/t}</p>
<section class="ecjia-margin-t">
<input type="hidden" name="rec_id" value="{$rec_id}">
<input type="hidden" name="address_id" value="{$address_id}">
<input class="btn btn-info" name="submit" type="submit" value='{t domain="h5" 1={$total.amount_formated}}提交订单(应付%1){/t}'/>
<input name="step" type="hidden" value="done" />
</section>
</form>
</div>
<!-- {/block} -->
{/nocache}