forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduct.tpl
More file actions
199 lines (171 loc) · 8.39 KB
/
product.tpl
File metadata and controls
199 lines (171 loc) · 8.39 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{extends file=$layout}
{block name='head' append}
<meta property="og:type" content="product">
<meta content="{$product.url}">
{if $product.cover}
<meta property="og:image" content="{$product.cover.large.url}">
{/if}
{if $product.show_price}
<meta property="product:pretax_price:amount" content="{$product.price_tax_exc}">
<meta property="product:pretax_price:currency" content="{$currency.iso_code}">
<meta property="product:price:amount" content="{$product.price_amount}">
<meta property="product:price:currency" content="{$currency.iso_code}">
{/if}
{if isset($product.weight) && ($product.weight != 0)}
<meta property="product:weight:value" content="{$product.weight}">
<meta property="product:weight:units" content="{$product.weight_unit}">
{/if}
{/block}
{block name='head_microdata_special'}
{include file='_partials/microdata/product-jsonld.tpl'}
{/block}
{block name='content'}
{* FIRST PART - PHOTO, NAME, PRICES, ADD TO CART*}
<div class="row g-4 g-xl-5 product js-product-container">
<div class="product__left col-lg-6 col-xl-7">
{block name='product_cover_thumbnails'}
{include file='catalog/_partials/product-cover-thumbnails.tpl'}
{/block}
</div>
<div class="product__col col-lg-6 col-xl-5">
{block name='product_header'}
<h1 class="h4 product__name">{block name='page_title'}{$product.name}{/block}</h1>
{/block}
{block name='product_prices'}
{include file='catalog/_partials/product-prices.tpl'}
{/block}
{block name='product_description_short'}
<div class="product__description-short rich-text">{$product.description_short nofilter}</div>
{/block}
{block name='product_customization'}
{if $product.is_customizable && count($product.customizations.fields)}
{include file='catalog/_partials/product-customization.tpl' customizations=$product.customizations}
{/if}
{/block}
<div class="product__actions js-product-actions">
{block name='product_buy'}
<form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
<input type="hidden" name="token" value="{$static_token}">
<input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
<input type="hidden" name="id_customization" value="{$product.id_customization}" id="product_customization_id" class="js-product-customization-id">
{block name='product_variants'}
{include file='catalog/_partials/product-variants.tpl'}
{/block}
{block name='product_pack'}
{if $packItems}
{include file='catalog/_partials/product-pack.tpl'}
{/if}
{/block}
{block name='product_discounts'}
{include file='catalog/_partials/product-discounts.tpl'}
{/block}
{block name='product_add_to_cart'}
{include file='catalog/_partials/product-add-to-cart.tpl'}
{/block}
{block name='product_additional_info'}
{include file='catalog/_partials/product-additional-info.tpl'}
{/block}
{block name='product_out_of_stock'}
{hook h='actionProductOutOfStock' product=$product}
{/block}
{* Input to refresh product HTML removed, block kept for compatibility with themes *}
{block name='product_refresh'}{/block}
</form>
{/block}
</div>{* /product-actions *}
</div>{* /col *}
</div>{* /row *}
{* END OF FIRST PART *}
{* SECOND PART - REASSURANCE, TABS *}
<div class="row">
<div class="col-lg-6 col-xl-5 order-lg-1">
{block name='hook_display_reassurance'}
{hook h='displayReassurance'}
{/block}
</div>
<div class="col-lg-6 col-xl-7">
{block name='product_tabs'}
<div class="product__infos accordion accordion-flush" id="product-infos-accordion">
{block name='product_description'}
{if $product.description}
<div class="info accordion-item" id="description">
<h2 class="info__title accordion-header" id="product-description-heading">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#product-description-collapse" aria-expanded="true" aria-controls="product-description-collapse">
{l s='Description' d='Shop.Theme.Catalog'}
</button>
</h2>
<div id="product-description-collapse" class="info__content accordion-collapse collapse show" data-bs-parent="#product-infos-accordion" ria-labelledby="product-description-heading">
<div class="product__description accordion-body rich-text">
{$product.description nofilter}
</div>
</div>
</div>
{/if}
{/block}
{block name='product_details'}
{include file='catalog/_partials/product-details.tpl'}
{/block}
{block name='product_attachments'}
{if $product.attachments}
<div class="info accordion-item" id="attachments">
<h2 class="info__title accordion-header" id="product-attachments-heading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#product-attachments-collapse" aria-expanded="true" aria-controls="product-attachments-collapse">
{l s='Download' d='Shop.Theme.Actions'}
</button>
</h2>
<div id="product-attachments-collapse" class="info__content accordion-collapse collapse" data-bs-parent="#product-infos-accordion" aria-labelledby="product-attachments-heading">
<div class="product__attachments accordion-body">
{foreach from=$product.attachments item=attachment}
<div class="attachment">
<p class="h5"><a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">{$attachment.name}</a></p>
<p>{$attachment.description}</p>
<a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">
{l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
</a>
</div>
{/foreach}
</div>
</div>
</div>
{/if}
{/block}
{* New collapses for module hooked content *}
{foreach from=$product.extraContent item=extra key=extraKey}
<div class="info accordion-item" id="extra-{$extraKey}" {foreach $extra.attr as $key => $val} {$key}="{$val}"{/foreach}>
<h2 class="info__title accordion-header" id="product-extra{$extraKey}-heading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#product-extra{$extraKey}-collapse" aria-expanded="true" aria-controls="product-extra{$extraKey}-collapse">
{$extra.title}
</button>
</h2>
<div id="product-extra{$extraKey}-collapse" class="info__content accordion-collapse collapse" data-bs-parent="#product-infos-accordion" aria-labelledby="product-extra{$extraKey}-heading">
<div class="accordion-body">
{$extra.content nofilter}
</div>
</div>
</div>
{/foreach}
</div>
{/block}
</div>{* /col *}
</div>{* /row *}
{* END OF SECOND PART *}
{block name='product_accessories'}
{if $accessories}
{include file='catalog/_partials/product-accessories.tpl'}
{/if}
{/block}
{block name='product_footer'}
{hook h='displayFooterProduct' product=$product category=$category}
{/block}
{block name='product_images_modal'}
{include file='catalog/_partials/product-images-modal.tpl'}
{/block}
{block name='page_footer_container'}
{block name='page_footer'}
{/block}
{/block}
{/block}