forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorder-confirmation-table.tpl
More file actions
177 lines (158 loc) · 7.26 KB
/
order-confirmation-table.tpl
File metadata and controls
177 lines (158 loc) · 7.26 KB
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
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$componentName = 'order-confirmation'}
<div class="{$componentName}__table {block name='order-confirmation-classes'}{/block}">
<div class="{$componentName}__products">
{foreach from=$products item=product}
<div class="{$componentName}__product">
<div class="{$componentName}__product-image">
{if !empty($product.default_image)}
<picture>
{if isset($product.default_image.bySize.default_xs.sources.avif)}
<source
srcset="
{$product.default_image.bySize.default_xs.sources.avif},
{$product.default_image.bySize.default_md.sources.avif} 2x"
type="image/avif"
>
{/if}
{if isset($product.default_image.bySize.default_xs.sources.webp)}
<source
srcset="
{$product.default_image.bySize.default_xs.sources.webp},
{$product.default_image.bySize.default_md.sources.webp} 2x"
type="image/webp"
>
{/if}
<img
class="{$componentName}__product-img img-fluid"
srcset="
{$product.default_image.bySize.default_xs.url},
{$product.default_image.bySize.default_md.url} 2x"
src="{$product.default_image.bySize.default_xs.url}"
loading="lazy"
width="{$product.default_image.bySize.default_xs.width}"
height="{$product.default_image.bySize.default_xs.height}"
alt="{$product.default_image.legend}"
title="{$product.default_image.legend}"
>
</picture>
{else}
<picture>
{if isset($urls.no_picture_image.bySize.default_xs.sources.avif)}
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.avif},
{$urls.no_picture_image.bySize.default_md.sources.avif} 2x"
type="image/avif"
>
{/if}
{if isset($urls.no_picture_image.bySize.default_xs.sources.webp)}
<source
srcset="
{$urls.no_picture_image.bySize.default_xs.sources.webp},
{$urls.no_picture_image.bySize.default_md.sources.webp} 2x"
type="image/webp"
>
{/if}
<img
class="{$componentName}__product-img img-fluid"
srcset="
{$urls.no_picture_image.bySize.default_xs.url},
{$urls.no_picture_image.bySize.default_md.url} 2x"
src="{$urls.no_picture_image.bySize.default_xs.url}"
loading="lazy"
width="{$urls.no_picture_image.bySize.default_xs.width}"
height="{$urls.no_picture_image.bySize.default_xs.height}"
>
</picture>
{/if}
{if !empty($product.quantity) && $product.quantity > 1}
<p class="{$componentName}__product-quantity">{l s='x%quantity%' sprintf=['%quantity%' => $product.quantity] d='Shop.Theme.Global'}</p>
{/if}
</div>
<div class="{$componentName}__product-content">
<div class="{$componentName}__product-details">
{if $add_product_link}
<a class="{$componentName}__product-link" href="{$product.url}" target="_blank">
{/if}
<p class="{$componentName}__product-title">{$product.name}</p>
{if $add_product_link}
</a>
{/if}
{if !empty($product.attributes)}
<div class="{$componentName}__product-attributes">
{foreach from=$product.attributes key="attribute" item="value"}
<div class="{$componentName}__product-attribute">
<span class="label">{$attribute}:</span>
<span class="value">{$value}</span>
</div>
{/foreach}
</div>
{/if}
{if !empty($product.reference)}
<p class="{$componentName}__product-reference">{l s='Reference:' d='Shop.Theme.Catalog'} {$product.reference}</p>
{/if}
{if $product.price}
<div class="{$componentName}__product-price">
{$product.price}
</div>
{/if}
{if is_array($product.customizations) && $product.customizations|count}
{include file='catalog/_partials/product-customization-modal.tpl' product=$product}
{/if}
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
</div>
<div class="{$componentName}__product-prices">
{if !empty($product.is_gift)}
<div class="{$componentName}__product-gift">
<i class="{$componentName}__product-gift-icon material-icons" aria-hidden="true"></i>{$product.quantity} {l s='Gift(s)' d='Shop.Theme.Checkout'}
</div>
{else}
<div class="{$componentName}__product-total">
{$product.total}
</div>
{/if}
</div>
</div>
</div>
{/foreach}
</div>
<hr>
<div class="{$componentName}__subtotals">
{foreach $subtotals as $subtotal}
{if $subtotal !== null && $subtotal.type !== 'tax' && $subtotal.label !== null}
<div class="{$componentName}__line">
<div class="{$componentName}__line-label">{$subtotal.label}</div>
<div class="{$componentName}__line-value">{if 'discount' == $subtotal.type}- {/if}{$subtotal.value}</div>
</div>
{/if}
{/foreach}
</div>
<hr>
<div class="{$componentName}__totals">
{if !$configuration.display_prices_tax_incl && $configuration.taxes_enabled}
<div class="{$componentName}__line {$componentName}__line--bold">
<div class="{$componentName}__line-label">{$totals.total.label} {$labels.tax_short}</div>
<div class="{$componentName}__line-value">{$totals.total.value}</div>
</div>
<div class="{$componentName}__line {$componentName}__line--bold">
<div class="{$componentName}__line-label">{$totals.total_including_tax.label}</div>
<div class="{$componentName}__line-value">{$totals.total_including_tax.value}</div>
</div>
{else}
<div class="{$componentName}__line {$componentName}__line--bold">
<div class="{$componentName}__line-label">{$totals.total.label} {if $configuration.taxes_enabled}{$labels.tax_short}{/if}</div>
<div class="{$componentName}__line-value">{$totals.total.value}</div>
</div>
{/if}
{if $subtotals.tax !== null && $subtotals.tax.label !== null}
<div class="{$componentName}__line {$componentName}__line--bold">
<div class="{$componentName}__line-label">{l s='%label%:' sprintf=['%label%' => $subtotals.tax.label] d='Shop.Theme.Global'}</div>
<div class="{$componentName}__line-value">{$subtotals.tax.value}</div>
</div>
{/if}
</div>
</div>