forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcart-summary-product-line.tpl
More file actions
128 lines (115 loc) · 4.57 KB
/
cart-summary-product-line.tpl
File metadata and controls
128 lines (115 loc) · 4.57 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
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$componentName = 'cart-summary-product'}
{block name='cart_summary_product_line'}
<div class="{$componentName}">
<div class="{$componentName}__image">
<a href="{$product.url}" title="{$product.name}">
{if $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_sm.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_sm.sources.webp} 2x"
type="image/webp"
>
{/if}
<img
class="{$componentName}__img img-fluid"
srcset="
{$product.default_image.bySize.default_xs.url},
{$product.default_image.bySize.default_sm.url} 2x"
width="{$product.default_image.bySize.default_xs.width}"
height="{$product.default_image.bySize.default_xs.height}"
loading="lazy"
alt="{$product.name}"
title="{$product.name}"
>
</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_sm.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_sm.sources.webp} 2x"
type="image/webp"
>
{/if}
<img
class="{$componentName}__img img-fluid"
srcset="
{$urls.no_picture_image.bySize.default_xs.url},
{$urls.no_picture_image.bySize.default_sm.url} 2x"
width="{$urls.no_picture_image.bySize.default_xs.width}"
height="{$urls.no_picture_image.bySize.default_xs.height}"
loading="lazy"
>
</picture>
{/if}
</a>
</div>
<div class="{$componentName}__content">
<div class="{$componentName}__content-left">
<a class="{$componentName}__link" href="{$product.url}" target="_blank" rel="noopener noreferrer nofollow">
{$product.name}
</a>
{if !empty($product.attributes)}
<div class="{$componentName}__attributes">
{foreach from=$product.attributes key="attribute" item="value"}
<div class="{$componentName}__attribute">
<span class="label">{$attribute}:</span>
<span class="value">{$value}</span>
</div>
{/foreach}
</div>
{/if}
<div class="{$componentName}__price">
<span class="label">{$product.price}</span>
{if $product.has_discount}
<span class="value">{$product.regular_price}</span>
{/if}
</div>
{if $product.unit_price_full}
<div class="{$componentName}__unit-price">
<span class="value">{$product.unit_price_full}</span>
</div>
{/if}
<div class="{$componentName}__quantity">
<span class="label">{l s='Quantity:' d='Shop.Theme.Checkout'}</span>
<span class="value">x{$product.quantity}</span>
</div>
<div class="{$componentName}__gift">
{if !empty($product.is_gift)}
<i class="{$componentName}__gift-icon material-icons" aria-hidden="true"></i> {l s='Gift(s)' d='Shop.Theme.Checkout'}
{/if}
</div>
</div>
<div class="{$componentName}__content-right">
<div class="{$componentName}__prices">
<div class="{$componentName}__total">{$product.total}</div>
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
</div>
</div>
</div>
</div>
{/block}