forked from thirtybees/niara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
discount.tpl
87 lines (80 loc) · 3.26 KB
/
discount.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
{capture name=path}
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">{l s='My account'}</a>
<span class="navigation-pipe">{$navigationPipe}</span>
<span class="navigation_page">{l s='My vouchers'}</span>
{/capture}
<h1 class="page-heading">{l s='My vouchers'}</h1>
{if isset($cart_rules) && count($cart_rules) && $nb_cart_rules}
<div class="table-responsive">
<table class="discount table table-bordered">
<thead>
<tr>
<th class="discount_code">{l s='Code'}</th>
<th class="discount_description">{l s='Description'}</th>
<th class="discount_quantity">{l s='Quantity'}</th>
<th class="discount_value">{l s='Value'}*</th>
<th class="discount_minimum">{l s='Minimum'}</th>
<th class="discount_cumulative">{l s='Cumulative'}</th>
<th class="discount_expiration_date">{l s='Expiration date'}</th>
</tr>
</thead>
<tbody>
{foreach from=$cart_rules item=discountDetail name=myLoop}
<tr>
<td class="discount_code">{$discountDetail.code}</td>
<td class="discount_description">{$discountDetail.name}</td>
<td class="discount_quantity">{$discountDetail.quantity_for_user}</td>
<td class="discount_value">
{if $discountDetail.reduction_percent > 0}
{$discountDetail.reduction_percent|escape:'html':'UTF-8'}%
{/if}
{if $discountDetail.reduction_amount > 0}
{if $discountDetail.reduction_percent > 0} + {/if}
{convertPrice price=$discountDetail.reduction_amount} ({if $discountDetail.reduction_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if})
{/if}
{if $discountDetail.free_shipping}
{if $discountDetail.reduction_percent > 0 || $discountDetail.reduction_amount > 0} + {/if}
{l s='Free shipping'}
{/if}
{* .gift_product_name avaialable since 1.6.1.6 *}
{if !empty($discountDetail.gift_product_name)}
{if $discountDetail.gift_product > 0}
{if $discountDetail.reduction_percent > 0 || $discountDetail.reduction_amount > 0 || $discountDetail.gift_product} + {/if}
{$discountDetail.gift_product_name} {l s='Free %s!' sprintf=$discountDetail.gift_product_name}!
{/if}
{/if}
</td>
<td class="discount_minimum">
{if $discountDetail.minimal == 0}
{l s='None'}
{else}
{convertPrice price=$discountDetail.minimal}
{/if}
</td>
<td class="discount_cumulative">
{if $discountDetail.cumulable == 1}
{l s='Yes'}
{else}
{l s='No'}
{/if}
</td>
<td class="discount_expiration_date">
{dateFormat date=$discountDetail.date_to}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{else}
<div class="alert alert-warning">{l s='You do not have any vouchers.'}</div>
{/if}
<nav>
<ul class="pager">
<li class="previous">
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
{if $isRtl}→{else}←{/if} {l s='Back to your account'}
</a>
</li>
</ul>
</nav>