-
Notifications
You must be signed in to change notification settings - Fork 28
/
order-payment.tpl
327 lines (317 loc) · 13.8 KB
/
order-payment.tpl
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{*
* =|= Checkout - Payment =======================================
*
* Payment section of checkout. Lists enabled payment modules.
* ==============================================================
*}
{if !$opc}
<script type="text/javascript">
// <![CDATA[
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
var currencyRate = '{$currencyRate|floatval}';
var currencyFormat = '{$currencyFormat|intval}';
var currencyBlank = '{$currencyBlank|intval}';
var txtProduct = "{l s='product'}";
var txtProducts = "{l s='products'}";
// ]]>
</script>
{capture name=path}{l s='Your payment method'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
{if !$opc}<h1>{l s='Choose your payment method'}</h1>{else}<h2><span>3</span> {l s='Choose your payment method'}</h2>{/if}
{if !$opc}
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
{include file="$tpl_dir./errors.tpl"}
{else}
<div id="opc_payment_methods" class="opc-main-block">
<div id="opc_payment_methods-overlay" class="opc-overlay" style="display: none;"></div>
{/if}
<div class="paiement_block">
<div id="HOOK_TOP_PAYMENT">{$HOOK_TOP_PAYMENT}</div>
{if $HOOK_PAYMENT}
{if !$opc}
<div id="order-detail-content" class="table_block">
<table id="cart_summary" class="std">
<thead>
<tr>
<th class="cart_product first_item">{l s='Product'}</th>
<th class="cart_description item">{l s='Description'}</th>
<th class="cart_availability item">{l s='Avail.'}</th>
<th class="cart_unit item">{l s='Unit price'}</th>
<th class="cart_quantity item">{l s='Qty'}</th>
<th class="cart_total last_item">{l s='Total'}</th>
</tr>
</thead>
<tfoot>
{if $use_taxes}
{if $priceDisplay}
<tr class="cart_total_price">
<td colspan="5">{if $display_tax_label}{l s='Total products (tax excl.):'}{else}{l s='Total products:'}{/if}</td>
<td class="price" id="total_product">{displayPrice price=$total_products}</td>
</tr>
{else}
<tr class="cart_total_price">
<td colspan="5">{if $display_tax_label}{l s='Total products (tax incl.):'}{else}{l s='Total products:'}{/if}</td>
<td class="price" id="total_product">{displayPrice price=$total_products_wt}</td>
</tr>
{/if}
{else}
<tr class="cart_total_price">
<td colspan="5">{l s='Total products:'}</td>
<td class="price" id="total_product">{displayPrice price=$total_products}</td>
</tr>
{/if}
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
<td colspan="5">
{if $use_taxes}
{if $priceDisplay}
{if $display_tax_label}{l s='Total vouchers (tax excl.):'}{else}{l s='Total vouchers:'}{/if}
{else}
{if $display_tax_label}{l s='Total vouchers (tax incl.):'}{else}{l s='Total vouchers:'}{/if}
{/if}
{else}
{l s='Total vouchers:'}
{/if}
</td>
<td class="price-discount price" id="total_discount">
{if $use_taxes}
{if $priceDisplay}
{displayPrice price=$total_discounts_tax_exc}
{else}
{displayPrice price=$total_discounts}
{/if}
{else}
{displayPrice price=$total_discounts_tax_exc}
{/if}
</td>
</tr>
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
<td colspan="5">
{if $use_taxes}
{if $priceDisplay}
{if $display_tax_label}{l s='Total gift-wrapping (tax excl.):'}{else}{l s='Total gift-wrapping:'}{/if}
{else}
{if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if}
{/if}
{else}
{l s='Total gift-wrapping:'}
{/if}
</td>
<td class="price-discount price" id="total_wrapping">
{if $use_taxes}
{if $priceDisplay}
{displayPrice price=$total_wrapping_tax_exc}
{else}
{displayPrice price=$total_wrapping}
{/if}
{else}
{displayPrice price=$total_wrapping_tax_exc}
{/if}
</td>
</tr>
{if $total_shipping_tax_exc <= 0 && !isset($virtualCart)}
<tr class="cart_total_delivery">
<td colspan="5">{l s='Shipping:'}</td>
<td class="price" id="total_shipping">{l s='Free Shipping!'}</td>
</tr>
{else}
{if $use_taxes}
{if $priceDisplay}
<tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}}</td>
<td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
</tr>
{else}
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td>
<td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
</tr>
{/if}
{else}
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
<td colspan="5">{l s='Total shipping:'}</td>
<td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
</tr>
{/if}
{/if}
{if $use_taxes}
<tr class="cart_total_price">
<td colspan="5" id="cart_voucher" class="cart_voucher">
{if $voucherAllowed}
{if isset($errors_discount) && $errors_discount}
<ul class="error">
{foreach from=$errors_discount key=k item=error}
<li>{$error|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
{/if}
{/if}
</td>
<td colspan="2" class="price total_price_container" id="total_price_container">
<p>{l s='Total:'}</p>
<span>{displayPrice price=$total_price}</span>
</td>
</tr>
{else}
<tr class="cart_total_price">
<td colspan="5" id="cart_voucher" class="cart_voucher">
{if $voucherAllowed}
<div id="cart_voucher" class="table_block">
{if isset($errors_discount) && $errors_discount}
<ul class="error">
{foreach from=$errors_discount key=k item=error}
<li>{$error|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
{/if}
{if $voucherAllowed}
<form action="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}" method="post" id="voucher">
<fieldset>
<h4><label for="discount_name">{l s='Vouchers'}</label></h4>
<p>
<input type="text" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
</p>
<p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='ok'}" class="button" /></p>
{if $displayVouchers}
<h4 class="title_offers">{l s='Take advantage of our offers:'}</h4>
<div id="display_cart_vouchers">
{foreach from=$displayVouchers item=voucher}
<span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
{/foreach}
</div>
{/if}
</fieldset>
</form>
{/if}
</div>
{/if}
</td>
<td colspan="2" class="price total_price_container" id="total_price_container">
<p>{l s='Total:'}</p>
<span id="total_price">{displayPrice price=$total_price_without_tax}</span>
</td>
</tr>
{/if}
</tfoot>
<tbody>
{foreach from=$products item=product name=productLoop}
{assign var='productId' value=$product.id_product}
{assign var='productAttributeId' value=$product.id_product_attribute}
{assign var='quantityDisplayed' value=0}
{assign var='cannotModify' value=1}
{assign var='odd' value=$product@iteration%2}
{assign var='noDeleteButton' value=1}
{* Display the product line *}
{include file="$tpl_dir./shopping-cart-product-line.tpl"}
{* Then the customized datas ones*}
{if isset($customizedDatas.$productId.$productAttributeId)}
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization'}
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item">
<td colspan="4">
{foreach from=$customization.datas key='type' item='datas'}
{if $type == $CUSTOMIZE_FILE}
<div class="customizationUploaded">
<ul class="customizationUploaded">
{foreach from=$datas item='picture'}
<li>
<img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" />
</li>
{/foreach}
</ul>
</div>
{elseif $type == $CUSTOMIZE_TEXTFIELD}
<ul class="typedText">
{foreach from=$datas item='textField' name='typedText'}
<li>
{if $textField.name}
{l s='%s:' sprintf=$textField.name}
{else}
{l s='Text #%s:' sprintf=$smarty.foreach.typedText.index+1}
{/if}
{$textField.value}
</li>
{/foreach}
</ul>
{/if}
{/foreach}
</td>
<td class="cart_quantity">
{if isset($cannotModify) AND $cannotModify == 1}
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
{else}
<div style="float:right">
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
</div>
<div id="cart_quantity_button" style="float:left">
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
</a>
{else}
<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
</a>
{/if}
</div>
<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}"/>
{/if}
</td>
<td class="cart_total"></td>
</tr>
{assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
{/foreach}
{* If it exists also some uncustomized products *}
{if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl"}{/if}
{/if}
{/foreach}
{assign var='last_was_odd' value=$product@iteration%2}
{foreach $gift_products as $product}
{assign var='productId' value=$product.id_product}
{assign var='productAttributeId' value=$product.id_product_attribute}
{assign var='quantityDisplayed' value=0}
{assign var='odd' value=($product@iteration+$last_was_odd)%2}
{assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)}
{assign var='cannotModify' value=1}
{* Display the gift product line *}
{include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
{/foreach}
</tbody>
{if count($discounts)}
<tbody>
{foreach from=$discounts item=discount name=discountLoop}
<tr class="cart_discount {if $smarty.foreach.discountLoop.last}last_item{elseif $smarty.foreach.discountLoop.first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
<td class="cart_discount_name" colspan="2">{$discount.name}</td>
<td class="cart_discount_description" colspan="3">{$discount.description}</td>
<td class="cart_discount_price">
<span class="price-discount">
{if $discount.value_real > 0}
{if !$priceDisplay}
{displayPrice price=$discount.value_real*-1}
{else}
{displayPrice price=$discount.value_tax_exc*-1}
{/if}
{/if}
</span>
</td>
</tr>
{/foreach}
</tbody>
{/if}
</table>
</div>
{/if}
{if $opc}<div id="opc_payment_methods-content">{/if}
<div id="HOOK_PAYMENT">{$HOOK_PAYMENT}</div>
{if $opc}</div>{/if}
{else}
<p class="warning">{l s='No payment modules have been installed.'}</p>
{/if}
{if !$opc}
<p class="cart_navigation"><a href="{$link->getPageLink('order', true, NULL, "step=2")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a></p>
{else}
</div>
{/if}
</div>