Debian Codegraph @

addons/website_sale/views/templates.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <template id="header_cart_link" name="Header Cart Link">
4 <t t-set="website_sale_cart_quantity" t-value="request.session.get('website_sale_cart_quantity', request.cart.cart_quantity) or 0"/>
5 <t t-set="show_cart" t-value="website.has_ecommerce_access()"/>
6 <li t-attf-class="#{_item_class} divider d-none"/> <!-- Make sure the cart and related menus are not folded (see autohideMenu) -->
7 <li t-attf-class="o_wsale_my_cart #{not show_cart and 'd-none'} #{_item_class}">
8 <a href="/shop/cart" t-attf-class="#{_link_class}" aria-label="eCommerce cart">
9 <div t-attf-class="#{_icon_wrap_class}">
10 <i t-if="_icon" class="fa fa-shopping-cart fa-stack"/>
11 <sup t-attf-class="my_cart_quantity badge bg-primary #{_badge_class} #{'d-none' if (website_sale_cart_quantity == 0) else ''}" t-out="website_sale_cart_quantity" t-att-data-order-id="request.session.get('sale_order_id', None) if website_sale_cart_quantity else None"/>
12 </div>
13 <span t-if="_text" t-attf-class="#{_text_class}">My Cart</span>
14 </a>
15 </li>
16 </template>
17
18 <template id="header_hide_empty_cart_link" inherit_id="website_sale.header_cart_link" name="Header Hide Empty Cart link" active="False">
19 <xpath expr="//t[@t-set='show_cart']" position="after">
20 <t t-set="show_cart" t-value="website_sale_cart_quantity" />
21 </xpath>
22 </template>
23
24 <!-- Insert JSON-LD markup data for SEO. -->
25 <template id="website_sale_layout" inherit_id="website.layout" priority="1">
26 <body position="before">
27 <t
28 t-if="website._get_product_image_ratio() != '1_1'"
29 t-set="body_classname"
30 t-value="'o_wsale_products_opt_thumb_' + website._get_product_image_ratio() + (' ' + body_classname if body_classname else '')"
31 />
32 </body>
33 <head position="inside">
34 <!-- Company markup data, in all pages. -->
35 <t t-set="base_url" t-value="website.get_base_url()"/>
36 <script t-if="res_company and website" type="application/ld+json" >
37 {
38 "@context": "http://schema.org",
39 "@type": "Organization",
40 "name": "<t t-out="res_company.name"/>",
41 "logo": "<t t-out="'%s/logo.png?company=%s' % (base_url, res_company.id)"/>",
42 "url": "<t t-out="base_url"/>"
43 }
44 </script>
45
46 <!-- Product markup data, on product pages. -->
47 <script
48 t-if="product_markup_data" type="application/ld+json" t-out="product_markup_data"
49 />
50 </head>
51 </template>
52
53 <template
54 id="template_footer_website_sale"
55 name="eCommerce Footer"
56 inherit_id="website.layout"
57 active="False"
58 >
59 <div id="footer" position="replace">
60 <div
61 t-if="not no_footer"
62 id="footer"
63 class="oe_structure oe_structure_solo"
64 t-ignore="true"
65 >
66 <section class="s_text_block pt48" data-snippet="s_text_block" data-name="Container">
67 <div class="container s_allow_columns">
68 <div class="row">
69 <!-- Column 1: Products -->
70 <div class="col-lg-3 pb32">
71 <h5>Products</h5>
72 <div class="s_hr pb8" data-snippet="s_hr" data-name="Separator">
73 <hr class="w-100 mx-auto"/>
74 </div>
75 <ul class="list-unstyled">
76 <t t-set="ecommerce_categories" t-value="[]"/>
77 <li t-foreach="ecommerce_categories" t-as="category">
78 <a
79 t-att-href="'/shop/category/' + str(category['id'])"
80 t-out="category['name']"
81 />
82 </li>
83 <t t-if="not ecommerce_categories">
84 <li><a href="#">Accessories</a></li>
85 <li><a href="#">Apparel</a></li>
86 <li><a href="#">Beauty</a></li>
87 <li><a href="#">Essentials</a></li>
88 <li><a href="#">Fitness</a></li>
89 <li><a href="#">Gadgets</a></li>
90 </t>
91 </ul>
92 <div class="s_hr pb8" data-snippet="s_hr" data-name="Separator">
93 <hr class="w-100 mx-auto"/>
94 </div>
95 <a href="/shop"><i class="fa fa-long-arrow-right"/> All Products</a>
96 <div class="s_hr pt8 pb8" data-snippet="s_hr" data-name="Separator">
97 <hr class="w-100 mx-auto"/>
98 </div>
99 </div>
100
101 <!-- Column 2: Customer Care -->
102 <div class="col-lg-3 pb32">
103 <h5>Customer Care</h5>
104 <div class="s_hr pb8" data-snippet="s_hr" data-name="Separator">
105 <hr class="w-100 mx-auto"/>
106 </div>
107 <ul class="list-unstyled">
108 <li><a href="#">Help Center</a></li>
109 <li><a href="#">Returns</a></li>
110 <li><a href="#">Delivery</a></li>
111 <li><a href="#">Shipping</a></li>
112 <li><a href="/contactus">Contact us</a></li>
113 </ul>
114 </div>
115
116 <!-- Column 3: Badges, Social, Payments -->
117 <div class="col-lg-5 offset-lg-1 pb48">
118 <!-- Payment Icons -->
119 <h5>Our payment methods</h5>
120 <div class="s_hr pb8" data-snippet="s_hr" data-name="Separator">
121 <hr class="w-100 mx-auto"/>
122 </div>
123 <div
124 class="s_supported_payment_methods o_not_editable"
125 data-snippet="s_supported_payment_methods"
126 data-name="Supported Payment Methods"
127 data-limit="8"
128 data-height="32px"
129 data-oe-protected="true"
130 />
131 <div class="s_hr pt8 pb24" data-snippet="s_hr" data-name="Separator">
132 <hr class="w-100 mx-auto"/>
133 </div>
134 <!-- Service Badges -->
135 <span
136 class="s_badge badge text-bg-primary o_animable"
137 data-name="Badge"
138 >
139 <i class="fa fa-dollar fa-fw o_not-animable"/> Low Prices
140 </span>
141 <span
142 class="s_badge badge text-bg-primary o_animable"
143 data-name="Badge"
144 >
145 <i class="fa fa-shopping-basket fa-fw o_not-animable"/>
146 Easy Returns
147 </span>
148 <span
149 class="s_badge badge text-bg-primary o_animable"
150 data-name="Badge"
151 >
152 <i class="fa fa-truck fa-fw o_not-animable"/> Fast Shipping
153 </span>
154 <div class="s_hr pt8 pb8" data-snippet="s_hr" data-name="Separator">
155 <hr class="w-100 mx-auto" style="border-top-color: rgba(255, 255, 255, 0);"/>
156 </div>
157 <!-- Social Media -->
158 <div
159 class="s_social_media text-start o_not_editable"
160 data-snippet="s_social_media"
161 data-name="Social Media"
162 contenteditable="false"
163 >
164 <h5 class="s_social_media_title d-none">
165 Follow us
166 </h5>
167 <a
168 href="/website/social/instagram"
169 class="s_social_media_instagram"
170 target="_blank"
171 aria-label="Instagram"
172 >
173 <i class="fa fa-instagram o_editable_media rounded shadow-sm"/>
174 </a>
175 <a
176 href="/website/social/youtube"
177 class="s_social_media_youtube"
178 target="_blank"
179 aria-label="YouTube"
180 >
181 <i class="fa fa-youtube-play o_editable_media rounded shadow-sm"/>
182 </a>
183 <a
184 href="/website/social/tiktok"
185 class="s_social_media_tiktok"
186 target="_blank"
187 aria-label="TikTok"
188 >
189 <i class="fa fa-tiktok o_editable_media rounded shadow-sm"/>
190 </a>
191 <a
192 href="/website/social/twitter"
193 class="s_social_media_twitter"
194 aria-label="Twitter"
195 >
196 <i class="fa fa-twitter o_editable_media rounded shadow-sm"/>
197 </a>
198 </div>
199 </div>
200 </div>
201 </div>
202 </section>
203 </div>
204 </div>
205
206 <xpath expr="//span[hasclass('o_footer_copyright_name')]" position="replace">
207 <span class="small">
208 &amp;copy;
209 <span class="o_footer_copyright_name align-baseline">Company name</span>
210 - <a href="#">Terms &amp; Conditions</a>
211 - <a href="#">Privacy Policy</a>
212 </span>
213 </xpath>
214 </template>
215
216 <template id="product_category_extra_link" name="Product Category Extra Link">
217 <button class="btn btn-link btn-sm pe-0" disabled="disabled">
218 <t t-if="len(categories) == 1">Category:</t>
219 <t t-else="">Categories:</t>
220 </button>
221 <t t-foreach="categories" t-as="category">
222 <button
223 class="btn btn-link btn-sm p-0 text-wrap"
224 t-out="category.name"
225 t-attf-onclick="location.href='#{shop_path}/category/#{slug(category)}';return false;"
226 />
227 </t>
228 </template>
229
230 <template id="template_header_mobile" inherit_id="website.template_header_mobile">
231 <xpath expr="//ul[hasclass('o_header_mobile_buttons_wrap')]" position="inside">
232 <t t-call="website_sale.header_cart_link">
233 <t t-set="_icon" t-value="True"/>
234 <t t-set="_link_class" t-value="'o_navlink_background_hover btn position-relative rounded-circle border-0 p-1 text-reset'"/>
235 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
236 </t>
237 </xpath>
238 </template>
239
240 <template id="template_header_default" inherit_id="website.template_header_default">
241 <xpath expr="//t[@t-call='website.placeholder_header_search_box']" position="before">
242 <t t-call="website_sale.header_cart_link">
243 <t t-set="_icon" t-value="True"/>
244 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-center text-reset'"/>
245 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
246 </t>
247 </xpath>
248 </template>
249
250 <template id="template_header_hamburger" inherit_id="website.template_header_hamburger">
251 <xpath expr="//t[@t-call='portal.placeholder_user_sign_in']" position="before">
252 <t t-call="website_sale.header_cart_link">
253 <t t-set="_icon" t-value="True"/>
254 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-pill p-1 text-reset'"/>
255 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded'"/>
256 </t>
257 </xpath>
258 </template>
259
260 <template id="template_header_stretch" inherit_id="website.template_header_stretch">
261 <xpath expr="//t[@t-call='website.placeholder_header_social_links']" position="before">
262 <t t-call="website_sale.header_cart_link">
263 <t t-set="_icon" t-value="True"/>
264 <t t-set="_item_class" t-value="'border-start o_border_contrast'"/>
265 <t t-set="_link_class" t-value="'o_navlink_background_hover btn position-relative d-flex align-items-center h-100 rounded-0 p-2 text-reset'"/>
266 <t t-set="_badge_class" t-value="'rounded'"/>
267 </t>
268 </xpath>
269 </template>
270
271 <template id="template_header_vertical" inherit_id="website.template_header_vertical">
272 <xpath expr="//t[@t-call='portal.placeholder_user_sign_in']" position="before">
273 <t t-call="website_sale.header_cart_link">
274 <t t-set="_icon" t-value="True"/>
275 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-reset'"/>
276 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
277 </t>
278 </xpath>
279 </template>
280
281 <template id="template_header_search" inherit_id="website.template_header_search">
282 <xpath expr="//t[@t-call='portal.placeholder_user_sign_in']" position="before">
283 <t t-call="website_sale.header_cart_link">
284 <t t-set="_text" t-value="True"/>
285 <t t-set="_item_class" t-value="'border-start o_border_contrast'"/>
286 <t t-set="_link_class" t-value="'o_navlink_background_hover btn btn-sm d-flex align-items-center gap-1 h-100 rounded-0 p-2 text-reset'"/>
287 <t t-set="_badge_class" t-value="'rounded'"/>
288 </t>
289 </xpath>
290 </template>
291
292 <template id="template_header_sales_one" inherit_id="website.template_header_sales_one">
293 <xpath expr="//t[@t-call='portal.user_dropdown']" position="before">
294 <t t-call="website_sale.header_cart_link">
295 <t t-set="_icon" t-value="True"/>
296 <t t-set="_link_class" t-value="'btn position-relative rounded-circle p-1 text-reset o_navlink_background'"/>
297 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
298 </t>
299 </xpath>
300 </template>
301
302 <template id="template_header_sales_two" inherit_id="website.template_header_sales_two">
303 <xpath expr="//t[@t-call='portal.placeholder_user_sign_in']" position="before">
304 <t t-call="website_sale.header_cart_link">
305 <t t-set="_icon" t-value="True"/>
306 <t t-set="_text" t-value="True"/>
307 <t t-set="_icon_wrap_class" t-value="'o_navlink_background position-relative me-2 rounded-circle p-2 transition-base'"/>
308 <t t-set="_link_class" t-value="'o_navlink_trigger_hover btn d-flex align-items-center fw-bold text-reset'"/>
309 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
310 <t t-set="_text_class" t-value="'small'"/>
311 </t>
312 </xpath>
313 </template>
314
315 <template id="template_header_sales_three" inherit_id="website.template_header_sales_three">
316 <xpath expr="//t[@t-call='website.placeholder_header_language_selector']" position="before">
317 <t t-call="website_sale.header_cart_link">
318 <t t-set="_text" t-value="True"/>
319 <t t-set="_item_class" t-value="'position-relative'"/>
320 <t t-set="_link_class" t-value="'nav-link d-flex flex-row-reverse align-items-center text-uppercase fw-bold'"/>
321 <t t-set="_icon_wrap_class" t-value="'d-contains'"/>
322 <t t-set="_badge_class" t-value="'top-0 d-block ms-2'"/>
323 </t>
324 </xpath>
325 </template>
326
327 <template id="template_header_sales_four" inherit_id="website.template_header_sales_four">
328 <xpath expr="//t[@t-call='website.placeholder_header_call_to_action']" position="before">
329 <t t-call="website_sale.header_cart_link">
330 <t t-set="_icon" t-value="True"/>
331 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-pill p-1 text-reset'"/>
332 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
333 </t>
334 </xpath>
335 </template>
336
337 <template id="template_header_sidebar" inherit_id="website.template_header_sidebar">
338 <xpath expr="//t[@t-call='website.placeholder_header_brand']" position="after">
339 <ul class="list-unstyled d-flex gap-1 ms-auto mb-0">
340 <t t-call="website_sale.header_cart_link">
341 <t t-set="_icon" t-value="True"/>
342 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative p-1 rounded-circle text-reset'"/>
343 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 rounded-pill mt-n1 me-n1'"/>
344 </t>
345 </ul>
346 </xpath>
347 </template>
348
349 <template id="template_header_boxed" inherit_id="website.template_header_boxed">
350 <xpath expr="//t[@t-call='website.placeholder_header_search_box']" position="before">
351 <t t-call="website_sale.header_cart_link">
352 <t t-set="_icon" t-value="True"/>
353 <t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-center text-reset'"/>
354 <t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/>
355 </t>
356 </xpath>
357 </template>
358
359 <!-- Search Bar input-group template -->
360 <template id="search" name="Search Box" active="True">
361 <t t-call="website.website_search_box_input">
362 <t t-set="_form_classes" t-valuef="o_wsale_products_searchbar_form me-auto flex-grow-1 {{_form_classes}}"/>
363 <t t-set="_submit_classes" t-valuef="btn btn-{{navClass}}"/>
364 <t t-set="_input_classes" t-valuef="border-0 text-bg-{{navClass}}"/>
365 <t t-set="search_type" t-valuef="products"/>
366 <t t-set="action" t-value="keep(search=0)"/>
367 <t t-set="display_image" t-valuef="true"/>
368 <t t-set="display_description" t-valuef="true"/>
369 <t t-set="display_extra_link" t-valuef="true"/>
370 <t t-set="display_detail" t-valuef="true"/>
371 </t>
372 </template>
373
374 <template id="product_variant_preview">
375 <!-- If gap-1 is changed make sure to update the margin in product_variant_preview.js -->
376 <div
377 t-attf-class="o_wsale_attribute_previewer d-flex align-items-center gap-1 flex-nowrap overflow-hidden {{
378 'show_on_hover' if product_ptavs[0]['ptav'].attribute_id.preview_variants == 'hover' and layout_mode != 'list' else ''
379 }}"
380 t-att-data-hidden-ptav-count="product_ptavs_data.get('hidden_ptavs_count')"
381 >
382 <t t-foreach="product_ptavs" t-as="previewed_ptav">
383 <t t-set="ptav" t-value="previewed_ptav['ptav']"/>
384 <t t-set="selected_attribute_value" t-value="ptav.product_attribute_value_id.id"/>
385 <a
386 class="o_product_variant_preview d-none z-2"
387 t-att-data-variant-image="previewed_ptav['variant_image_url']"
388 t-att-href="previewed_ptav['variant_url']"
389 >
390 <div
391 t-if="ptav.attribute_id.is_thumbnail_visible"
392 class="d-flex"
393 >
394 <label
395 class="css_attribute_preview_thumbnail cursor-pointer d-block"
396 t-att-style="'background:url(%s); background-size:cover; background-position: center center;' % previewed_ptav['variant_image_url']"
397 t-att-title="ptav.name"
398 />
399 </div>
400 <div
401 t-elif="ptav.display_type == 'color'"
402 class="d-flex"
403 >
404 <t
405 t-if="ptav.product_attribute_value_id.image"
406 t-set="background_style"
407 t-value="'background:url(/web/image/product.attribute.value/%s/image); background-size:cover;' % ptav.product_attribute_value_id.id"
408 />
409 <t
410 t-elif="not ptav.is_custom"
411 t-set="background_style"
412 t-value="'background: ' + str(ptav.html_color or ptav.name)"
413 />
414 <label
415 t-att-style="background_style"
416 class="css_attribute_color cursor-pointer d-block"
417 t-att-title="ptav.name"
418 />
419 </div>
420 <div
421 t-elif="ptav.display_type == 'image'"
422 class="d-flex"
423 >
424 <div
425 t-attf-class="css_attribute_image size_small cursor-pointer d-block rounded bg-body #{'custom_value' if ptav.is_custom else ''} #{'transparent' if (not ptav.is_custom and not ptav.html_color) else ''}"
426 t-att-title="ptav.name"
427 >
428 <div
429 class="o_bg_img_center w-100 h-100 rounded-1"
430 t-att-style="'background-image:url(/web/image/product.attribute.value/%s/image);' % ptav.product_attribute_value_id.id"
431 />
432 </div>
433 </div>
434 <span
435 t-else=""
436 t-attf-class="{{'' if ppr == 2 and layout_mode != 'list' else 'btn-sm'}} o_wsale_product_ptav_pill btn w-100 bg-body text-body"
437 >
438 <span class="o_wsale_product_ptav_pill_label d-block text-truncate" t-out="ptav.name"/>
439 </span>
440 </a>
441 </t>
442 <span name="hidden_ptavs_count" class="d-none ms-1 small z-2">
443 <a t-att-href="product_href"/>
444 </span>
445 </div>
446 </template>
447
448 <template id="pricelist_list" name="Pricelists Dropdown">
449 <t t-set="website_sale_pricelists" t-value="website_sale_pricelists or website.get_pricelist_available(show_visible=True)" />
450 <t t-set="hasPricelistDropdown" t-value="hasPricelistDropdown or (website_sale_pricelists and len(website_sale_pricelists)&gt;1)"/>
451 <t t-set="pricelist" t-value="request.pricelist"/>
452 <t t-set="pricelist_label">Pricelist</t>
453 <div t-attf-class="o_pricelist_dropdown dropdown #{_classes if hasPricelistDropdown else 'd-none'}">
454 <a
455 role="button"
456 href="#"
457 t-attf-class="dropdown-toggle btn px-2"
458 data-bs-toggle="dropdown"
459 >
460 <small class="d-none d-md-inline opacity-75"><t t-out="pricelist_label"/>:</small>
461 <span class="d-none d-md-inline" t-out="pricelist and pricelist.name or ' - '" />
462 <span class="d-md-none"><t t-out="pricelist_label"/></span>
463 </a>
464 <div class="dropdown-menu" role="menu">
465 <t t-foreach="website_sale_pricelists" t-as="pl">
466 <t t-set="_is_active" t-value="pricelist.id == pl.id"/>
467 <a
468 role="menuitem"
469 t-att-href="'/shop/change_pricelist/%s' % pl.id"
470 t-attf-class="dropdown-item {{_is_active and 'active'}}"
471 t-att-aria-current="_is_active and 'true' or 'false'"
472 >
473 <span
474 class="switcher_pricelist"
475 t-att-data-pl_id="pl.id"
476 t-out="pl.name"
477 />
478 </a>
479 </t>
480 </div>
481 </div>
482 </template>
483
484 <template id="products_breadcrumb" name="Products Breadcrumb">
485 <ol t-if="category" t-attf-class="breadcrumb #{_classes}">
486 <li class="breadcrumb-item">
487 <a
488 t-att-class="'d-none d-lg-inline' if len(category.parents_and_self) &gt; 1 else ''"
489 t-att-href="keep(shop_path)"
490 >
491 Products
492 </a>
493 <span t-if="len(category.parents_and_self) &gt; 1" class="d-lg-none">...</span>
494 </li>
495 <t t-foreach="category.parents_and_self" t-as="cat">
496 <li t-if="cat == category" class="breadcrumb-item">
497 <span class="d-inline-block" t-field="cat.name"/>
498 </li>
499 <li
500 t-else=""
501 t-attf-class="breadcrumb-item {{cat_index &lt; cat_size - 2 and 'd-none d-lg-inline'}}"
502 >
503 <a
504 t-att-href="keep('%s/category/%s' % (shop_path, slug(cat)))"
505 t-field="cat.name"
506 />
507 </li>
508 </t>
509 </ol>
510 </template>
511
512 <!-- /shop product listing -->
513 <template id="products" name="Products">
514 <t t-call="website.layout">
515 <t t-set="additional_title" t-value="category.name"/>
516 <t t-set="grid_block_name">Grid</t>
517 <t t-set="product_block_name">Product</t>
518
519 <!-- Qweb variable defining the class suffix for navbar items.
520 Change accordingly to the derired visual result (eg. `primary`, `dark`...)-->
521 <t t-set="navClass" t-valuef="light"/>
522
523 <!-- Check for active options: the stored value may be used in sub-templates too -->
524 <t t-set="opt_wsale_fullwidth" t-value="website.shop_page_container == 'fluid'"/>
525 <t t-set="opt_wsale_categories" t-value="is_view_active('website_sale.products_categories')"/>
526 <t t-set="opt_wsale_attributes" t-value="is_view_active('website_sale.products_attributes')"/>
527 <t t-set="opt_wsale_filter_price" t-value="is_view_active('website_sale.filter_products_price')"/>
528 <t t-set="opt_wsale_filter_tags" t-value="is_view_active('website_sale.filter_products_tags')"/>
529 <t t-set="opt_wsale_design_grid" t-value="'o_wsale_products_opt_design_grid' in website.shop_opt_products_design_classes"/>
530
531 <t t-set="opt_wsale_categories_top" t-value="is_view_active('website_sale.products_categories_top')"/>
532 <t t-set="opt_wsale_attributes_top" t-value="is_view_active('website_sale.products_attributes_top')"/>
533 <t t-set="opt_wsale_floating_bar" t-value="is_view_active('website_sale.floating_bar')"/>
534
535 <t t-set="opt_wsale_show_shop_title" t-value="is_view_active('website_sale.products_shop_title')"/>
536 <t t-set="opt_wsale_shop_title_align" t-value="is_view_active('website_sale.products_shop_title_align')"/>
537
538 <t t-set="opt_wsale_show_category_title" t-value="bool(category) and category.show_category_title"/>
539 <t t-set="opt_wsale_show_category_description" t-value="bool(category) and category.show_category_description"/>
540 <t t-set="opt_wsale_category_align" t-value="bool(category) and category.align_category_content"/>
541
542 <t t-set="website_sale_pricelists" t-value="website.get_pricelist_available(show_visible=True)" />
543 <t t-set="website_sale_sortable" t-value="website._get_product_sort_mapping()"/>
544
545 <t t-set="hasLeftColumn" t-value="opt_wsale_categories or opt_wsale_attributes"/>
546
547 <t t-set="isFilteringByPrice" t-if="opt_wsale_filter_price" t-value="float_round(available_min_price, 2) != float_round(min_price, 2) or float_round(available_max_price, 2) != float_round(max_price, 2)"/>
548 <t t-set="hasPricelistDropdown" t-value="website_sale_pricelists and len(website_sale_pricelists)&gt;1"/>
549 <t t-set="isSortingBy" t-value="[sort for sort in website_sale_sortable if sort[0]==request.params.get('order', '')]"/>
550
551 <t
552 t-set="wsale_has_filters_btn"
553 t-value="opt_wsale_categories or opt_wsale_attributes or opt_wsale_attributes_top"
554 />
555 <t
556 t-set="wsale_has_filters_btn_lg"
557 t-value="opt_wsale_attributes_top"
558 />
559
560 <div id="wrap" class="js_sale o_wsale_products_page">
561 <div class="oe_structure oe_empty oe_structure_not_nearest" id="oe_structure_website_sale_products_1"/>
562 <div
563 id="o_wsale_container"
564 t-attf-class="oe_website_sale
565 {{opt_wsale_fullwidth and 'container-fluid o_wsale_page_fluid' or 'o_wsale_page_contained container'}}
566 {{opt_wsale_categories_top and 'o_wsale_has_filmstrip'}}
567 {{opt_wsale_floating_bar and 'o_wsale_has_floating_bar'}}
568 {{hasLeftColumn and 'o_wsale_has_sidebar'}}
569 {{editionPreviews and 'o_wsale_edit_preview_enabled'}}
570 {{opt_wsale_design_grid and 'o_wsale_uses_grid_design'}}"
571 t-att-data-ppg="ppg"
572 t-att-data-ppr="ppr"
573 t-att-data-default-sort="website.shop_default_sort"
574 >
575 <div class="row o_wsale_products_main_row flex-nowrap">
576 <aside
577 t-if="hasLeftColumn"
578 id="products_grid_before"
579 class="d-none d-lg-block position-sticky align-self-start col clearfix pt-2"
580 >
581 <t t-call="website_sale.sidebar_dropzone_at_top"/>
582 <div class="o_wsale_products_grid_before_rail vh-100 ms-n2 px-lg-2 ps-2 overflow-y-scroll">
583 <t
584 t-set="is_sidebar_collapsible"
585 t-value="is_view_active('website_sale.products_categories_list_collapsible')"
586 />
587 <div
588 t-if="opt_wsale_categories"
589 t-att-class="'products_categories'
590 + (' accordion accordion-flush' if is_sidebar_collapsible else ' mb-3')"
591 >
592 <t t-call="website_sale.products_categories_list"/>
593 </div>
594 <t
595 t-set="show_price_filter"
596 t-value="opt_wsale_filter_price and opt_wsale_attributes"
597 />
598 <div
599 t-if="attrib_values or tags or (
600 show_price_filter and isFilteringByPrice
601 )"
602 class="py-3 border-bottom"
603 >
604 <a
605 t-att-href="keep(attribute_values=0, tags=0, min_price=0, max_price=0)"
606 t-attf-class="btn btn-{{navClass}} d-flex align-items-center py-1"
607 title="Clear Filters"
608 >
609 <small class="mx-auto"><b>Clear Filters</b></small>
610 <i class="oi oi-close" role="presentation"/>
611 </a>
612 </div>
613 <div
614 t-attf-class="products_attributes_filters d-empty-none {{opt_wsale_categories and 'border-top'}} {{'pt-3' if not is_sidebar_collapsible else ''}}"
615 />
616 <t
617 t-if="show_price_filter"
618 t-call="website_sale.filter_products_price"
619 >
620 <t
621 t-set="_classes"
622 t-valuef="{{is_sidebar_collapsible and 'accordion accordion-flush'}} {{is_sidebar_collapsible and (opt_wsale_categories or len(attributes) > 0) and 'border-top'}}"
623 />
624 </t>
625 <t t-call="website_sale.sidebar_dropzone_at_bottom"/>
626 </div>
627 </aside>
628 <div id="products_grid" class="col">
629 <t
630 t-set="_header_has_content"
631 t-value="category or opt_wsale_categories_top or (not opt_wsale_floating_bar and (opt_wsale_attributes_top or is_view_active('website_sale.search') or is_view_active('website_sale.sort') or hasPricelistDropdown))"
632 />
633
634 <header
635 id="o_wsale_products_header"
636 t-att-data-category-id="category.id"
637 t-att-data-category-name="category.name"
638 t-attf-class="d-flex flex-column gap-2
639 {{_header_has_content and 'pt-4 pb-3' or opt_wsale_design_grid and 'py-3'}}
640 {{category and 'o_wsale_products_header_is_category' or 'o_wsale_products_header_is_shop'}}
641 {{opt_wsale_show_category_title and 'o_wsale_products_header_show_category_title'}}
642 {{opt_wsale_show_category_description and 'o_wsale_products_header_show_category_description'}}
643 {{opt_wsale_category_align and 'o_wsale_products_header_category_center_content'}}
644 {{opt_wsale_show_shop_title and 'o_wsale_products_header_show_shop_title'}}
645 {{opt_wsale_shop_title_align and 'o_wsale_products_header_shop_center_content'}}"
646 >
647 <t t-if="category and not search" t-call="website_sale.products_breadcrumb">
648 <t
649 t-set="_classes"
650 t-valuef="w-100 p-0 mb-0 small {{not opt_wsale_show_category_title and 'mb-2 mb-lg-0'}}"
651 />
652 </t>
653 <h1
654 t-if="category or search"
655 t-attf-class="o_wsale_category_title d-flex gap-1 align-items-center mb-0 lh-lg {{search and bool(category) and 'mb-2'}} {{search and 'o_wsale_category_title_is_search base-fs font-sans-serif' or 'fs-3'}}"
656 >
657 <t t-if="search and category">
658 <span class="text-muted">Searching</span>
659 <span class="badge text-bg-info fw-normal base-fs">
660 <t t-out="search"/>
661 <a
662 title="Clear search for this category"
663 t-att-href="keep(search=0)"
664 class="link-info"
665 >
666 <i class="oi oi-close" role="img"/>
667 </a>
668 </span>
669 <span class="text-muted">in</span>
670 <span class="badge text-bg-primary fw-normal base-fs">
671 <t t-out="category.name"/>
672 <a
673 title="Search globally"
674 t-att-href="keep(shop_path, search=search)"
675 >
676 <i class="oi oi-close" role="img"/>
677 </a>
678 </span>
679 </t>
680 <span t-elif="search">
681 <span class="text-muted">Search results for </span>'<strong t-out="search"/>' <small t-if="search_count" class="text-muted"> (<t t-out="search_count"/>)</small>
682 </span>
683 <t t-elif="category">
684 <span t-field="category.name"/>
685 </t>
686 </h1>
687 <h1
688 class="o_wsale_shop_title h4-fs"
689 t-if="not category and not search"
690 >
691 All products
692 </h1>
693 <t t-if="category">
694 <t t-set='editor_msg'>
695 Drag building blocks here to customize the header for
696 "<t t-out='category.name'/>" category.
697 </t>
698 <div
699 id="category_header"
700 class="o_wsale_category_description"
701 t-att-data-editor-message="editor_msg"
702 t-field="category.website_description"
703 />
704 </t>
705 <t t-else="">
706 <t t-set="editor_msg">
707 Drag building blocks here to customize the header for the shop page.
708 </t>
709 <div
710 id="oe_structure_products_header_shop"
711 class="oe_structure oe_empty"
712 t-att-data-editor-message="editor_msg"
713 />
714 </t>
715 <t t-if="opt_wsale_categories_top and category_entries"
716 t-call="website_sale.filmstrip_categories"
717 entries="category_entries"
718 />
719 <div
720 t-if="not opt_wsale_floating_bar"
721 class="products_header btn-toolbar flex-nowrap align-items-center justify-content-between gap-1 gap-lg-2 gap-xl-3"
722 >
723 <t t-if="is_view_active('website_sale.search')">
724 <t t-set="_has_all_sibligns" t-value="hasPricelistDropdown and is_view_active('website_sale.sort') and wsale_has_filters_btn"></t>
725 <!-- Desktop Search button -->
726 <div t-attf-class="o_wsale_products_header_search_form_container {{ _has_all_sibligns and 'd-none d-sm-inline-block'}} col-xl-5 me-auto {{not hasLeftColumn and 'col-xl-6'}}">
727 <t t-set="search_term">Search in</t>
728 <t t-if="category" t-set="placeholder" t-valuef="{{ search_term }} {{ category.name }}"/>
729 <t t-call="website_sale.search" placeholder="placeholder" search="original_search or search"/>
730 </div>
731 <!-- Mobile Search button -->
732 <a
733 t-attf-class="btn o_not_editable {{_has_all_sibligns and 'd-inline-block d-sm-none' or 'd-none'}} me-auto btn-{{navClass}}"
734 data-bs-target="#o_wsale_search_modal"
735 data-bs-toggle="modal"
736 role="button"
737 title="Search Products"
738 href="#"
739 >
740 <i class="oi oi-search" role="img"/>
741 </a>
742 </t>
743 <t
744 t-if="hasPricelistDropdown"
745 t-call="website_sale.pricelist_list"
746 />
747 <t
748 t-if="is_view_active('website_sale.sort')"
749 t-call="website_sale.sort"
750 />
751 <button
752 t-if="wsale_has_filters_btn"
753 t-attf-class="btn btn-{{navClass}} position-relative {{not wsale_has_filters_btn_lg and 'd-lg-none'}} {{not is_view_active('website_sale.search') and 'ms-auto'}} text-nowrap"
754 title="Filters"
755 data-bs-toggle="offcanvas"
756 data-bs-target="#o_wsale_offcanvas"
757 >
758 <i class="oi oi-settings-adjust" role="img"/>
759 <small t-attf-class="ms-1 {{(hasPricelistDropdown and is_view_active('website_sale.search') and is_view_active('website_sale.sort')) and 'd-none d-md-inline-block'}}">Filters</small>
760 <span
761 t-if="isFilteringByPrice or attrib_set or tags"
762 t-attf-class="position-absolute top-0 start-100 translate-middle border border-{{navClass}} rounded-circle bg-danger p-1"
763 >
764 <span class="visually-hidden">filters active</span>
765 </span>
766 </button>
767 </div>
768 <div t-if="original_search and products" class="alert alert-warning mt8">
769 No results found for '<span t-out="original_search"/>'. Showing results for '<span t-out="search"/>'.
770 </div>
771 </header>
772
773 <div t-if="products" class="o_wsale_products_grid_table_wrapper">
774 <t t-set="grid_md_allow_custom_cols" t-value="hasLeftColumn"/>
775 <t
776 t-set="grid_md_use_3col"
777 t-value="(not hasLeftColumn and ppr == 4) or (opt_wsale_fullwidth and ppr > 3)"
778 />
779
780 <section
781 id="o_wsale_products_grid"
782 t-attf-class="o_wsale_products_grid_table grid
783 {{grid_md_allow_custom_cols and 'o_wsale_products_grid_table_md'}}
784 {{website.shop_opt_products_design_classes}}"
785 t-attf-style="--o-wsale-ppr: {{ppr}}; --o-wsale-ppg: {{ppg}}; --o-wsale-products-grid-gap: {{gap}};"
786 t-att-data-name="grid_block_name"
787 >
788 <t t-foreach="bins" t-as="tr_product">
789 <t t-foreach="tr_product" t-as="td_product">
790 <t t-if="td_product">
791 <t t-set="col_height" t-value="td_product['y']"/>
792 <t t-set="col_width"
793 t-value="12 // ppr * td_product['x']"/>
794 <t t-set="col_class" t-valuef="g-col-6"/>
795 <t t-set="col_class_lg"
796 t-value="'g-col-lg-' + str(col_width)"/>
797 <t t-set="col_class_md"
798 t-value="grid_md_allow_custom_cols and ('g-col-md-' + str(col_width)) or grid_md_use_3col and 'g-col-md-4' or 'g-col-md-6'"/>
799 <t t-set="col_is_stretched"
800 t-value="(td_product['x'] &gt;= td_product['y'] * 2)"/>
801 <t t-set="col_is_custom_portrait"
802 t-value="not col_is_stretched and (col_height &gt; td_product['x'])"/>
803 <t t-set="product" t-value="td_product['product']"/>
804 <t t-set="template_price_vals" t-value="get_product_prices(product)"/>
805 <t
806 t-set="ribbon"
807 t-value="product._get_ribbon(
808 price_vals=template_price_vals,
809 auto_assign_ribbons=auto_assign_ribbons,
810 variant=product_variants[product],
811 )"
812 />
813 <div
814 t-attf-class="oe_product {{col_is_custom_portrait and 'oe_product_custom_portrait'}} {{col_class}} {{col_class_md}} {{col_class_lg}} {{col_is_stretched and 'oe_product_size_stretch'}}"
815 t-attf-style="--o-wsale-products-grid-product-col-height: {{col_height}};"
816 t-att-data-colspan="td_product['x'] != 1 and td_product['x']"
817 t-att-data-rowspan="td_product['y'] != 1 and td_product['y']"
818 t-att-data-name="product_block_name"
819 >
820 <div t-attf-class="o_wsale_product_grid_wrapper position-relative h-100 o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
821 <t t-call="website_sale.products_item">
822 <t
823 t-set="design_field"
824 t-value="website.shop_opt_products_design_classes"
825 />
826 <t
827 t-set="product_href"
828 t-value="product._get_product_url(category, product_query_params, grouped_attributes_values)"
829 />
830 </t>
831 </div>
832 </div>
833 </t>
834 </t>
835 </t>
836 </section>
837 </div>
838 <div t-else="" class="text-center text-muted mt128 mb256">
839 <t t-if="not search">
840 <div class="mt-5 mb-3"><t t-call="website.empty_search_svg"/></div>
841 <h3
842 class="mt8"
843 style="text-align: center;"
844 >
845 No product defined
846 </h3>
847 <p
848 t-if="category"
849 style="text-align: center;"
850 >
851 No product defined in this category.
852 </p>
853 </t>
854 <t t-else="">
855 <div class="mt-5 mb-3"><t t-call="website.empty_search_svg"/></div>
856 <h3 class="mt8" style="text-align: center;">No results</h3>
857 <p style="text-align: center;">
858 No results for "<strong t-out='search'/>"<t t-if="category"> in category "<strong t-out="category.display_name"/>"</t>.
859 </p>
860 <p style="text-align: center;">
861 <a
862 t-if="category"
863 t-att-href="keep(shop_path, search=search)"
864 t-attf-title="Search {{search}} globally"
865 class="d-block pb-5"
866 >
867 Search globally
868 </a>
869 </p>
870 </t>
871 <div
872 t-ignore="true"
873 groups="sales_team.group_sale_manager"
874 class="alert alert-info d-inline-block mx-auto text-center"
875 >
876 Click <i>'New'</i> in the top-right corner to create your first product.
877 </div>
878 </div>
879 <div id="o_wsale_pager" t-attf-class="products_pager d-flex justify-content-center {{opt_wsale_design_grid and 'py-4' or 'py-5 pb-4'}}">
880 <t t-call="website.pager"/>
881 </div>
882 <t t-if="category">
883 <t t-set='footer_editor_message'>
884 Drag building blocks here to customize the footer for
885 "<t t-out='category.name'/>" category.
886 </t>
887 <div
888 class="mb16"
889 id="category_footer"
890 t-att-data-editor-message="footer_editor_message"
891 t-field="category.website_footer"
892 />
893 </t>
894 </div>
895 </div>
896
897 <t t-call="website_sale.o_wsale_offcanvas"/>
898 </div>
899 <div class="oe_structure oe_empty oe_structure_not_nearest" id="oe_structure_website_sale_products_2"/>
900 </div>
901 <div
902 t-if="is_view_active('website_sale.search')"
903 id="o_wsale_search_modal"
904 class="modal fade css_editable_mode_hidden"
905 aria-hidden="true"
906 tabindex="-1"
907 >
908 <div class="modal-dialog modal-lg pt-5">
909 <div class="modal-content mt-5 bg-transparent border-0">
910 <div class="o_container_small">
911 <t t-call="website.website_search_box_input">
912 <t t-set="default_style" t-valuef="true"/>
913 <t t-set="search_type" t-valuef="products"/>
914 <t t-set="_classes" t-valuef="input-group rounded o_cc o_cc1 mb-1"/>
915 <t t-set="_input_classes" t-valuef="border-0 p-3"/>
916 <t t-set="_submit_classes" t-valuef="px-4"/>
917 <t t-set="search_term">Search in</t>
918 <t t-if="category" t-set="placeholder" t-valuef="{{ search_term }} {{ category.name }}"/>
919 </t>
920 </div>
921 </div>
922 </div>
923 </div>
924 </t>
925 </template>
926
927 <template id="website_sale.sidebar_dropzone_at_top">
928 <div id="oe_structure_website_sale_sidebar_top" class="oe_structure">
929 <section
930 class="s_text_block oe_unmovable oe_unremovable"
931 data-snippet="s_text_block"
932 data-name="Text"
933 >
934 <p/>
935 </section>
936 </div>
937 </template>
938
939 <template id="website_sale.sidebar_dropzone_at_bottom">
940 <div id="oe_structure_website_sale_sidebar_bottom" class="oe_structure">
941 <section
942 class="s_text_block oe_unmovable oe_unremovable"
943 data-snippet="s_text_block"
944 data-name="Text"
945 >
946 <p/>
947 </section>
948 </div>
949 </template>
950
951 <!-- (Option) Mobile: Show 1 product for row -->
952 <template
953 id="website_sale.products_mobile_cols_single"
954 active="False"
955 name="Mobile: Show 1 product for row"
956 inherit_id="website_sale.products"
957 >
958 <xpath expr="//t[@t-set='col_class']" position="attributes">
959 <attribute name="t-valuef">g-col-12</attribute>
960 </xpath>
961 </template>
962
963 <template id="website_sale.sort" name="Sort-by Template">
964 <div t-attf-class="o_sortby_dropdown dropdown dropdown_sorty_by {{_classes}}">
965 <t
966 t-set="_current_sort"
967 t-value="isSortingBy and isSortingBy[0][0] or website.shop_default_sort"
968 />
969 <t t-set="_sort_label">Sort By</t>
970 <a
971 role="button"
972 href="#"
973 t-attf-class="dropdown-toggle btn px-2"
974 data-bs-toggle="dropdown"
975 >
976 <span class="d-md-none"><t t-out="_sort_label"/></span>
977 <small class="d-none d-md-inline opacity-75"><t t-out="_sort_label"/>:</small>
978 <span class="d-none d-md-inline">
979 <t t-if="isSortingBy" t-out="isSortingBy[0][1]"/>
980 <!-- Prevent editing the content in website builder -->
981 <span t-else="" t-out="dict(website_sale_sortable)[website.shop_default_sort]"/>
982 </span>
983 <i t-if="_icon_classes" t-attf-class="fa fa-sort {{_icon_classes}}" role="img"/>
984 </a>
985 <div class="dropdown-menu dropdown-menu-end" role="menu">
986 <t t-foreach="website_sale_sortable" t-as="sortby">
987 <t t-set="_is_active" t-value="_current_sort == sortby[0]"/>
988 <a
989 role="menuitem"
990 rel="noindex,nofollow"
991 t-att-href="keep(order=sortby[0])"
992 t-attf-class="dropdown-item {{_is_active and 'active'}}"
993 >
994 <span t-out="sortby[1]"/>
995 </a>
996 </t>
997 </div>
998 </div>
999 </template>
1000
1001 <template id="website_sale.products_categories" active="False" name="Categories in Left Side "/>
1002 <template id="website_sale.products_categories_top" active="True" name="Categories in top-nav"/>
1003 <template id="website_sale.products_attributes_top" active="False" name="Attributes in top-nav"/>
1004
1005 <template id="website_sale.products_shop_title" active="True" name="Show Shop Title"/>
1006 <template id="website_sale.products_shop_title_align" active="False" name="Align Shop Title"/>
1007
1008 <template id="website_sale.filter_color_attributes" name="Color attributes in Filter">
1009 <t t-foreach="a.value_ids" t-as="v">
1010 <t t-set="img_style"
1011 t-value="'background:url(/web/image/product.attribute.value/%s/image); background-size:cover;' % v.id if v.image else ''"
1012 />
1013 <t t-set="color_style"
1014 t-value="'background: ' + str(v.html_color or v.name if not v.is_custom else '')"
1015 />
1016 <label t-attf-style="#{img_style or color_style}"
1017 t-attf-class="css_attribute_color cursor-pointer #{'active' if v.id in attrib_set else ''}"
1018 >
1019 <input type="checkbox"
1020 name="attribute_value"
1021 class="cursor-pointer"
1022 t-att-value="'%s-%s' % (a.id, v.id)"
1023 t-att-checked="'checked' if v.id in attrib_set else None"
1024 t-att-title="v.name"
1025 />
1026 </label>
1027 </t>
1028 </template>
1029
1030 <template id="website_sale.filter_image_attributes" name="Image attributes in Filter">
1031 <t t-foreach="a.value_ids" t-as="v">
1032 <label
1033 t-attf-class="css_attribute_image size_small position-relative rounded-3 bg-body text-center cursor-pointer #{'active' if v.id in attrib_set else ''} #{'custom_value' if v.is_custom else ''} #{'transparent' if (not v.is_custom and not v.html_color) else ''}"
1034 >
1035 <input
1036 type="checkbox"
1037 name="attribute_value"
1038 t-att-value="'%s-%s' % (a.id, v.id)"
1039 t-att-checked="'checked' if v.id in attrib_set else None"
1040 t-att-title="v.name"
1041 class="w-100 h-100 opacity-0 cursor-pointer"
1042 />
1043 <div
1044 class="oe_img_bg o_bg_img_center position-absolute top-0 w-100 h-100 rounded-1"
1045 t-att-style="'background-image:url(/web/image/product.attribute.value/%s/image); background-size:cover;' % v.id if v.image else ''"
1046 />
1047 </label>
1048 </t>
1049 </template>
1050
1051 <template id="website_sale.filter_select_attributes" name="Select attributes in Filter">
1052 <select class="form-select css_attribute_select" name="attribute_value">
1053 <option value="" selected="true">All <t t-out="a.name"/></option>
1054 <t t-foreach="a.value_ids" t-as="v">
1055 <option
1056 t-att-value="'%s-%s' % (a.id,v.id)"
1057 t-out="v.name"
1058 t-att-selected="v.id in attrib_set"
1059 />
1060 </t>
1061 </select>
1062 </template>
1063
1064 <template
1065 id="website_sale.filter_radio_and_multi_attributes"
1066 name="Radio and Multi attributes in Filter"
1067 >
1068 <t
1069 t-set="sorted_values"
1070 t-value="sorted(a.value_ids, key=lambda v: v.id not in attrib_set)"
1071 />
1072 <t t-if="len(sorted_values) &lt;= 20">
1073 <div
1074 t-foreach="sorted_values[:8]"
1075 t-as="v"
1076 t-attf-class="{{'list-group-item border-0 ps-0 pb-0' if isMobile else ''}}"
1077 >
1078 <div class="form-check mb-1">
1079 <input
1080 type="checkbox"
1081 name="attribute_value"
1082 class="form-check-input"
1083 t-att-id="'%s-%s' % (a.id,v.id)"
1084 t-att-value="'%s-%s' % (a.id,v.id)"
1085 t-att-checked="v.id in attrib_set"
1086 />
1087 <label
1088 class="form-check-label fw-normal"
1089 t-att-for="'%s-%s' % (a.id,v.id)"
1090 t-field="v.name"
1091 />
1092 </div>
1093 </div>
1094 <t t-if="len(sorted_values) &gt; 8">
1095 <div
1096 t-attf-id="o_wsale_remaining_values_{{a.id}}"
1097 class="accordion-collapse collapse"
1098 t-attf-aria-labelledby="o_wsale_view_more_{{a.id}}_header"
1099 >
1100 <div
1101 t-foreach="sorted_values[8:]"
1102 t-as="v"
1103 t-attf-class="{{'list-group-item border-0 ps-0 pb-0' if isMobile else ''}}"
1104 >
1105 <div class="form-check mb-1">
1106 <input
1107 type="checkbox"
1108 name="attribute_value"
1109 class="form-check-input"
1110 t-att-id="'%s-%s' % (a.id,v.id)"
1111 t-att-value="'%s-%s' % (a.id,v.id)"
1112 t-att-checked="v.id in attrib_set"
1113 />
1114 <label
1115 class="form-check-label fw-normal"
1116 t-att-for="'%s-%s' % (a.id,v.id)"
1117 t-field="v.name"
1118 />
1119 </div>
1120 </div>
1121 </div>
1122 <div
1123 t-attf-id="o_wsale_view_more_{{a.id}}_header"
1124 t-attf-class="accordion-header {{'mb-0' if isMobile else ''}}"
1125 >
1126 <button
1127 type="button"
1128 class="o_wsale_view_more_btn btn btn-link px-0 collapsed"
1129 data-bs-toggle="collapse"
1130 t-attf-data-bs-target="#o_wsale_remaining_values_{{a.id}}"
1131 t-attf-aria-controls="o_wsale_remaining_values_{{a.id}}"
1132 aria-expanded="false"
1133 >
1134 View More
1135 </button>
1136 </div>
1137 </t>
1138 </t>
1139 <t t-elif="len(sorted_values) &gt; 20">
1140 <div t-attf-class="{{'my-3' if isMobile else 'mb-3'}}">
1141 <input
1142 type="text"
1143 class="o_wsale_attribute_search_bar form-control"
1144 t-att-placeholder="'Search %s (%s)' % (a.name, len(a.value_ids))"
1145 t-att-data-container-id="'searchable-values-%s' % a.id"
1146 />
1147 </div>
1148 <div
1149 t-attf-id="searchable-values-{{ a.id }}"
1150 class="overflow-auto"
1151 t-attf-style="max-height:{{'290px' if isMobile else '220px'}};"
1152 >
1153 <t t-foreach="sorted_values" t-as="v">
1154 <div
1155 t-attf-class="form-check mb-1 {{'list-group-item border-0 ms-3 pb-0' if isMobile else 'ms-1'}}"
1156 >
1157 <input
1158 type="checkbox"
1159 name="attribute_value"
1160 class="form-check-input"
1161 t-att-id="'%s-%s' % (a.id,v.id)"
1162 t-att-value="'%s-%s' % (a.id,v.id)"
1163 t-att-checked="v.id in attrib_set"
1164 />
1165 <label
1166 class="form-check-label fw-normal"
1167 t-att-for="'%s-%s' % (a.id,v.id)"
1168 t-field="v.name"
1169 />
1170 </div>
1171 </t>
1172 </div>
1173 </t>
1174 </template>
1175
1176 <template id="website_sale.filter_pills_attributes" name="Pills attributes in Filter">
1177 <t t-foreach="a.value_ids" t-as="v">
1178 <input
1179 type="checkbox"
1180 name="attribute_value"
1181 class="btn-check"
1182 t-att-id="'%s-%s' % (a.id,v.id)"
1183 t-att-value="'%s-%s' % (a.id,v.id)"
1184 t-att-checked="v.id in attrib_set"
1185 autocomplete="off"
1186 />
1187 <label
1188 t-attf-class="btn border {{'active bg-primary-subtle border-primary text-primary-emphasis' if v.id in attrib_set else ''}}"
1189 t-att-for="'%s-%s' % (a.id,v.id)"
1190 t-field="v.name"
1191 />
1192 </t>
1193 </template>
1194
1195 <template
1196 id="website_sale.product_attribute_filters_form"
1197 name="Product Attribute Filters Form"
1198 >
1199 <form
1200 t-attf-class="js_attributes {{('accordion accordion-flush d-flex flex-column ' + ('border-bottom' if attributes else '')) if isMobile else 'position-relative mb-2'}}"
1201 method="get"
1202 t-att-action="keep(attribute_values=0, tags=0)"
1203 >
1204 <t
1205 t-set="visible_attributes"
1206 t-value="len([a for a in attributes if a.value_ids and len(a.value_ids) &gt; 1])"
1207 />
1208
1209 <t t-foreach="attributes" t-as="a">
1210 <t t-set="_status" t-value="'inactive'"/>
1211 <t t-foreach="a.value_ids" t-as="v" t-if="v.id in attrib_set" t-set="_status" t-value="'active'"/>
1212 <t t-set="_expand_attributes" t-value="_status == 'active' or visible_attributes &lt; 4"/>
1213 <div
1214 t-if="a.value_ids and len(a.value_ids) &gt; 1"
1215 t-attf-class="accordion-item {{('border-top-0 ' + ('order-1' if _status == 'active' else 'order-2')) if isMobile else 'nav-item mb-1 rounded-0'}}"
1216 >
1217 <h2
1218 t-if="isMobile"
1219 class="accordion-header mb-0"
1220 t-attf-id="o_wsale_offcanvas_attribute_{{a.id}}_header"
1221 >
1222 <button
1223 t-attf-class="o_wsale_offcanvas_title accordion-button rounded-0 {{'' if _expand_attributes else 'collapsed'}}"
1224 type="button"
1225 t-att-data-status="_status"
1226 data-bs-toggle="collapse"
1227 t-attf-data-bs-target="#o_wsale_offcanvas_attribute_{{a.id}}"
1228 t-att-aria-expanded="_expand_attributes"
1229 t-attf-aria-controls="o_wsale_offcanvas_attribute_{{a.id}}"
1230 >
1231 <b t-out="a.name"/>
1232 </button>
1233 </h2>
1234 <h6 t-else="" class="mb-3">
1235 <b class="d-none d-lg-block" t-field="a.name"/>
1236 </h6>
1237 <div
1238 t-attf-id="{{'o_wsale_offcanvas_attribute_' + str(a.id) if isMobile else 'o_products_attributes_' + str(a.id)}}"
1239 t-attf-class="{{'accordion-collapse collapse ' + ('show' if _expand_attributes else '') if isMobile else ''}}"
1240 >
1241 <div t-attf-class="{{'accordion-body pt-0' if isMobile else ''}}">
1242 <div
1243 t-if="a.display_type == 'select'"
1244 t-attf-class="{{'my-2' if isMobile else 'mb-3'}}"
1245 >
1246 <t t-call="website_sale.filter_select_attributes"/>
1247 </div>
1248 <div
1249 t-elif="a.display_type == 'color'"
1250 t-attf-class="d-flex flex-wrap gap-2 {{'pt-1 pb-3' if isMobile else 'mb-3'}}"
1251 >
1252 <t t-call="website_sale.filter_color_attributes"/>
1253 </div>
1254 <div
1255 t-elif="a.display_type == 'image'"
1256 t-attf-class="d-flex flex-wrap gap-2 #{'pt-1 pb-3' if isMobile else 'mb-3'}"
1257 >
1258 <t t-call="website_sale.filter_image_attributes"/>
1259 </div>
1260 <div
1261 t-elif="a.display_type in ('radio', 'multi')"
1262 t-attf-class="{{'list-group list-group-flush' if isMobile else 'flex-column mb-3'}}"
1263 >
1264 <t t-call="website_sale.filter_radio_and_multi_attributes">
1265 <t t-set="isMobile" t-value="isMobile"/>
1266 </t>
1267 </div>
1268 <div
1269 t-elif="a.display_type == 'pills'"
1270 t-attf-class="d-flex flex-wrap gap-2 {{'my-2' if isMobile else 'mb-3'}}"
1271 data-bs-toggle="buttons"
1272 >
1273 <t t-call="website_sale.filter_pills_attributes"/>
1274 </div>
1275 </div>
1276 </div>
1277 </div>
1278 </t>
1279 <t t-if="isMobile">
1280 <t t-if="opt_wsale_filter_tags and (opt_wsale_attributes or opt_wsale_attributes_top)">
1281 <t t-set="_status" t-value="'inactive'"/>
1282 <t t-foreach="all_tags" t-as="v" t-if="v.id in tags" t-set="_status" t-value="'active'"/>
1283 <div t-if="all_tags">
1284 <h2 class="accordion-header mb-0" t-attf-id="o_wsale_offcanvas_tags_header">
1285 <button
1286 t-attf-class="o_wsale_offcanvas_title accordion-button border-top rounded-0 {{not tags and 'collapsed'}}"
1287 type="button"
1288 t-att-data-status="_status"
1289 data-bs-toggle="collapse"
1290 t-attf-data-bs-target="#o_wsale_offcanvas_tags"
1291 t-att-aria-expanded="_status == 'active' and 'True' or 'False'"
1292 t-attf-aria-controls="o_wsale_offcanvas_tags"
1293 >
1294 <b>Tags</b>
1295 </button>
1296 </h2>
1297 <div
1298 t-attf-id="o_wsale_offcanvas_tags"
1299 t-attf-class="accordion-collapse collapse {{(_status == 'active') and 'show'}}"
1300 t-att-aria-expanded="(_status == 'active') and 'True' or 'False'"
1301 t-attf-aria-labelledby="o_wsale_offcanvas_tags_header"
1302 >
1303 <div class="accordion-body pt-0">
1304 <div class="list-group list-group-flush">
1305 <t t-call="website_sale.filter_products_tags_list">
1306 <t t-set="all_tags" t-value="all_tags"/>
1307 </t>
1308 </div>
1309 </div>
1310 </div>
1311 </div>
1312 </t>
1313 </t>
1314 <t t-else="">
1315 <t
1316 t-if="opt_wsale_filter_tags and opt_wsale_attributes"
1317 t-call="website_sale.filter_products_tags"
1318 >
1319 <t t-set="all_tags" t-value="all_tags"/>
1320 </t>
1321 </t>
1322 </form>
1323 </template>
1324
1325 <!-- OffCanvas Nav -->
1326 <template id="website_sale.o_wsale_offcanvas" name="Offcanvas">
1327 <aside id="o_wsale_offcanvas"
1328 class="o_website_offcanvas offcanvas offcanvas-end p-0">
1329 <div class="offcanvas-header justify-content-end">
1330 <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"/>
1331 </div>
1332 <div
1333 t-if="is_view_active('website_sale.search') and (opt_wsale_attributes or opt_wsale_attributes_top)"
1334 class="offcanvas-body flex-grow-0 overflow-visible"
1335 >
1336 <t t-call="website_sale.search">
1337 <t t-set="search_term">Search in</t>
1338 <t t-if="category" t-set="placeholder" t-valuef="{{ search_term }} {{ category.name }}"/>
1339 <t t-set="search" t-value="original_search or search"/>
1340 <t t-set="_s_searchbar_autocomplete_classes" t-valuef="bg-primary"> </t>
1341 </t>
1342 </div>
1343 <div id="o_wsale_offcanvas_content" class="accordion accordion-flush flex-grow-1 overflow-auto">
1344 <!-- Show sorting only if it's not avavailbe in the topbar already -->
1345 <div t-if="not is_view_active('website_sale.sort')" class="accordion-item">
1346 <t t-if="isSortingBy" t-set="isSortingBy" t-value="isSortingBy[0][1]"/>
1347 <t t-else="" t-set="isSortingBy" t-value="website.shop_default_sort"/>
1348 <h2 id="o_wsale_offcanvas_orderby_header" class="accordion-header mb-0">
1349 <button class="o_wsale_offcanvas_title accordion-button rounded-0 collapsed"
1350 type="button"
1351 data-bs-toggle="collapse"
1352 data-bs-target="#o_wsale_offcanvas_orderby"
1353 aria-expanded="false"
1354 aria-controls="o_wsale_offcanvas_orderby">
1355 <b>Sort By</b>
1356 </button>
1357 </h2>
1358 <div id="o_wsale_offcanvas_orderby"
1359 class="accordion-collapse collapse"
1360 aria-labelledby="o_wsale_offcanvas_orderby_header">
1361 <div class="accordion-body pt-0">
1362 <div class="list-group list-group-flush">
1363 <a t-foreach="website_sale_sortable" t-as="sortby"
1364 role="menuitem"
1365 rel="noindex,nofollow"
1366 t-att-href="keep(order=sortby[0])"
1367 class="list-group-item border-0 ps-0 pb-0">
1368 <div class="form-check d-inline-block">
1369 <input type="radio"
1370 t-attf-onclick="location.href='#{keep(order=sortby[0])}';"
1371 class="form-check-input o_not_editable"
1372 name="wsale_sortby_radios_offcanvas"
1373 t-att-checked="isSortingBy and isSortingBy == sortby[1]">
1374 <label class="form-check-label fw-normal" t-out="sortby[1]"/>
1375 </input>
1376 </div>
1377 </a>
1378 </div>
1379 </div>
1380 </div>
1381 </div>
1382 <div t-if="opt_wsale_categories" class="accordion-item d-lg-none">
1383 <h2 id="o_wsale_offcanvas_categories_header" class="accordion-header mb-0">
1384 <button class="o_wsale_offcanvas_title accordion-button rounded-0 collapsed"
1385 type="button"
1386 data-bs-toggle="collapse"
1387 data-bs-target="#o_wsale_offcanvas_categories"
1388 aria-expanded="false"
1389 aria-controls="o_wsale_offcanvas_categories">
1390 <b>Categories</b>
1391 </button>
1392 </h2>
1393 <div id="o_wsale_offcanvas_categories"
1394 class="accordion-collapse collapse"
1395 aria-labelledby="o_wsale_offcanvas_categories_header">
1396 <div class="accordion-body pt-0">
1397 <t t-call="website_sale.products_categories_list">
1398 <t t-set="isOffcanvas" t-value="true"/>
1399 <t t-set="_titleClasses" t-valuef="d-none"/>
1400 <t t-set="_radioGroup" t-valuef="_offcanvas"/>
1401 </t>
1402 </div>
1403 </div>
1404 </div>
1405 <t t-call="website_sale.product_attribute_filters_form">
1406 <t t-set="isMobile" t-value="True"/>
1407 </t>
1408 <t t-if="opt_wsale_filter_price and (opt_wsale_attributes or opt_wsale_attributes_top)"
1409 t-call="website_sale.filter_products_price">
1410 <t
1411 t-set="_classes"
1412 t-valuef="o_wsale_offcanvas_title accordion accordion-flush px-4"
1413 />
1414 <t t-set="_classes_title" t-valuef="ms-n1 pt-3 pb-2"/>
1415 <t t-set="isOffcanvas" t-value="True"/>
1416 </t>
1417 </div>
1418 <div class="offcanvas-body d-flex justify-content-between flex-grow-0 border-top overflow-hidden">
1419 <a t-attf-class="btn btn-{{navClass}} d-flex py-1 mb-2 {{(not attrib_values and not isFilteringByPrice and not tags) and 'disabled' }}"
1420 t-att-aria-disabled="(not attrib_values and not isFilteringByPrice and not tags) and 'true' or 'false'"
1421 t-att-href="keep(attribute_values=0, tags=0, min_price=0, max_price=0)"
1422 title="Clear Filters">
1423 Clear Filters
1424 </a>
1425 </div>
1426 </aside>
1427 </template>
1428
1429
1430 <!-- Top-Nav Categories -->
1431 <template id="website_sale.filmstrip_categories" name="Categories Filmstrip">
1432 <div
1433 id="o_wsale_categories_filmstrip"
1434 class="o_wsale_filmstrip_container o_wsale_filmstrip_default d-flex align-items-stretch overflow-hidden"
1435 role="navigation"
1436 >
1437 <div class="o_wsale_filmstrip_wrapper position-relative overflow-auto z-1">
1438 <ul
1439 class="o_wsale_filmstrip d-flex align-items-stretch mb-0 list-unstyled overflow-visible"
1440 role="menu"
1441 aria-label="Categories"
1442 >
1443 <li
1444 t-foreach="entries"
1445 t-as="c"
1446 t-att-data-publish="c.has_published_products and 'on' or 'off'"
1447 role="presentation"
1448 >
1449 <a
1450 t-att-href="keep('%s/category/%s' % (shop_path, slug(c)))"
1451 class="o_wsale_filmstrip_link d-block w-100 h-100 text-decoration-none"
1452 draggable="false"
1453 role="menuitem"
1454 t-att-aria-label="c.name"
1455 >
1456 <input
1457 type="radio"
1458 t-attf-name="wsale_categories_top_radios_{{parentCategoryId}}"
1459 class="btn-check pe-none"
1460 t-att-id="c.id"
1461 t-att-value="c.id"
1462 t-att-checked="'true' if c.id == category.id else None"
1463 tabindex="-1"
1464 />
1465 <div
1466 t-att-class="'o_wsale_filmstrip_item position-relative d-flex w-100 h-100'
1467 + (c.id == category.id and ' active' or '')"
1468 >
1469 <div
1470 t-if="c.image_128"
1471 name="o_wsale_filmstrip_image"
1472 class="o_wsale_filmstrip_image oe_img_bg o_bg_img_center rounded"
1473 t-attf-style="background-image:url('data:image/png;base64, #{c.image_128}')"
1474 t-att-alt="c.name"
1475 role="img"
1476 aria-label="Category image"
1477 />
1478 <div
1479 t-else=""
1480 name="o_wsale_filmstrip_placeholder"
1481 class="o_wsale_filmstrip_image o_wsale_filmstrip_placeholder oe_img_bg o_bg_img_center rounded"
1482 role="img"
1483 aria-label="Category image"
1484 />
1485 <span t-field="c.name"/>
1486 </div>
1487 </a>
1488 </li>
1489 </ul>
1490 </div>
1491 </div>
1492 </template>
1493
1494 <!-- Categories Variations -->
1495 <template
1496 id="website_sale.filmstrip_categories_bordered"
1497 inherit_id="website_sale.filmstrip_categories"
1498 name="Categories Filmstrip Bordered"
1499 active="False"
1500 >
1501 <div id="o_wsale_categories_filmstrip" position="attributes">
1502 <attribute name="class" add="o_wsale_filmstrip_bordered" remove="o_wsale_filmstrip_default" separator=" "/>
1503 </div>
1504 </template>
1505 <template
1506 id="website_sale.filmstrip_categories_tabs"
1507 inherit_id="website_sale.filmstrip_categories"
1508 name="Categories Filmstrip Tabs"
1509 active="False"
1510 >
1511 <div id="o_wsale_categories_filmstrip" position="attributes">
1512 <attribute name="class" add="o_wsale_filmstrip_tabs" remove="o_wsale_filmstrip_default" separator=" "/>
1513 </div>
1514 </template>
1515 <template
1516 id="website_sale.filmstrip_categories_pills"
1517 inherit_id="website_sale.filmstrip_categories"
1518 name="Categories Filmstrip Tabs"
1519 active="False"
1520 >
1521 <div id="o_wsale_categories_filmstrip" position="attributes">
1522 <attribute name="class" add="o_wsale_filmstrip_pills" remove="o_wsale_filmstrip_default" separator=" "/>
1523 </div>
1524 </template>
1525 <template
1526 id="website_sale.filmstrip_categories_images"
1527 inherit_id="website_sale.filmstrip_categories"
1528 name="Categories Filmstrip Basic"
1529 active="False"
1530 >
1531 <div id="o_wsale_categories_filmstrip" position="attributes">
1532 <attribute name="class" add="o_wsale_filmstrip_images" remove="o_wsale_filmstrip_default" separator=" "/>
1533 </div>
1534 <div name="o_wsale_filmstrip_placeholder" position="attributes">
1535 <attribute name="t-if">not c.has_published_products</attribute>
1536 </div>
1537 </template>
1538 <template
1539 id="website_sale.filmstrip_categories_grid"
1540 inherit_id="website_sale.filmstrip_categories"
1541 name="Categories Filmstrip Grid"
1542 active="False"
1543 >
1544 <div id="o_wsale_categories_filmstrip" position="attributes">
1545 <attribute name="class" add="o_wsale_filmstrip_grid" remove="o_wsale_filmstrip_default" separator=" "/>
1546 </div>
1547 </template>
1548 <template
1549 id="website_sale.filmstrip_categories_large_images"
1550 inherit_id="website_sale.filmstrip_categories"
1551 name="Categories Filmstrip Cover"
1552 active="False"
1553 >
1554 <div id="o_wsale_categories_filmstrip" position="attributes">
1555 <attribute name="class" add="o_wsale_filmstrip_large_images" remove="o_wsale_filmstrip_default" separator=" "/>
1556 </div>
1557 <div name="o_wsale_filmstrip_placeholder" position="attributes">
1558 <attribute name="class" remove="o_wsale_filmstrip_placeholder" add="o_wsale_filmstrip_no_image" separator=" "/>
1559 </div>
1560 <div name="o_wsale_filmstrip_image" position="attributes">
1561 <attribute name="t-attf-style">background-image:url('data:image/png;base64, #{c.image_512 if c.image_512 else c.image_128}')</attribute>
1562 </div>
1563 </template>
1564
1565 <!-- Floating Toolbar -->
1566 <template
1567 id="website_sale.floating_bar"
1568 name="Shop Floating Bar"
1569 inherit_id="website_sale.products"
1570 active="False"
1571 >
1572 <xpath expr="//div[hasclass('o_wsale_products_main_row')]" position="attributes">
1573 <attribute name="class" add="position-relative" separator=" "/>
1574 </xpath>
1575
1576 <xpath expr="//div[@id='o_wsale_pager']" position="attributes">
1577 <attribute name="t-attf-class" add="o_wsale_pager_accommodate_floating" separator=" "/>
1578 </xpath>
1579
1580 <xpath expr="//div[@id='products_grid']" position="after">
1581 <t
1582 t-set="floatBar_hasSort"
1583 t-value="is_view_active('website_sale.sort')"
1584 />
1585 <t
1586 t-set="floatBar_hasSearch"
1587 t-value="is_view_active('website_sale.search')"
1588 />
1589 <t
1590 t-set="website_sale_pricelists"
1591 t-value="website_sale_pricelists or website.get_pricelist_available(show_visible=True)"
1592 />
1593 <t
1594 t-set="floatBar_hasPricelist"
1595 t-value="website_sale_pricelists and len(website_sale_pricelists)&gt;1"
1596 />
1597 <div
1598 id="o_wsale_floating_bar_rail"
1599 class="o_not_editable position-absolute top-0 bottom-0 d-flex justify-content-end align-items-end p-0"
1600 >
1601 <nav
1602 id="o_wsale_floating_bar"
1603 t-attf-class="navbar position-sticky d-flex gap-1 gap-lg-2 flex-shrink-0 bg-body rounded mb-2 px-2 px-lg-3 shadow {{floatBar_hasSearch and 'ps-1 ps-lg-1'}}"
1604 >
1605 <div t-if="floatBar_hasSearch">
1606 <a
1607 t-attf-class="btn o_not_editable {{(wsale_has_filters_btn or floatBar_hasSort or floatBar_hasPricelist) and 'me-n2'}}"
1608 data-bs-target="#o_wsale_search_modal"
1609 data-bs-toggle="modal"
1610 role="button"
1611 title="Search Products"
1612 href="#"
1613 >
1614 <i class="oi oi-search" role="img"/>
1615 </a>
1616 </div>
1617 <span
1618 t-if="floatBar_hasSearch and (wsale_has_filters_btn or floatBar_hasSort or floatBar_hasPricelist)"
1619 t-attf-class="align-self-stretch border-start opacity-50 {{(not floatBar_hasSort and not floatBar_hasPricelist and not wsale_has_filters_btn_lg) and 'd-lg-none'}}"
1620 />
1621 <t t-if="floatBar_hasPricelist" t-call="website_sale.pricelist_list"/>
1622 <t
1623 t-if="floatBar_hasSort"
1624 t-call="website_sale.sort"
1625 />
1626 <button
1627 t-if="wsale_has_filters_btn"
1628 t-attf-class="btn btn-{{navClass}} position-relative {{not wsale_has_filters_btn_lg and 'd-lg-none'}}"
1629 data-bs-toggle="offcanvas"
1630 data-bs-target="#o_wsale_offcanvas"
1631 >
1632 <i class="oi oi-settings-adjust" role="img"/>
1633 <span
1634 t-if="isFilteringByPrice or attrib_set or tags"
1635 t-attf-class="position-absolute top-0 start-100 translate-middle rounded-circle bg-danger p-1"
1636 >
1637 <span class="visually-hidden">filters active</span>
1638 </span>
1639 </button>
1640 </nav>
1641 </div>
1642 </xpath>
1643 </template>
1644
1645 <!-- Add to cart button-->
1646 <template id="categories_recursive" name="Category list">
1647 <li class="nav-item mb-1" t-att-data-publish="c.has_published_products and 'on' or 'off'">
1648 <t t-call="website_sale.categorie_link"/>
1649 <!-- Dynamic category display based on search -->
1650 <t t-set="children" t-value="not search and c.child_id or c.child_id.filtered(lambda c: c.id in search_categories_ids)"/>
1651 <!-- Only show categories with published products to portal users preventing from access errors -->
1652 <t t-set="children" t-value="request.env.user._is_internal() and children or children.filtered('has_published_products')"/>
1653
1654 <ul t-if="children" class="nav flex-column nav-hierarchy mt-1 ps-3">
1655 <t t-foreach="children" t-as="c">
1656 <t t-if="not search or c.id in search_categories_ids">
1657 <t t-call="website_sale.categories_recursive" />
1658 </t>
1659 </t>
1660 </ul>
1661 </li>
1662 </template>
1663
1664 <template id="categorie_link" name="Category Link">
1665 <a
1666 t-att-href="keep('%s/category/%s' % (shop_path, slug(c)))"
1667 t-attf-class="{{c.id == category.id and 'text-decoration-underline'}} p-0"
1668 t-field="c.name"
1669 />
1670 </template>
1671
1672 <template id="website_sale.products_categories_list" active="True" name="eCommerce Categories">
1673 <!--
1674 We must keep `t-attf-class` attr. for both following divs to work correctly with
1675 products_categories_list_collapsible and option_collapse_products_categories
1676 -->
1677 <div t-attf-class="d-contents">
1678 <h6 t-attf-class="o_categories_collapse_title {{_titleClasses}}"><b>Categories</b></h6>
1679 <div name="wsale_products_categories_list" t-attf-class="wsale_products_categories_list">
1680 <ul class="nav d-flex flex-column mb-3">
1681 <li class="nav-item mb-1">
1682 <a
1683 t-att-href="keep(shop_path)"
1684 t-attf-class="{{not category and 'text-decoration-underline'}} p-0"
1685 >
1686 All Products
1687 </a>
1688 </li>
1689 <t t-foreach="categories" t-as="c">
1690 <t t-call="website_sale.categories_recursive"/>
1691 </t>
1692 </ul>
1693 </div>
1694 </div>
1695 </template>
1696
1697 <template
1698 id="website_sale.products_categories_list_collapsible"
1699 inherit_id="website_sale.products_categories_list"
1700 name="Collapsed eCommerce Categories"
1701 >
1702 <xpath expr="//div" position="attributes">
1703 <attribute
1704 name="t-attf-class"
1705 add="{{not isOffcanvas and 'accordion-item'}}"
1706 remove="d-contents"
1707 separator=" "
1708 />
1709 </xpath>
1710 <xpath expr="//h6" position="attributes">
1711 <attribute name="t-attf-class" add="accordion-header" separator=" "/>
1712 </xpath>
1713 <xpath expr="//h6//b" position="replace">
1714 <button
1715 class="accordion-button px-0 bg-transparent shadow-none"
1716 type="button"
1717 data-bs-toggle="collapse"
1718 t-attf-data-bs-target="#o_wsale_categories"
1719 t-attf-aria-controls="o_wsale_categories"
1720 aria-expanded="true"
1721 >
1722 <b>Categories</b>
1723 </button>
1724 </xpath>
1725
1726 <xpath expr="//div//div" position="attributes">
1727 <attribute
1728 name="t-attf-id"
1729 add="{{not isOffcanvas and 'o_wsale_categories'}}"
1730 separator=" "
1731 />
1732 <attribute
1733 name="t-attf-class"
1734 add="{{not isOffcanvas and 'accordion-collapse collapse show'}}"
1735 separator=" "
1736 />
1737 </xpath>
1738 </template>
1739
1740 <template id="option_collapse_categories_recursive" name="Collapse Category Recursive">
1741 <!-- Dynamic category display based on search -->
1742 <t t-set="children" t-value="not search and c.child_id or c.child_id.filtered(lambda c: c.id in search_categories_ids)"/>
1743 <!-- Only show categories with published products to portal users preventing from access errors -->
1744 <t t-set="children" t-value="request.env.user._is_internal() and children or children.filtered('has_published_products')"/>
1745
1746 <t t-if="children">
1747 <t t-set="isOpen" t-value="c.id in category.parents_and_self.ids"/>
1748
1749 <li class="nav-item" t-att-data-publish="c.has_published_products and 'on' or 'off'">
1750 <div class="accordion-header d-flex mb-1">
1751 <t t-call="website_sale.categorie_link"/>
1752 <button t-attf-id="o_wsale_cat_accordion_title_{{c.id}}"
1753 t-attf-class="o_categories_recursive_button accordion-button p-0 ms-3 {{not isOpen and 'collapsed'}} w-auto flex-grow-1 bg-transparent shadow-none"
1754 t-attf-data-bs-target="#o_wsale_cat_accordion_{{c.id}}"
1755 t-att-aria-expanded="isOpen and 'true' or 'false'"
1756 t-attf-aria-controls="o_wsale_cat_accordion_{{c.id}}"
1757 data-bs-toggle="collapse"
1758 type="button"/>
1759 </div>
1760 <ul t-attf-id="o_wsale_cat_accordion_{{c.id}}"
1761 t-attf-class="accordion-collapse list-unstyled ps-2 collapse {{isOpen and 'show'}}"
1762 t-attf-aria-labelledby="o_wsale_cat_accordion_title_{{c.id}}">
1763 <t t-set="parentCategoryId" t-value="c.id"/>
1764 <t t-if="isOffcanvas" t-set="parentCategoryId" t-valuef="offcanvas_{{c.id}}"/>
1765
1766 <t t-foreach="children" t-as="c">
1767 <t t-call="website_sale.option_collapse_categories_recursive"/>
1768 </t>
1769 </ul>
1770 </li>
1771 </t>
1772
1773 <li t-else="" class="nav-item mb-1"
1774 t-att-data-publish="c.has_published_products and 'on' or 'off'">
1775 <t t-if="isOffcanvas" t-set="parentCategoryId" t-valuef="offcanvas"/>
1776 <div class="d-flex flex-wrap justify-content-between align-items-center">
1777 <t t-call="website_sale.categorie_link"/>
1778 </div>
1779 </li>
1780 </template>
1781
1782 <template id="option_collapse_products_categories" name="Collapsible Category List" inherit_id="website_sale.products_categories_list" active="False">
1783 <xpath expr="//t[@t-call='website_sale.categories_recursive']" position="attributes">
1784 <attribute name="t-call">website_sale.option_collapse_categories_recursive</attribute>
1785 </xpath>
1786 </template>
1787
1788 <template id="products_attributes" inherit_id="website_sale.products" active="True" name="Attributes &amp; Variants filters">
1789 <xpath expr="//div[contains(@t-attf-class, 'products_attributes_filters')]" position="inside">
1790 <div t-if="attributes or all_tags" id="wsale_products_attributes_collapse"
1791 class=" position-relative">
1792 <t t-call="website_sale.product_attribute_filters_form">
1793 <t t-set="isMobile" t-value="False"/>
1794 </t>
1795 </div>
1796 </xpath>
1797 </template>
1798
1799 <template
1800 id="products_attributes_collapsible"
1801 name="Collapsed Attributes &amp; Variants filters"
1802 inherit_id="website_sale.product_attribute_filters_form"
1803 >
1804 <xpath expr="//form" position="attributes">
1805 <t t-if="not isMobile">
1806 <attribute
1807 name="t-attf-class"
1808 add="wsale_accordion_collapsible accordion accordion-flush"
1809 remove="mb-2"
1810 separator=" "
1811 />
1812 </t>
1813 </xpath>
1814 <xpath expr="//div[contains(@t-attf-class, 'accordion-item')]//h6" position="replace">
1815 <div t-if="not isMobile" class="accordion-header h6 mb-0">
1816 <button
1817 t-attf-class="accordion-button px-0 bg-transparent shadow-none {{'' if _expand_attributes else 'collapsed'}}"
1818 type="button"
1819 data-bs-toggle="collapse"
1820 t-attf-data-bs-target="#o_products_attributes_{{a.id}}"
1821 t-attf-aria-controls="o_products_attributes_{{a.id}}"
1822 t-att-aria-expanded="_expand_attributes"
1823 >
1824 <b t-field="a.name"/>
1825 </button>
1826 </div>
1827 </xpath>
1828 <xpath expr="//div[contains(@t-attf-id, 'o_products_attributes_')]" position="attributes">
1829 <attribute
1830 name="t-attf-class"
1831 add="accordion-collapse collapse {{'show' if _expand_attributes else ''}}"
1832 separator=" "
1833 />
1834 <attribute name="data-bs-parent" add="wsale_products_attributes_collapse"/>
1835 </xpath>
1836 </template>
1837
1838 <template id="filter_products_price" name="Filter by Prices">
1839 <t t-set="is_disabled" t-value="available_min_price == available_max_price"/>
1840 <div
1841 id="o_wsale_price_range_option"
1842 t-attf-class="position-relative {{_classes}} {{is_disabled and 'opacity-75 pe-none user-select-none'}}"
1843 >
1844 <t t-if="is_sidebar_collapsible">
1845 <div class="accordion-item">
1846 <div class="accordion-header h6 mb-0">
1847 <button
1848 class="accordion-button px-0 bg-transparent shadow-none"
1849 type="button"
1850 data-bs-toggle="collapse"
1851 t-attf-data-bs-target="#o_wsale_price_range_option_inner"
1852 t-attf-aria-controls="o_wsale_price_range_option_inner"
1853 aria-expanded="true"
1854 >
1855 <b>Price Range</b>
1856 </button>
1857 </div>
1858 <div
1859 id="o_wsale_price_range_option_inner"
1860 class="accordion-collapse collapse show"
1861 >
1862 <input
1863 type="range"
1864 multiple="multiple"
1865 t-attf-class="form-range range-with-input {{_classes_input}}"
1866 t-att-data-currency="website.currency_id.symbol"
1867 t-att-data-currency-position="website.currency_id.position"
1868 t-att-data-url="keep(min_price=0, max_price=0)"
1869 t-att-step="website.currency_id.rounding"
1870 t-att-min="'%f' % (available_min_price)"
1871 t-att-max="'%f' % (available_max_price)"
1872 t-att-value="'%f,%f' % (min_price, max_price)"
1873 />
1874 </div>
1875 </div>
1876 </t>
1877 <t t-else="">
1878 <label t-attf-class="h6 m-0 {{_classes_title}}">
1879 <b>Price Range</b>
1880 </label>
1881 <input
1882 type="range"
1883 multiple="multiple"
1884 t-attf-class="form-range range-with-input {{_classes_input}}"
1885 t-att-data-currency="website.currency_id.symbol"
1886 t-att-data-currency-position="website.currency_id.position"
1887 t-att-data-url="keep(min_price=0, max_price=0)"
1888 t-att-step="website.currency_id.rounding"
1889 t-att-min="'%f' % (available_min_price)"
1890 t-att-max="'%f' % (available_max_price)"
1891 t-att-value="'%f,%f' % (min_price, max_price)"
1892 />
1893 </t>
1894 </div>
1895 </template>
1896
1897 <template id="filter_products_tags" name="Filter by Tags" active="True">
1898 <div t-if="all_tags" class="accordion-item">
1899 <div class="accordion-header h6 mb-0">
1900 <button class="accordion-button px-0 bg-transparent shadow-none"
1901 type="button"
1902 data-bs-toggle="collapse"
1903 aria-expanded="true"
1904 t-attf-data-bs-target="#o_wsale_tags_option_inner"
1905 t-attf-aria-controls="o_wsale_tags_option_inner">
1906 <b>Tags</b>
1907 </button>
1908 </div>
1909 <div id="o_wsale_tags_option_inner" class="accordion-collapse collapse show">
1910 <div class="flex-column mb-3">
1911 <t t-call="website_sale.filter_products_tags_list">
1912 <t t-set="all_tags" t-value="all_tags"/>
1913 </t>
1914 </div>
1915 </div>
1916 </div>
1917 </template>
1918
1919 <template id="filter_products_tags_list">
1920 <t t-foreach="all_tags" t-as="tag" class="list-group-item border-0 ps-0 pb-0">
1921 <div class="form-check mb-1">
1922 <input type="checkbox"
1923 name="tags"
1924 class="form-check-input"
1925 t-attf-id="tag_#{tag.id}"
1926 t-att-value="tag.id"
1927 t-att-checked="'checked' if tag.id in tags else None"
1928 />
1929 <label class="form-check-label fw-normal" t-attf-for="tag_#{tag.id}" t-field="tag.name"/>
1930 </div>
1931 </t>
1932 </template>
1933
1934 <template id="products_list_view" inherit_id="website_sale.products" active="False" name="List View (by default)">
1935 <xpath expr="//div[@id='products_grid']" position="after">
1936 <!-- Nothing to do, this view is only meant to allow the server -->
1937 <!-- to know if the list view layout should be used -->
1938 </xpath>
1939 </template>
1940
1941 <!-- Enable HTML previews in edition mode. The template is active by default, but can be
1942 manually disabled for advanced debug if necessary -->
1943 <template id="website_sale.editor_previews" name="Enable edit previews" inherit_id="website_sale.products">
1944 <xpath expr="//div[@id='wrap']" position="before">
1945 <t t-set="editionPreviews" t-value="true" groups="website.group_website_designer"/>
1946 </xpath>
1947 </template>
1948
1949 <!-- /shop/product page -->
1950 <template id="base_unit_price" name="Product Base unit price">
1951 <span
1952 class="o_base_unit_price"
1953 t-out="base_unit_price"
1954 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
1955 />
1956 / <span class="oe_custom_base_unit" t-field="product.base_unit_name"/>
1957 </template>
1958
1959 <template id="website_sale.product" name="Product" track="1">
1960 <!-- Qweb variable defining the class suffix for navbar items.
1961 Change accordingly to the derired visual result (eg. `primary`, `dark`...)-->
1962 <t t-set="navClass" t-valuef="light"/>
1963
1964 <t
1965 t-set="is_fullwidth_content"
1966 t-value="website.product_page_image_width in ['none', '100_pc']"
1967 />
1968 <t t-set="is_50_pc" t-value="website.product_page_image_width == '50_pc'"/>
1969
1970 <t t-call="website.layout">
1971 <t t-set="additional_title" t-value="product.name" />
1972 <div id="wrap" class="js_sale o_wsale_product_page">
1973 <div class="oe_structure oe_empty oe_structure_not_nearest" id="oe_structure_website_sale_product_1" data-editor-message.translate="DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS"/>
1974 <section id="product_detail"
1975 t-attf-class="oe_website_sale mt-1 mt-lg-2 mb-5 #{'discount'
1976 if combination_info['has_discounted_price'] else ''}
1977 {{website._get_product_page_container() == 'regular' and 'o_wsale_container_lg container-lg' or (website._get_product_page_container() == 'fluid' and 'o_wsale_container_fluid container-fluid' or false)}}
1978 o_wsale_product_page_opt_image_width_{{website.product_page_image_width}}
1979 o_wsale_product_page_opt_image_ratio_{{website.product_page_image_ratio}}
1980 o_wsale_product_page_opt_image_ratio_mobile_{{website.product_page_image_ratio_mobile}}
1981 o_wsale_product_page_opt_image_radius_{{website.product_page_image_roundness}}
1982 "
1983 t-att-data-image-ratio="website.product_page_image_ratio"
1984 t-att-data-view-track="view_track and '1' or '0'"
1985 >
1986 <div class="o_wsale_content_contained container d-flex flex-wrap align-items-center py-3">
1987 <div class="d-flex align-items-center flex-grow-1">
1988 <ol class="o_wsale_breadcrumb breadcrumb m-0 p-0">
1989 <li class="breadcrumb-item d-none d-lg-inline-block">
1990 <a t-att-href="keep(shop_path)">
1991 <t t-call="website_sale.all_products_link_name"/>
1992 </a>
1993 </li>
1994 <t t-foreach="category.parents_and_self" t-as="cat">
1995 <li
1996 class="breadcrumb-item d-none d-lg-inline-block"
1997 >
1998 <a
1999 class="py-2 py-lg-0"
2000 t-att-href="keep('%s/category/%s' % (shop_path, slug(cat)))"
2001 >
2002 <i
2003 class="oi oi-chevron-left d-lg-none me-1"
2004 role="img"
2005 />
2006 <t t-out="cat.name"/>
2007 </a>
2008 </li>
2009 </t>
2010 <li class="breadcrumb-item d-none d-lg-inline-block active">
2011 <span t-field="product.name" />
2012 </li>
2013 <li class="breadcrumb-item d-lg-none">
2014 <a t-att-href="category and keep('%s/category/%s' % (shop_path, slug(cat))) or keep(shop_path)">
2015 <i class="oi oi-chevron-left me-2" role="img"/>
2016 <t t-if="category.name" t-out="category.name"/>
2017 <t t-else="" t-call="website_sale.all_products_link_name"/>
2018 </a>
2019 </li>
2020 </ol>
2021 <div class="d-flex d-md-none gap-2 ms-auto">
2022 <t t-call="website_sale.pricelist_list"/>
2023 <a
2024 t-attf-class="o_wsale_product_search_mobile_btn o_not_editable btn btn-{{navClass}} d-none"
2025 data-bs-target="#o_wsale_product_search_modal"
2026 data-bs-toggle="modal"
2027 role="button"
2028 title="Search Products"
2029 href="#"
2030 >
2031 <i class="oi oi-search" role="presentation"/>
2032 </a>
2033 </div>
2034 </div>
2035 <div
2036 class="o_wsale_product_top_bar_desktop d-none d-md-inline-flex flex-wrap gap-2 w-auto mb-lg-auto"
2037 >
2038 <t t-call="website_sale.pricelist_list"/>
2039 </div>
2040 </div>
2041 <div
2042 t-attf-class="row align-items-lg-start {{website.product_page_cols_order == 'inverse' and 'flex-lg-row-reverse' or ''}}"
2043 id="product_detail_main"
2044 data-name="Product Page"
2045 t-att-data-image_layout="website.product_page_image_layout"
2046 >
2047 <div
2048 t-attf-class="o_wsale_product_images col o_wsale_sticky_object"
2049 t-att-data-image-amount="len(product_variant._get_images() if product_variant else product._get_images())"
2050 >
2051 <t t-call="website_sale.shop_product_images"/>
2052 </div>
2053 <div
2054 id="product_details"
2055 t-attf-class="position-relative position-lg-sticky o_wsale_sticky_object col"
2056 >
2057 <div id="o_wsale_product_details_content" t-attf-class="js_product js_main_product o_wsale_content_contained container">
2058
2059 <!-- Product title (purchase not available)-->
2060 <t t-set="is_add_to_cart_possible" t-value="product._is_add_to_cart_possible()"/>
2061 <t
2062 t-if="not is_add_to_cart_possible"
2063 t-call="website_sale.product_title"
2064 />
2065
2066 <form t-if="is_add_to_cart_possible">
2067 <!-- Product title (purchase available)-->
2068 <t t-call="website_sale.product_title"/>
2069
2070 <div
2071 t-if="not is_view_active('website_sale.cta_wrapper_boxed')"
2072 class="o_wsale_product_details_content_section o_wsale_product_details_content_section_price mb-4"
2073 >
2074 <t t-call="website_sale.product_price"/>
2075 <small t-if="combination_info.get('base_unit_price')"
2076 class="ms-1 text-muted o_base_unit_price_wrapper d-none">
2077 <t t-call="website_sale.base_unit_price">
2078 <t
2079 t-set="base_unit_price"
2080 t-value="combination_info['base_unit_price']"
2081 />
2082 </t>
2083 </small>
2084 </div>
2085
2086 <input
2087 type="hidden"
2088 name="csrf_token"
2089 t-att-value="request.csrf_token()"
2090 />
2091
2092 <t name="variant_info">
2093 <input
2094 type="hidden"
2095 class="o_not_editable product_id"
2096 name="product_id"
2097 t-att-value="product_variant.id"
2098 />
2099 <input
2100 type="hidden"
2101 class="o_not_editable product_template_id"
2102 name="product_template_id"
2103 t-att-value="product.id"
2104 />
2105 <input
2106 t-if="product.public_categ_ids.ids"
2107 type="hidden"
2108 class="product_category_id"
2109 name="product_category_id"
2110 t-att-value="product.public_categ_ids.ids[0]"
2111 />
2112 <input
2113 type="hidden"
2114 name="product_type"
2115 t-att-value="product.type"
2116 />
2117 <div
2118 t-attf-class="o_wsale_product_details_content_section o_wsale_product_details_content_section_attributes mb-4 {{not (product.valid_product_template_attribute_line_ids or product._has_multiple_uoms()) and 'd-none' or ''}}"
2119 >
2120 <t t-call="website_sale.variants">
2121 <t t-set="ul_class" t-valuef="flex-column" />
2122 <t t-set="parent_combination" t-value="None" />
2123 <t
2124 t-set="combination"
2125 t-value="combination_info['combination']"
2126 />
2127 </t>
2128 </div>
2129 </t>
2130 <div class="o_wsale_product_details_content_section o_wsale_product_details_content_section_cta mb-4">
2131 <t
2132 t-call="website_sale.cta_wrapper"
2133 />
2134 <t
2135 t-if="is_view_active('website_sale.product_terms_and_conditions')"
2136 t-call="website_sale.product_terms_and_conditions"
2137 />
2138 </div>
2139
2140 <div
2141 class="o_wsale_product_details_content_section o_wsale_product_details_content_section_accordion mb-4"
2142 t-if="is_view_active('website_sale_comparison.accordion_specs_item') or is_view_active('website_sale.accordion_more_information')"
2143 >
2144 <t t-call="website_sale.product_accordion"/>
2145 </div>
2146
2147 <div
2148 t-if="combination_info['prevent_zero_price_sale']"
2149 class="o_wsale_product_details_content_section o_wsale_product_details_content_section_contact mb-4"
2150 >
2151 <div
2152 id="contact_us_wrapper"
2153 t-attf-class="d-flex oe_structure oe_structure_solo #{_div_classes}"
2154 >
2155 <section
2156 class="s_text_block"
2157 data-snippet="s_text_block"
2158 data-name="Text">
2159 <div class="container">
2160 <a
2161 t-att-href="website.contact_us_button_url"
2162 t-att-data-url="website.contact_us_button_url"
2163 class="btn btn-primary btn_cta"
2164 >
2165 Contact Us
2166 </a>
2167 </div>
2168 </section>
2169 </div>
2170 </div>
2171 <t
2172 t-set="single_value_attributes"
2173 t-value="product.valid_product_template_attribute_line_ids._prepare_single_value_for_display()"
2174 />
2175 <div
2176 id="product_attributes_simple"
2177 t-if="single_value_attributes"
2178 class="o_wsale_product_details_content_section o_wsale_product_details_content_section_specs mb-4"
2179 >
2180 <table t-attf-class="table table-sm text-muted {{'' if single_value_attributes else 'd-none'}}">
2181 <t t-foreach="single_value_attributes" t-as="attribute">
2182 <tr>
2183 <td>
2184 <span t-field="attribute.name"/>:
2185 <t
2186 t-foreach="single_value_attributes[attribute]"
2187 t-as="ptal"
2188 >
2189 <span t-field="ptal.product_template_value_ids._only_active().name"/>
2190 <t t-if="not ptal_last">, </t>
2191 </t>
2192 </td>
2193 </tr>
2194 </t>
2195 </table>
2196 </div>
2197 <t t-set="product_documents" t-value="product.sudo().product_document_ids.filtered(lambda doc: doc.shown_on_product_page)"/>
2198 <div
2199 id="product_documents"
2200 class="o_wsale_product_details_content_section o_wsale_product_details_content_section_documents mb-4"
2201 t-if="product_documents"
2202 >
2203 <strong>Documents</strong>
2204 <div class="list-group">
2205 <t t-foreach="product_documents" t-as="document_sudo">
2206 <t
2207 t-set="attachment_sudo"
2208 t-value="document_sudo.ir_attachment_id"
2209 />
2210 <t
2211 t-set="target"
2212 t-value="attachment_sudo.type == 'url' and '_blank' or '_self'"
2213 />
2214 <t
2215 t-set="icon"
2216 t-value="attachment_sudo.type == 'url' and 'fa-link' or 'fa-download'"
2217 />
2218 <a
2219 class="list-group-item list-group-item-action"
2220 t-att-href="'/shop/' + slug(product) + '/document/' + str(document_sudo.id)"
2221 t-att-target="target">
2222 <i t-att-class="'fa ' + icon + ' me-2'"/>
2223 <t t-out="attachment_sudo.name"/>
2224 </a>
2225 </t>
2226 </div>
2227 </div>
2228 </form>
2229 </div>
2230 </div>
2231 </div>
2232 </section>
2233 <div
2234 id="product_full_description"
2235 t-field="product.website_description"
2236 class="oe_structure oe_empty mt16"
2237 />
2238 <div class="oe_structure oe_empty oe_structure_not_nearest mt16" id="oe_structure_website_sale_product_2" data-editor-message.translate="DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS"/>
2239 </div>
2240 <div
2241 id="o_wsale_product_search_modal"
2242 class="modal fade css_editable_mode_hidden"
2243 aria-hidden="true"
2244 tabindex="-1"
2245 >
2246 <div class="modal-dialog modal-lg pt-5">
2247 <div class="modal-content mt-5 bg-transparent border-0">
2248 <div class="o_container_small">
2249 <t t-call="website.website_search_box_input">
2250 <t t-set="default_style" t-valuef="true"/>
2251 <t t-set="search_type" t-valuef="products"/>
2252 <t t-set="_classes" t-valuef="input-group rounded o_cc o_cc1 mb-1"/>
2253 <t t-set="_input_classes" t-valuef="border-0 p-3"/>
2254 <t t-set="_submit_classes" t-valuef="px-4"/>
2255 <t t-if="category" t-set="placeholder">Search in <t t-out="category.name"/></t>
2256 </t>
2257 </div>
2258 </div>
2259 </div>
2260 </div>
2261 </t>
2262 </template>
2263
2264 <template id="website_sale.product_title">
2265 <div
2266 t-attf-class="o_wsale_product_details_content_section o_wsale_product_details_content_section_title {{'mb-3' if not product.description_ecommerce else ''}}"
2267 >
2268 <!-- FIXME VCR variable seems unused -->
2269 <t t-set="base_url" t-value="website.get_base_url()"/>
2270 <h1
2271 t-attf-class="h3 {{'mb-3' if not product.description_ecommerce and not is_view_active('website_sale.product_comment') else ''}}"
2272 t-field="product.name"
2273 >
2274 Product Name
2275 </h1>
2276 <t t-if="is_view_active('website_sale.product_comment')">
2277 <a
2278 href="#o_product_page_reviews"
2279 class="o_product_page_reviews_link d-block mb-2 text-decoration-none"
2280 >
2281 <t t-call="portal_rating.rating_widget_stars_static">
2282 <!-- sudo: product.product - visitor can access product average rating -->
2283 <t t-set="rating_avg" t-value="product.sudo().rating_avg"/>
2284 <t t-set="trans_text_plural">%s reviews</t>
2285 <t t-set="trans_text_singular">%s review</t>
2286 <t
2287 t-set="rating_count"
2288 t-value="(trans_text_plural if product.rating_count > 1 else trans_text_singular) % product.rating_count"
2289 />
2290 </t>
2291 </a>
2292 </t>
2293 <div
2294 t-field="product.description_ecommerce"
2295 t-attf-class="oe_structure mb-3 text-muted"
2296 placeholder="A detailed, formatted description to promote your product on this page. Use '/' to discover more features."
2297 />
2298 <t
2299 t-if="is_view_active('website_sale.product_tags')"
2300 t-call="website_sale.product_tags"
2301 >
2302 <t
2303 t-set="all_product_tags"
2304 t-value="product_variant.all_product_tag_ids"
2305 />
2306 </t>
2307 <p t-if="(not is_add_to_cart_possible) and (not product.active)" class="alert alert-warning">
2308 This product is no longer available.
2309 </p>
2310 <p t-elif="not is_add_to_cart_possible" class="alert alert-warning">
2311 This product has no valid combination.
2312 </p>
2313 </div>
2314 </template>
2315
2316 <template id="website_sale.cta_wrapper" name="CTA Wrapper">
2317 <div
2318 id="o_wsale_cta_wrapper"
2319 t-att-class="'d-flex flex-wrap align-items-center gap-2 mb-4' +
2320 (' w-100 w-lg-auto' if is_50_pc else ' w-100') +
2321 (' ' if not is_fullwidth_content and not is_view_active('website_sale.cta_wrapper_boxed') else ' ')"
2322 >
2323 <div
2324 id="add_to_cart_wrap"
2325 t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-flex'}} flex-grow-1 flex-lg-grow-0 flex-wrap align-items-center gap-2 {{'' if is_50_pc else ' w-100'}}"
2326 >
2327 <a
2328 id="add_to_cart"
2329 role="button"
2330 href="#"
2331 t-attf-class="btn btn-primary js_check_product a-submit flex-grow-1"
2332 t-att-data-show-quantity="is_view_active('website_sale.product_quantity')"
2333 data-animation-selector=".o_wsale_product_images"
2334 >
2335 <i class="fa fa-shopping-cart me-2"/>
2336 Add to cart
2337 </a>
2338 </div>
2339 <div
2340 id="product_option_block"
2341 t-attf-class="d-flex d-empty-none flex-wrap gap-2 w-100 {{'w-sm-auto' if is_50_pc and not (is_view_active('website_sale.cta_wrapper_boxed') or is_view_active('website_sale.cta_wrapper_large')) else ''}}"
2342 />
2343 </div>
2344 </template>
2345
2346 <template
2347 id="website_sale.cta_wrapper_boxed"
2348 inherit_id="website_sale.cta_wrapper"
2349 active="False"
2350 name="Bordered CTA Wrapper"
2351 >
2352 <xpath expr="//div[@id='o_wsale_cta_wrapper']" position="attributes">
2353 <attribute
2354 name="t-att-class"
2355 remove="pt-3"
2356 add="' o_wsale_cta_wrapper_boxed border rounded p-3'"
2357 separator=" + "
2358 />
2359 </xpath>
2360 <xpath expr="//div[@id='add_to_cart_wrap']" position="attributes">
2361 <attribute name="t-attf-class" remove="flex-lg-grow-0" separator=" "/>
2362 </xpath>
2363 <xpath expr="//div[@id='product_option_block']" position="attributes">
2364 <attribute name="t-att-class" remove="flex-lg-grow-0" separator=" "/>
2365 </xpath>
2366 <xpath expr="//div[@id='o_wsale_cta_wrapper']" position="inside">
2367 <div class="d-flex gap-5 flex-grow-1 justify-content-between align-items-center order-first w-100 mb-3 pb-3 border-bottom">
2368 <span name="o_wsale_cta_wrapper_boxed_price_label" class="text-muted">Price</span>
2369 <t t-call="website_sale.product_price"/>
2370 </div>
2371 </xpath>
2372 </template>
2373
2374 <template
2375 id="website_sale.cta_wrapper_large"
2376 inherit_id="website_sale.cta_wrapper"
2377 active="False"
2378 name="Large CTA Wrapper">
2379 <xpath expr="//div[@id='o_wsale_cta_wrapper']" position="attributes">
2380 <attribute name="t-att-class" add="' o_wsale_cta_wrapper_large'" separator=" + "/>
2381 </xpath>
2382 <xpath expr="//div[@id='add_to_cart_wrap']" position="attributes">
2383 <attribute name="t-attf-class" remove="flex-lg-grow-0" separator=" "/>
2384 </xpath>
2385 <xpath expr="//div[@id='product_option_block']" position="attributes">
2386 <attribute name="t-att-class" remove="flex-lg-grow-0" separator=" "/>
2387 </xpath>
2388 <xpath expr="//a[@id='add_to_cart']" position="attributes">
2389 <attribute
2390 name="t-attf-class"
2391 add="btn-lg {{('' if is_50_pc else ' px-xl-0')}}"
2392 separator=" "
2393 />
2394 </xpath>
2395 </template>
2396
2397 <template
2398 id="website_sale.cta_separator"
2399 inherit_id="website_sale.product"
2400 name="Product Info - Dividers">
2401 <xpath expr="//section[@id='product_detail']" position="attributes">
2402 <attribute
2403 name="t-attf-class"
2404 add="o_wsale_product_page_opt_separators"
2405 separator=" "
2406 />
2407 </xpath>
2408 </template>
2409
2410 <template
2411 id="website_sale.product_search"
2412 inherit_id="website_sale.product"
2413 active="False"
2414 name="Searchbar On Product Page"
2415 >
2416 <xpath expr="//div[hasclass('o_wsale_product_top_bar_desktop')]" position="inside">
2417 <t t-call="website_sale.search">
2418 <t t-set="search" t-value="False"/>
2419 <t t-set="_classes" t-value="'me-sm-2'"/>
2420 </t>
2421 </xpath>
2422 <xpath expr="//a[contains(@t-attf-class, 'o_wsale_product_search_mobile_btn')]" position="attributes">
2423 <attribute name="t-attf-class" add="d-md-none" remove="d-none" separator=" "/>
2424 </xpath>
2425 </template>
2426
2427 <template id="all_products_link_name" name="All Products name">
2428 <span placeholder="All products">All products</span>
2429 </template>
2430
2431 <template id="product_accordion" name="Accordion On Product Page">
2432 <div
2433 t-if="is_view_active('website_sale_comparison.accordion_specs_item')
2434 or is_view_active('website_sale.accordion_more_information')"
2435 id="product_accordion"
2436 class="o_accordion_not_initialized accordion accordion-flush my-4"
2437 >
2438 <div
2439 t-if="is_view_active('website_sale.accordion_more_information')"
2440 id="more_information_accordion_item"
2441 class="accordion-item"
2442 />
2443 </div>
2444 </template>
2445
2446 <template
2447 id="accordion_more_information"
2448 name="More Information Accordion Item"
2449 inherit_id="website_sale.product_accordion"
2450 active="False"
2451 >
2452 <xpath expr="//div[@id='more_information_accordion_item']" position="inside">
2453 <div class="accordion-header my-0 h6">
2454 <button
2455 class="accordion-button collapsed fw-medium"
2456 type="button"
2457 data-bs-toggle="collapse"
2458 data-bs-target="#customizable_item"
2459 aria-expanded="false"
2460 aria-controls="customizable_item"
2461 >
2462 More Information
2463 </button>
2464 </div>
2465 <div
2466 id="customizable_item"
2467 class="accordion-collapse collapse"
2468 data-bs-parent="#product_accordion"
2469 >
2470 <div class="accordion-body py-0">
2471 <p>This content will be shared across all product pages.</p>
2472 </div>
2473 </div>
2474 </xpath>
2475 </template>
2476
2477 <template id="website_sale.product_tags" name="Product Tags" active="True">
2478 <t t-set="visible_tags" t-value="all_product_tags.filtered('visible_to_customers')"/>
2479 <div
2480 t-attf-class="o_product_tags o_field_tags {{ 'd-flex flex-wrap align-items-center gap-2 mb-2 mt-1' if visible_tags else '' }}"
2481 >
2482 <t t-foreach="visible_tags" t-as="tag">
2483 <span t-if="tag.image"
2484 class="order-0"
2485 t-field="tag.image"
2486 t-options="{'widget': 'image', 'class': 'o_product_tag_img rounded'}"
2487 />
2488 <span t-else="" class="position-relative order-1 py-1 px-2">
2489 <span class="position-absolute top-0 start-0 w-100 h-100 rounded"
2490 t-attf-style="background-color: #{tag.color}; opacity: .2;"
2491 />
2492 <span class="text-nowrap small"
2493 t-attf-style="color: #{tag.color}"
2494 t-field="tag.name"
2495 />
2496 </span>
2497 </t>
2498 </div>
2499 </template>
2500
2501 <template id="alternative_products" name="Alternative Products" inherit_id="website_sale.product" active="True">
2502 <div t-field="product.website_description" position="after">
2503 <div class="oe_structure oe_structure_solo oe_unremovable oe_unmovable" id="oe_structure_website_sale_recommended_products" t-ignore="true" t-if="product.alternative_product_ids">
2504 <section data-snippet="s_dynamic_snippet_products"
2505 class="oe_unmovable oe_unremovable s_dynamic_snippet_products o_wsale_alternative_products s_dynamic pt32 pb32 o_colored_level s_product_product_borderless_1"
2506 data-name="Alternative Products" style="background-image: none;" t-att-data-filter-id="product._get_alternative_product_filter()"
2507 data-template-key="website_sale.dynamic_filter_template_product_product_products_item" data-product-category-id="all" data-number-of-elements="4"
2508 data-number-of-elements-small-devices="1" data-number-of-records="16" data-carousel-interval="5000" data-bs-original-title="" title="">
2509 <div class="container">
2510 <div class="row s_nb_column_fixed">
2511 <section class="s_dynamic_snippet_title oe_unremovable oe_unmovable d-flex flex-column flex-md-row justify-content-between mb-lg-0 pb-3 pb-md-0">
2512 <div>
2513 <h4>Alternative Products</h4>
2514 <p class="lead">These other products might interest you</p>
2515 </div>
2516 </section>
2517 </div>
2518 <div class="o_not_editable">
2519 <div class="dynamic_snippet_template"/>
2520 </div>
2521 </div>
2522 </section>
2523 </div>
2524 </div>
2525 </template>
2526
2527 <template
2528 name="Terms and Conditions"
2529 id="website_sale.product_terms_and_conditions"
2530 active="True"
2531 priority="21">
2532 <small class="text-muted mb-0">
2533 <a href="/terms" class="o_translate_inline text-muted"><u>Terms and Conditions</u></a><br/>
2534 30-day money-back guarantee<br/>
2535 Shipping: 2-3 Business Days
2536 </small>
2537 </template>
2538
2539 <!-- Product options: Zoom -->
2540 <template inherit_id='website_sale.product' id="product_picture_magnify_click" name="Image Zoom On Click">
2541 <xpath expr='//div[hasclass("o_wsale_product_page")]' position='attributes'>
2542 <attribute name="data-ecom-zoom-click">1</attribute>
2543 <attribute name="class" separator=" " add="ecom-zoomable" />
2544 </xpath>
2545 </template>
2546
2547 <!-- Product options: OpenChatter -->
2548 <template id="product_comment" inherit_id="website_sale.product" active="False" name="Discussion and Rating" priority="15">
2549 <xpath expr="//div[@t-field='product.website_description']" position="after">
2550 <div class="o_shop_discussion_rating border-top" data-anchor='true'>
2551 <section id="o_product_page_reviews" class="container pt48 pb48" data-anchor='true'>
2552 <a class="o_product_page_reviews_title d-flex justify-content-between text-reset text-decoration-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#o_product_page_reviews_content" aria-expanded="false" aria-controls="o_product_page_reviews_content">
2553 <h2 class="fs-4 mb-0">Customer Reviews</h2>
2554 <i class="oi align-self-center"/>
2555 </a>
2556 <div id="o_product_page_reviews_content" class="collapse mt-3">
2557 <t t-call="portal.message_thread">
2558 <t t-set="object" t-value="product"/>
2559 <t t-set="display_rating" t-value="True"/>
2560 <t t-set="message_per_page" t-value="5"/>
2561 <t t-set="two_columns" t-value="true"/>
2562 </t>
2563 </div>
2564 </section>
2565 </div>
2566 </xpath>
2567 </template>
2568
2569 <template
2570 id="website_sale.product_quantity"
2571 inherit_id="website_sale.cta_wrapper"
2572 name="Select Quantity"
2573 >
2574 <div id="add_to_cart_wrap" position="inside">
2575 <div
2576 t-attf-class="css_quantity input-group {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex order-first'}} align-middle border"
2577 contenteditable="false"
2578 >
2579 <a
2580 t-attf-href="#"
2581 class="css_quantity_minus btn btn-link pe-2 js_add_cart_json border-0"
2582 aria-label="Remove one"
2583 title="Remove one"
2584 name="remove_one"
2585 >
2586 <i class="oi oi-minus text-600"/>
2587 </a>
2588 <input
2589 type="text"
2590 t-attf-class="form-control quantity text-center border-0"
2591 data-min="1"
2592 name="add_qty"
2593 t-att-value="1"
2594 />
2595 <a
2596 t-attf-href="#"
2597 class="css_quantity_plus btn btn-link ps-2 js_add_cart_json border-0"
2598 aria-label="Add one"
2599 title="Add one"
2600 >
2601 <i class="oi oi-plus text-600"/>
2602 </a>
2603 </div>
2604 </div>
2605 </template>
2606
2607 <template
2608 id="website_sale.product_quantity_large"
2609 inherit_id="website_sale.product_quantity"
2610 active="False"
2611 name="Select Quantity Large"
2612 >
2613 <xpath expr="//div[contains(@t-attf-class, 'css_quantity')]" position="attributes">
2614 <attribute
2615 name="t-attf-class"
2616 add="input-group-lg {{(' css_quantity_50' if is_50_pc else '')}}"
2617 separator=" "
2618 />
2619 </xpath>
2620 </template>
2621
2622 <template
2623 id="website_sale.product_buy_now"
2624 inherit_id="website_sale.cta_wrapper"
2625 active="False"
2626 name="Buy Now Button"
2627 >
2628 <xpath expr="//div[@id='add_to_cart_wrap']" position="inside">
2629 <a
2630 role="button"
2631 t-attf-class="btn btn-outline-primary o_we_buy_now w-100 {{'' if is_view_active('website_sale.cta_wrapper_boxed') or is_view_active('website_sale.cta_wrapper_large') or not is_50_pc else 'w-sm-auto'}} {{'flex-grow-1' if not is_50_pc else ''}}"
2632 href="#"
2633 >
2634 <i class="fa fa-bolt me-2"/>
2635 Buy now
2636 </a>
2637 </xpath>
2638 </template>
2639
2640 <template
2641 id="website_sale.product_buy_now_large"
2642 inherit_id="website_sale.product_buy_now"
2643 active="False"
2644 name="Large Buy Now Button"
2645 >
2646 <xpath expr="//a[contains(@t-attf-class, 'o_we_buy_now')]" position="attributes">
2647 <attribute name="t-attf-class" add="btn-lg" separator=" "/>
2648 </xpath>
2649 </template>
2650
2651 <template id="website_sale.tax_indication" active="False">
2652 <span
2653 t-if="website.show_line_subtotals_tax_selection == 'tax_excluded'"
2654 class="fs-6 fw-normal text-muted text-nowrap"
2655 >
2656 (Tax excluded)
2657 </span>
2658 <span t-else="" class="fs-6 fw-normal text-muted text-nowrap">
2659 (Tax included)
2660 </span>
2661 </template>
2662
2663 <template id="product_price">
2664 <div
2665 name="product_price"
2666 t-attf-class="product_price {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-block'}}"
2667 >
2668 <div
2669 name="product_price_container"
2670 class="css_editable_mode_hidden d-flex align-items-baseline justify-content-end gap-2 flex-wrap h5 mb-0 text-wrap"
2671 >
2672 <span class="oe_price"
2673 style="white-space: nowrap;"
2674 t-out="combination_info['price']"
2675 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
2676 <span t-attf-class="text-muted oe_default_price mb-0 h6 {{'' if combination_info['has_discounted_price'] else 'd-none'}}"
2677 style="text-decoration: line-through; white-space: nowrap;"
2678 t-out="combination_info['list_price']"
2679 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
2680 name="product_list_price"
2681 />
2682 <t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/>
2683 <del
2684 name="product_price_strikethrough"
2685 t-if="combination_info.get('compare_list_price') and (combination_info['compare_list_price'] &gt; combination_info['price'])"
2686 class="text-muted ms-1 h6 oe_compare_list_price"
2687 >
2688 <bdi dir="inherit">
2689 <span t-out="combination_info['compare_list_price']"
2690 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
2691 </bdi>
2692 </del>
2693 </div>
2694 <div
2695 t-if="editable"
2696 name="product_list_price_container"
2697 class="css_non_editable_mode_hidden decimal_precision h5"
2698 t-att-data-precision="str(website.currency_id.decimal_places)"
2699 >
2700 <span t-field="product.list_price"
2701 t-options="{'widget': 'monetary', 'display_currency': product.currency_id}"/>
2702 <t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/>
2703 <del t-if="combination_info.get('compare_list_price') and (combination_info['compare_list_price'] &gt; combination_info['price'])">
2704 <bdi dir="inherit">
2705 <span t-field="product.compare_list_price"
2706 t-options="{'widget': 'monetary', 'display_currency': product.currency_id}"/>
2707 </bdi>
2708 </del>
2709 </div>
2710 <small t-if="combination_info.get('tax_disclaimer')" class="text-muted">
2711 <t t-out="combination_info['tax_disclaimer']"/>
2712 </small>
2713 </div>
2714 <div id="product_unavailable" t-attf-class="{{'d-flex' if combination_info['prevent_zero_price_sale'] else 'd-none'}}">
2715 <br/>
2716 </div>
2717 </template>
2718
2719 <template id="wizard_checkout" name="Wizard Checkout">
2720 <t t-call="website.step_wizard">
2721 <t t-set="wizard_step" t-value="website._get_checkout_steps()"/>
2722 </t>
2723 </template>
2724
2725 <!-- /shop/extra_info route -->
2726 <template id="extra_info" name="Checkout Extra Info" active="False">
2727 <t t-call="website_sale.checkout_layout">
2728 <t t-set="redirect" t-valuef="/shop/extra_info"/>
2729 <t t-set="oe_structure">
2730 <!-- This is the drag-and-drop area for website building blocs at the end of each
2731 checkout page. This is append at the of the page in `checkout_layout`. The
2732 templates created in the database to store blocs are hooked using XPath on the
2733 `oe_struture` element ID. Therefore, we can't use dynamic IDs (like with
2734 t-att-id) and each template needs to define a div element. -->
2735 <div class="oe_structure" id="oe_structure_website_sale_extra_info_1"/>
2736 </t>
2737
2738 <h4 class="mb-3">Extra info</h4>
2739 <section class="s_website_form" data-vcss="001" data-snippet="s_website_form">
2740 <div class="container">
2741 <form
2742 action="/website/form/"
2743 method="post"
2744 enctype="multipart/form-data"
2745 class="o_mark_required s_website_form_no_recaptcha"
2746 data-mark="*"
2747 data-force_action="shop.sale.order"
2748 data-model_name="sale.order"
2749 data-success-mode="redirect"
2750 data-success-page="/shop/payment"
2751 hide-change-model="true"
2752 >
2753 <div class="s_website_form_rows s_col_no_bgcolor row">
2754 <span id="s_website_form_result"/>
2755 <div class="s_website_form_field col-12 pb-2 mb-0" data-type="char" data-name="Field">
2756 <div class="s_col_no_resize s_col_no_bgcolor">
2757 <label class="s_website_form_label col-form-label col-sm-auto" style="width: 200px" for="sale1">
2758 <span class="s_website_form_label_content">Your Reference</span>
2759 </label>
2760 <div class="col-sm">
2761 <input id="sale1" type="text" class="s_website_form_input form-control" name="client_order_ref"/>
2762 </div>
2763 </div>
2764 </div>
2765 <div class="s_website_form_field s_website_form_custom col-12 pb-2 mb-0" data-type="text" data-name="Field">
2766 <div class="s_col_no_resize s_col_no_bgcolor">
2767 <label class="s_website_form_label col-form-label col-sm-auto" style="width: 200px" for="sale2">
2768 <span class="s_website_form_label_content">Give us your feedback</span>
2769 </label>
2770 <div class="col-sm">
2771 <textarea id="sale2" class="s_website_form_input form-control" name="Give us your feedback" />
2772 </div>
2773 </div>
2774 </div>
2775 <div class="s_website_form_field s_website_form_custom col-12 pb-2 mb-0" data-type="binary" data-name="Field">
2776 <div class="s_col_no_resize s_col_no_bgcolor">
2777 <label class="s_website_form_label col-form-label col-sm-auto" style="width: 200px" for="sale3">
2778 <span class="s_website_form_label_content">Upload a document</span>
2779 </label>
2780 <div class="col-sm">
2781 <input id="sale3" type="file" class="s_website_form_input form-control" name="a_document" />
2782 </div>
2783 </div>
2784 </div>
2785 </div>
2786 </form>
2787 </div>
2788 </section>
2789 </t>
2790 </template>
2791
2792 <!-- Encapsulate the content in a `a` tag with a link to the product page. Override this
2793 template to change or remove the product link. Called in `website_sale.cart_lines`. -->
2794 <template id="cart_line_product_link" name="Shopping Cart Line Product Link">
2795 <a
2796 t-if="line._is_sellable()"
2797 class="text-reset"
2798 t-att-href="line.product_id.website_url"
2799 name="o_cart_line_product_link"
2800 >
2801 <t t-out="0"/>
2802 </a>
2803 <t t-else="" t-out="0"/>
2804 </template>
2805
2806 <!-- This template displays all the lines following the first one on the description of the sale
2807 order line, with a muted style. For typical products this content will be the product
2808 description_sale. Called in `website_sale.cart_lines`. -->
2809 <template id="cart_line_description_following_lines" name="Shopping Cart Line Description Following Lines">
2810 <t t-set="description_lines" t-value="line.get_description_following_lines()"/>
2811 <div t-if="description_lines" class="text-muted small">
2812 <t t-foreach="description_lines" t-as="name_line">
2813 <span
2814 t-if="name_line"
2815 t-attf-class="d-block #{not name_line_last and 'mb-1'}"
2816 t-out="name_line"
2817 />
2818 </t>
2819 </div>
2820 </template>
2821
2822 <!-- Lines that show items in the cart. Called in `website_sale.cart`. -->
2823 <template id="cart_lines" name="Shopping Cart Lines">
2824 <div
2825 t-if="not website_sale_order or not website_sale_order.website_order_line"
2826 class="js_cart_lines w-100"
2827 >
2828 <div class="mt-5 mb-3"><t t-call="website_sale.empty_cart_svg"/></div>
2829 <h5 class="mb-3" style="text-align: center;">
2830 Your cart is empty!
2831 </h5>
2832 <p style="text-align: center;">
2833 <a href="/shop" class="btn btn-primary">
2834 Shop
2835 </a>
2836 </p>
2837 </div>
2838 <t t-if='website_sale_order'>
2839 <div t-if='website_sale_order._get_shop_warning(clear=False)' class="alert alert-warning js_cart_lines" role="alert">
2840 <strong>Warning!</strong>
2841 <div t-out="website_sale_order._get_shop_warning()" class="text-prewrap"/>
2842 </div>
2843 </t>
2844 <div id="cart_products"
2845 t-if="website_sale_order and website_sale_order.website_order_line"
2846 class="js_cart_lines d-flex flex-column mb32">
2847 <t t-foreach="website_sale_order.website_order_line" t-as="line">
2848 <t t-set="is_combo" t-value="line.product_type == 'combo'"/>
2849 <div
2850 class="o_cart_product d-flex gap-3 pb-4"
2851 t-attf-data-product-id="#{line.product_id and line.product_id.id}"
2852 >
2853 <div
2854 class="o_cart_product_image"
2855 >
2856 <!--
2857 Unsellable lines can have unpublished products, but portal users have no
2858 access to unpublished product images. To ensure product images are
2859 always shown for unsellable lines, we use the raw image data as src
2860 (which doesn't require access, unlike the image URL).
2861 -->
2862 <t t-call="website_sale.cart_line_product_link">
2863 <img
2864 t-if="not line._is_sellable() and line.product_id.image_128"
2865 t-att-src="image_data_uri(line.product_id.image_128)"
2866 class="img border rounded"
2867 t-att-alt="line.name_short"
2868 />
2869 <div
2870 t-else=""
2871 t-field="line.product_id.image_128"
2872 t-options="{
2873 'widget': 'image',
2874 'qweb_img_responsive': False,
2875 'class': 'border rounded',
2876 }"
2877 />
2878 </t>
2879 </div>
2880 <div class="d-flex flex-column flex-grow-1 gap-3 min-w-0">
2881 <div class="d-flex gap-3">
2882 <div class="flex-grow-1 text-wrap w-100">
2883 <div class="d-flex justify-content-between">
2884 <div class="d-md-flex flex-md-wrap column-gap-md-1 align-items-md-center">
2885 <t t-call="website_sale.cart_line_product_link">
2886 <h6
2887 t-out="line._get_line_header()"
2888 class="text-wrap mb-1"
2889 />
2890 </t>
2891 <t t-set="combination_name" t-value="line._get_combination_name()"/>
2892 <span t-if="combination_name" class="d-none d-md-inline h6 text-muted mb-1">-</span>
2893 <div
2894 t-if="combination_name or line.product_template_id._has_multiple_uoms()"
2895 class="d-inline-flex flex-wrap column-gap-2 row-gap-1 align-items-center my-1 my-md-0 w-100 w-md-auto"
2896 >
2897 <span
2898 t-if="combination_name"
2899 class="h6 text-muted mb-1"
2900 t-out="combination_name"
2901 />
2902 <span
2903 t-if="line.product_template_id._has_multiple_uoms()"
2904 class="badge bg-light mb-1"
2905 t-out="line.product_uom_id.name"
2906 />
2907 </div>
2908 </div>
2909 <div t-attf-class="{{'d-block d-md-none' if not is_combo else ''}}"><t t-call="website_sale.cart_lines_price"/></div>
2910 </div>
2911 <t t-call="website_sale.cart_line_description_following_lines"/>
2912 <ul t-if="is_combo" class="list-group">
2913 <t
2914 t-foreach="line.linked_line_ids.filtered('combo_item_id')"
2915 t-as="combo_item_line"
2916 >
2917 <t t-call="website_sale.cart_combo_item_line"/>
2918 </t>
2919 </ul>
2920 <div
2921 name="o_wsale_cart_line_button_container"
2922 t-attf-class="d-none d-md-flex align-items-center gap-2 mt-2 {{'justify-content-between' if is_combo else ''}}"
2923 >
2924 <a
2925 href='#'
2926 class="js_delete_product small"
2927 aria-label="Remove from cart"
2928 title="Remove from cart"
2929 >
2930 Remove
2931 </a>
2932 <div t-if="is_combo" class="d-none d-md-block ms-auto"><t t-call="website_sale.cart_lines_quantity"/></div>
2933 </div>
2934 </div>
2935 <div t-if="not is_combo" class="d-none d-md-block">
2936 <t t-call="website_sale.cart_lines_price"/>
2937 <div class="d-none d-md-block mt-2"><t t-call="website_sale.cart_lines_quantity"/></div>
2938 </div>
2939 </div>
2940 <div
2941 name="o_wsale_cart_line_button_container_mobile"
2942 class="d-flex d-md-none"
2943 >
2944 <div class="d-flex d-md-none align-items-center me-auto">
2945 <t t-call="website_sale.cart_lines_quantity" is_mobile="True"/>
2946 </div>
2947 <button
2948 class="js_delete_product btn btn-link d-inline-block d-md-none px-2"
2949 title="Remove"
2950 >
2951 <i class="fa fa-fw fa-trash-o"/>
2952 </button>
2953 </div>
2954 </div>
2955 </div>
2956 </t>
2957 </div>
2958 </template>
2959
2960 <template id="cart_lines_quantity" name="Shopping Cart Line quantity">
2961 <t
2962 t-set="should_show_quantity_selector"
2963 t-value="is_view_active('website_sale.product_quantity')"
2964 />
2965 <div
2966 t-attf-class="css_quantity input-group justify-content-end h-100 {{should_show_quantity_selector and line._is_sellable() and 'border' or ''}}"
2967 t-attf-name="{{'website_sale_cart_line_quantity' if not is_mobile else 'website_sale_cart_line_quantity_mobile'}}"
2968 >
2969 <t t-if="should_show_quantity_selector and line._is_sellable()">
2970 <a
2971 href="#"
2972 class="btn btn-link d-inline-block border-end-0"
2973 aria-label="Remove one"
2974 title="Remove one"
2975 >
2976 <i class="oi oi-minus position-relative z-1"/>
2977 </a>
2978 <input
2979 type="text"
2980 class="js_quantity quantity form-control border-0"
2981 t-att-data-line-id="line.id"
2982 t-att-data-product-id="line.product_id.id"
2983 t-att-value="line._get_displayed_quantity()"
2984 />
2985 <t t-if="line._get_shop_warning(clear=False)">
2986 <a href="#" class="btn btn-link">
2987 <i
2988 class="fa fa-warning text-warning"
2989 t-att-title="line._get_shop_warning()"
2990 role="img"
2991 aria-label="Warning"
2992 />
2993 </a>
2994 </t>
2995 <a
2996 t-else=""
2997 href="#"
2998 class="btn btn-link d-inline-block border-start-0"
2999 aria-label="Add one"
3000 title="Add one"
3001 >
3002 <i class="oi oi-plus position-relative z-1"/>
3003 </a>
3004 </t>
3005 <t t-else="">
3006 <input
3007 type="text"
3008 class="js_quantity form-control quantity text-start text-md-end text-md-end border-0 p-0 shadow-none mw-100"
3009 t-att-data-line-id="line.id"
3010 t-att-data-product-id="line.product_id.id"
3011 t-att-value="line._get_displayed_quantity()"
3012 readonly="True"
3013 />
3014 </t>
3015 </div>
3016 </template>
3017
3018 <template id="cart_lines_price" name="Shopping Cart Line Price">
3019 <h6
3020 class="d-flex flex-column flex-md-row align-items-end align-items-md-start justify-content-md-end mb-1"
3021 name="website_sale_cart_line_price"
3022 >
3023 <del
3024 t-if="line._should_show_strikethrough_price()"
3025 class="me-md-2 text-muted text-nowrap opacity-50"
3026 t-out="line._get_displayed_unit_price() * line.product_uom_qty"
3027 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
3028 />
3029 <t t-set="product_price" t-value="line._get_cart_display_price()"/>
3030 <t t-call="website_sale.cart_product_price"/>
3031 </h6>
3032 <small
3033 t-if="line._is_sellable() and line.env['res.groups']._is_feature_enabled('website_sale.group_show_uom_price') and line.product_id.base_unit_price"
3034 class="cart_product_base_unit_price d-block text-muted text-end"
3035 groups="website_sale.group_show_uom_price"
3036 >
3037 <t t-call="website_sale.base_unit_price">
3038 <t t-set="product" t-value="line.product_id"/>
3039 <t
3040 t-set="base_unit_price"
3041 t-value="product._get_base_unit_price(product_price/line.product_uom_qty)"
3042 />
3043 </t>
3044 </small>
3045 </template>
3046
3047 <template id="cart_combo_item_line">
3048 <a
3049 t-att-href="combo_item_line.product_id.website_url if combo_item_line._is_sellable() and combo_item_line.product_id.website_published else '#'"
3050 t-attf-class="list-group-item #{'list-group-item-action' if combo_item_line._is_sellable() and combo_item_line.product_id.website_published else 'cursor-default text-decoration-none'}"
3051 >
3052 <h6 class="d-inline small">
3053 <span t-out="combo_item_line._get_displayed_quantity()"/>
3054 x
3055 <span t-out="combo_item_line.name_short"/>
3056 </h6>
3057 <t
3058 t-set="description_lines"
3059 t-value="combo_item_line.get_description_following_lines()"
3060 />
3061 <div t-if="description_lines" class="small text-muted">
3062 <t t-foreach="description_lines" t-as="description_line">
3063 <span
3064 t-if="description_line"
3065 class="d-block"
3066 t-out="description_line"
3067 />
3068 </t>
3069 </div>
3070 </a>
3071 </template>
3072
3073 <template id="cart_product_price">
3074 <span
3075 t-out="product_price"
3076 style="white-space: nowrap;"
3077 t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
3078 />
3079 </template>
3080
3081 <!-- /shop/cart route -->
3082 <template id="cart" name="Shopping Cart">
3083 <t t-call="website_sale.checkout_layout">
3084 <t t-set="show_shorter_cart_summary" t-value="True"/>
3085 <t t-set="show_footer" t-value="True"/>
3086 <t t-set="oe_structure">
3087 <!-- This is the drag-and-drop area for website building blocs at the end of each
3088 checkout page. This is append at the of the page in `checkout_layout`. The
3089 templates created in the database to store blocs are hooked using XPath on the
3090 `oe_struture` element ID. Therefore, we can't use dynamic IDs (like with
3091 t-att-id) and each template needs to define a div element. -->
3092 <div class="oe_structure" id="oe_structure_website_sale_cart_2"/>
3093 </t>
3094 <div id="shop_cart" class="col">
3095 <div class="d-flex align-items-center mb-3">
3096 <h4 class="mb-0">Order summary</h4>
3097 <div class="ms-3 border-start ps-2"><t t-call="website_sale.quick_reorder_button"/></div>
3098 </div>
3099 <div t-if="abandoned_proceed or access_token" class="alert alert-info mt8 mb8" role="alert"> <!-- abandoned cart choices -->
3100 <t t-if="abandoned_proceed">
3101 <p>Your previous cart has already been completed.</p>
3102 <p t-if="website_sale_order">Please proceed your current cart.</p>
3103 </t>
3104 <t t-if="access_token">
3105 <p>This is your current cart.</p>
3106 <p>
3107 <strong>
3108 <a class="o_translate_inline" t-attf-href="/shop/cart/?id={{id}}&amp;access_token={{access_token}}&amp;revive_method=squash">Click here</a>
3109 </strong> if you want to restore your previous cart. Your current cart will be replaced with your previous cart.
3110 </p>
3111 <p>
3112 <strong>
3113 <a class="o_translate_inline" t-attf-href="/shop/cart/?id={{id}}&amp;access_token={{access_token}}&amp;revive_method=merge">Click here</a>
3114 </strong> if you want to merge your previous cart into current cart.
3115 </p>
3116 </t>
3117 </div>
3118 <t t-call="website_sale.cart_lines"/>
3119 <div class="clearfix" />
3120 <div class="oe_structure" id="oe_structure_website_sale_cart_1"/>
3121 </div>
3122 </t>
3123 </template>
3124
3125 <template id="quick_reorder_button">
3126 <t t-set="quick_reorder_button_title">
3127 <t t-if="request.website.is_public_user()">Login to reorder</t>
3128 <t t-elif="not order_history">No previous products available for reorder.</t>
3129 </t>
3130 <span t-att-title="quick_reorder_button_title">
3131 <button
3132 id="quick_reorder_button"
3133 type="button"
3134 class="btn btn-sm btn-link"
3135 data-bs-toggle="offcanvas"
3136 data-bs-target="#quick_reorder_sidebar"
3137 aria-controls="quick_reorder_sidebar"
3138 t-att-disabled="not order_history"
3139 >
3140 <i class="fa fa-rotate-left me-2"/>Quick reorder
3141 </button>
3142 </span>
3143 <t t-call="website_sale.quick_reorder_sidebar"/>
3144 </template>
3145
3146 <template id="quick_reorder_sidebar">
3147 <div
3148 id="quick_reorder_sidebar"
3149 class="offcanvas offcanvas-end"
3150 aria-labelledby="quick_reorder_sidebar"
3151 >
3152 <div class="offcanvas-header">
3153 <h5 class="offcanvas-title">Quick reorder</h5>
3154 <button
3155 type="button"
3156 class="btn-close text-reset"
3157 data-bs-dismiss="offcanvas"
3158 aria-label="Close"
3159 />
3160 </div>
3161 <div class="offcanvas-body">
3162 <!-- Parent element needed for proper JS side rendering -->
3163 <t t-if="order_history" t-call="website_sale.quick_reorder_history"/>
3164 </div>
3165 </div>
3166 </template>
3167
3168 <template id="quick_reorder_history">
3169 <div
3170 class="o_wsale_quick_reorder_line_group ps-sm-3"
3171 t-foreach="order_history"
3172 t-as="order_line_group"
3173 >
3174 <div class="o_wsale_quick_reorder_group_content d-flex gap-3 w-100 position-relative">
3175 <div
3176 class="o_dot_line d-none d-sm-block position-absolute top-0 bottom-0 mb-1 border-start"
3177 />
3178 <span
3179 class="o_dot d-none d-sm-block position-absolute translate-middle-x text-o-color-1"
3180 />
3181 <div class="w-100 ps-sm-4">
3182 <h6 t-out="order_line_group['label']" class="mt-1 mb-3 text-muted"/>
3183 <div
3184 t-foreach="order_line_group['lines']"
3185 t-as="order_line"
3186 t-att-class="'o_wsale_quick_reorder_line d-flex flex-column flex-sm-row justify-content-between gap-3 '
3187 + ('align-items-start' if order_line.product_type == 'combo' else '')"
3188 >
3189 <div
3190 t-att-class="'d-flex gap-2 ' + ('align-items-start' if order_line.product_type == 'combo' else 'align-items-center')"
3191 >
3192 <div class="o_cart_product_image">
3193 <div
3194 t-field="order_line.product_id.image_128"
3195 t-options="{
3196 'widget': 'image',
3197 'qweb_img_responsive': False,
3198 'class': 'border rounded',
3199 }"
3200 />
3201 </div>
3202 <div
3203 class="d-flex flex-column align-items-start justify-content-center flex-grow-1 h-100"
3204 >
3205 <div>
3206 <h6
3207 t-out="order_line.name_short"
3208 t-att-class="'small ' + ('mb-2' if order_line.product_type == 'combo' else 'mb-0')"
3209 />
3210 <ul
3211 t-if="order_line.product_type == 'combo'" class="list-group"
3212 >
3213 <t
3214 t-foreach="order_line.linked_line_ids"
3215 t-as="combo_item_line"
3216 t-call="website_sale.cart_combo_item_line"
3217 />
3218 </ul>
3219 </div>
3220 <small
3221 t-if="order_line.product_template_id._has_multiple_uoms()"
3222 t-out="order_line.product_uom_id.name"
3223 class="badge mt-1 bg-light"
3224 />
3225 </div>
3226 </div>
3227 <div class="d-flex align-items-center ms-auto gap-2">
3228 <t
3229 t-set="combination_info"
3230 t-value="order_line.product_id._get_combination_info_variant()"
3231 />
3232 <small
3233 t-out="combination_info['price'] * order_line.product_uom_qty"
3234 t-options="{
3235 'widget': 'monetary',
3236 'display_currency': website.currency_id,
3237 }"
3238 class="o_wsale_quick_reorder_product_price"
3239 style="white-space: nowrap;"
3240 />
3241 <input
3242 type="text"
3243 t-att-value="int(order_line.product_uom_qty)"
3244 class="o_wsale_quick_reorder_qty_input form-control text-center"
3245 t-att-data-price-unit="combination_info['price']"
3246 t-att-data-currency-digits="combination_info['currency'].decimal_places"
3247 />
3248 <button
3249 type="button"
3250 title="Press 'Enter' to add to cart"
3251 class="o_wsale_quick_reorder_product_button btn btn-outline-primary"
3252 t-att-data-quantity="order_line.product_uom_qty"
3253 t-att-data-product-id="order_line.product_id.id"
3254 t-att-data-product-template-id="order_line.product_id.product_tmpl_id.id"
3255 t-att-data-product-type="order_line.product_id.type"
3256 t-att-data-selected-combo-items="json.dumps(order_line._get_selected_combo_items())"
3257 >
3258 <i class="fa fa-cart-plus"/>
3259 </button>
3260 </div>
3261 </div>
3262 </div>
3263 </div>
3264 </div>
3265 </template>
3266
3267 <!-- Deactivatable through the website editor. -->
3268 <template id="suggested_products_list" inherit_id="website_sale.cart_lines" name="Accessory Products in my cart">
3269 <xpath expr="//div[@id='cart_products']" position="inside">
3270 <h5 t-attf-class="mt-3 mb-0" t-if="suggested_products">Suggested accessories</h5>
3271 <div t-if="suggested_products"
3272 id="suggested_products"
3273 class="d-flex flex-column align-items-stretch">
3274 <div
3275 t-foreach="suggested_products"
3276 t-as="product"
3277 t-attf-class="d-flex gap-3 py-4 #{not product_last and 'border-bottom'}"
3278 t-att-data-publish="product.website_published and 'on' or 'off'"
3279 name="suggested_product"
3280 >
3281 <div class="o_cart_product_image">
3282 <a t-att-href="product.website_url">
3283 <div t-field="product.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'border rounded'}"/>
3284 </a>
3285 </div>
3286 <div class="flex-grow-1">
3287 <div class="d-flex justify-content-between">
3288 <div>
3289 <a class="text-reset" t-att-href="product.website_url">
3290 <h6
3291 class="align-top text-wrap"
3292 t-out="product.with_context(display_default_code=False).display_name"
3293 />
3294 </a>
3295 <div
3296 class="mb-2 small text-muted"
3297 t-field="product.description_sale"
3298 />
3299 </div>
3300 <div class="d-flex flex-column gap-2 align-items-end">
3301 <h6
3302 class="d-flex mb-0 text-end"
3303 name="suggested_product_price_container"
3304 >
3305 <t
3306 t-set="combination_info"
3307 t-value="product._get_combination_info_variant()"
3308 />
3309 <del
3310 name="suggested_product_list_price"
3311 t-attf-class="me-2 text-nowrap text-muted {{'' if combination_info['has_discounted_price'] else 'd-none'}}"
3312 t-out="combination_info['list_price']"
3313 t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
3314 />
3315 <span
3316 name="suggested_product_price"
3317 class="text-nowrap"
3318 t-out="combination_info['price']"
3319 t-options="{'widget': 'monetary','display_currency': website.currency_id}"
3320 />
3321 </h6>
3322 <button
3323 class="js_add_suggested_products btn btn-primary text-nowrap"
3324 t-att-data-product-id="product.id"
3325 t-att-data-product-template-id="product.product_tmpl_id.id"
3326 t-att-data-product-type="product.type"
3327 t-att-data-show-quantity="is_view_active('website_sale.product_quantity')"
3328 >
3329 <i class="d-md-none fa fa-shopping-cart" role="presentation"/>
3330 <span class="d-none d-md-inline">Add to cart</span>
3331 </button>
3332 </div>
3333 </div>
3334 </div>
3335 </div>
3336 </div>
3337 </xpath>
3338 </template>
3339
3340 <!-- Called in `website_sale.reduction_code`. -->
3341 <template id='coupon_form' name='Coupon form'>
3342 <!-- Checkout context:
3343 - redirect: The route to redirect to when a customer enters a coupon; default: `None`.
3344 - website_sale_order: The current order.
3345 -->
3346 <form
3347 class="mb-3"
3348 t-attf-action="/shop/pricelist#{redirect and '?r=' + redirect or ''}"
3349 method="post"
3350 name="coupon_code"
3351 >
3352 <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
3353 <div class="input-group w-100">
3354 <input name="promo" class="form-control" type="text" placeholder="Discount code..." t-att-value="website_sale_order.pricelist_id.code or None"/>
3355 <button type="submit" class="btn btn-light border">Apply</button>
3356 </div>
3357 </form>
3358 <t t-if="request.params.get('code_not_available')" name="code_not_available">
3359 <div class="alert alert-danger text-start" role="alert">This promo code is not available.</div>
3360 </t>
3361 </template>
3362
3363 <!-- Called in `website_sale.checkout_layout`. -->
3364 <template id="navigation_buttons" name="Navigation buttons">
3365 <!-- Layout customization parameters:
3366 - hide_payment_button: Whether the payment button should be hidden; default: False.
3367 -->
3368 <!-- Checkout context:
3369 - website_sale_order: The current order.
3370 -->
3371 <div t-attf-class="#{_container_classes} d-flex flex-column gap-2">
3372 <t t-if="website_sale_order and website_sale_order.website_order_line">
3373 <t
3374 t-if="(website.account_on_checkout != 'mandatory' or
3375 not website.is_public_user()) and show_shorter_cart_summary"
3376 t-call="payment.express_checkout"
3377 />
3378 <t t-if="current_website_checkout_step_href == '/shop/payment'">
3379 <div t-if="not errors and not website_sale_order.amount_total"
3380 name="o_website_sale_free_cart">
3381 <form name="o_wsale_confirm_order"
3382 class="d-flex flex-column"
3383 target="_self"
3384 action="/shop/payment/validate"
3385 method="post">
3386 <input type="hidden"
3387 name="csrf_token"
3388 t-att-value="request.csrf_token()"/>
3389 <t t-if="not hide_payment_button" t-call="payment.submit_button">
3390 <t t-set="submit_button_label">Confirm Order</t>
3391 </t>
3392 </form>
3393 </div>
3394 <t t-elif="not hide_payment_button" t-call="payment.submit_button"/>
3395 </t>
3396 <t t-else="">
3397 <a role="button" name="website_sale_main_button"
3398 t-attf-class="btn btn-primary #{not website_sale_order._is_cart_ready() and 'disabled'} w-100"
3399 t-att-href="next_website_checkout_step_href">
3400 <span t-field="next_website_checkout_step.main_button_label"/>
3401 <i class="fa fa-angle-right ms-2 fw-light"/>
3402 </a>
3403 </t>
3404 </t>
3405 <div t-if="not hide_payment_button" class="position-relative d-none d-lg-flex w-100 justify-content-center align-items-center my-2 opacity-75">
3406 <hr class="w-100"/>
3407 <span class="px-3">or</span>
3408 <hr class="w-100"/>
3409 </div>
3410 <t t-if="previous_website_checkout_step">
3411 <a
3412 t-att-href="previous_website_checkout_step.step_href"
3413 class="mt-2 mt-lg-0 text-center"
3414 >
3415 <i class="fa fa-angle-left me-2 fw-light"/>
3416 <span t-field="previous_website_checkout_step.back_button_label"/>
3417 </a>
3418 </t>
3419 <t t-else="">
3420 <a t-att-href="'/shop'" class="mt-2 mt-lg-0 text-center">
3421 <i class="fa fa-angle-left me-2 fw-light"/>
3422 Continue shopping
3423 </a>
3424 </t>
3425 </div>
3426 </template>
3427
3428 <!-- /shop/checkout route -->
3429 <template id="checkout">
3430 <t t-call="website_sale.checkout_layout">
3431 <t t-set="additional_title">Shop - Checkout</t>
3432 <t t-set="redirect" t-valuef="/shop/checkout"/>
3433 <t t-set="same_shipping" t-value="bool(order.partner_shipping_id==order.partner_invoice_id or only_services)" />
3434 <div id="shop_checkout">
3435 <t t-if="order._has_deliverable_products()">
3436 <div class="mb-4">
3437 <t t-call="website_sale.delivery_form">
3438 <t t-set="selected_dm_id" t-value="order.carrier_id.id"/>
3439 </t>
3440 </div>
3441 <div class="mb-4">
3442 <t t-call="website_sale.delivery_address_list">
3443 <t t-set="addresses" t-value="delivery_addresses"/>
3444 </t>
3445 </div>
3446 </t>
3447 <t t-call="website_sale.billing_address_list">
3448 <t t-set="addresses" t-value="billing_addresses"/>
3449 </t>
3450 </div>
3451 </t>
3452 </template>
3453
3454 <template id="delivery_address_list">
3455 <t t-set="address_type" t-value="'delivery'"/>
3456 <t
3457 t-set="new_address_url"
3458 t-valuef="{{address_url}}?address_type={{address_type}}&amp;use_delivery_as_billing={{use_delivery_as_billing}}"
3459 />
3460 <div id="delivery_address_list">
3461 <div class="d-flex justify-content-between align-items-start gap-3 mb-3">
3462 <h5 name="delivery_address_title" class="mb-0">Delivery address</h5>
3463 <!-- We don't allow public users to have multiple delivery addresses. -->
3464 <a
3465 t-if="not order.website_id.is_public_user()"
3466 role="button"
3467 t-att-href="new_address_url"
3468 t-att-data-address-type="address_type"
3469 class="o_address_card_add_new btn btn-outline-primary btn-sm"
3470 title="Add an address"
3471 aria-label="Add an address"
3472 >
3473 <i class="oi oi-plus me-2"/>Add Address
3474 </a>
3475 </div>
3476 <t t-call="website_sale.address_list">
3477 <t t-set="addresses" t-value="delivery_addresses"/>
3478 <t t-set="selected_address" t-value="order.partner_shipping_id"/>
3479 </t>
3480 </div>
3481 </template>
3482
3483 <template id="billing_address_list">
3484 <t t-set="address_type" t-value="'billing'"/>
3485 <t t-set="new_address_url" t-valuef="{{address_url}}?address_type={{address_type}}"/>
3486 <t t-set="has_delivery" t-value="order._has_deliverable_products()"/>
3487 <div id="billing_address_list" class="mb-3 pt-2">
3488 <div class="d-flex justify-content-between align-items-start gap-3">
3489 <p t-attf-class="mb-0 {{only_services and 'h4' or 'h5'}}">
3490 Billing address
3491 </p>
3492 <a
3493 role="button"
3494 t-att-href="new_address_url"
3495 t-att-data-address-type="address_type"
3496 t-attf-class="o_address_card_add_new o_add_billing_address_btn btn btn-outline-primary btn-sm {{'d-none' if use_delivery_as_billing and has_delivery else ''}}"
3497 title="Add an address"
3498 aria-label="Add an address"
3499 >
3500 <i class="oi oi-plus me-2"/>Add Address
3501 </a>
3502 </div>
3503 <div t-if="has_delivery" class="form-check form-switch mt-2">
3504 <label id="use_delivery_as_billing_label">
3505 <input
3506 type="checkbox"
3507 id="use_delivery_as_billing"
3508 class="form-check-input"
3509 t-att-checked="use_delivery_as_billing"
3510 />
3511 <span name="use_delivery_as_billing_text">
3512 Same as delivery address
3513 </span>
3514 </label>
3515 </div>
3516 <div
3517 id="billing_container"
3518 t-attf-class="mt-3 {{'d-none' if use_delivery_as_billing and has_delivery else ''}}"
3519 >
3520 <t t-call="website_sale.address_list">
3521 <t t-set="addresses" t-value="billing_addresses"/>
3522 <t t-set="selected_address" t-value="order.partner_invoice_id"/>
3523 </t>
3524 </div>
3525 </div>
3526 </template>
3527
3528 <template id="website_sale.address_list" inherit_id="portal.address_list" primary="True">
3529 <t t-call="portal.address_card" position="replace">
3530 <t t-call="website_sale.address_card">
3531 <!-- Drop show_removal and address_update_url which were in the base call to portal.address_card -->
3532 <t t-set="is_user_address" t-value="address == request.env.user.partner_id"/>
3533 <t t-set="contact" t-value="address"/>
3534 <t
3535 t-set="can_be_edited"
3536 t-value="contact._can_be_edited_by_current_customer(order_sudo=order)"
3537 />
3538 <t t-set="selected" t-value="address == selected_address"/>
3539 </t>
3540 </t>
3541 </template>
3542
3543 <!-- To ensure modification dones in the checkout are not applied on the portal -->
3544 <template id="website_sale.address_card" inherit_id="portal.address_card" primary="True"/>
3545
3546 <!-- /shop/address route -->
3547 <template id="website_sale.address_form_fields" inherit_id="portal.address_form_fields" primary="True">
3548 <t name="b2b_fields" position="attributes">
3549 <attribute name="t-if">display_b2b_fields</attribute>
3550 </t>
3551 </template>
3552
3553 <!-- /shop/address route -->
3554 <template id="website_sale.address" name="Address Management">
3555 <t t-call="website_sale.checkout_layout">
3556 <div class="o_customer_address_fill">
3557 <div>
3558 <t t-if="not is_anonymous_cart">
3559 <h4 class="mb-3">
3560 <t t-if="partner_sudo">Edit address</t>
3561 <t t-else="">New address</t>
3562 </h4>
3563 </t>
3564 <div
3565 t-if="use_delivery_as_billing and not only_services and partner_sudo"
3566 class="alert alert-warning"
3567 role="alert"
3568 >
3569 <p class="mb-0">
3570 You are editing your <b>delivery and billing</b> addresses
3571 at the same time!<br/>
3572 If you want to modify your billing address, create a
3573 <a class="o_translate_inline" href="/shop/address?address_type=billing">new address</a>.
3574 </p>
3575 </div>
3576 <div id="errors"/> <!-- for js -->
3577 <form
3578 action="/shop/address/submit"
3579 method="post"
3580 name="address_form"
3581 class="address_autoformat"
3582 t-att-data-company-country-code="res_company.country_id.code"
3583 t-att-data-submit-url="'/shop/address/submit'"
3584 >
3585 <t t-if="is_anonymous_cart">
3586 <div class="d-flex flex-column flex-md-row align-items-center justify-content-between mb-1">
3587 <h4 class="w-100 w-md-auto">Details</h4>
3588 <div
3589 t-if="website.account_on_checkout != 'disabled'"
3590 class="o_address_signin d-flex d-md-block justify-content-between align-items-center p-3 p-md-0 w-100 text-md-end"
3591 >
3592 <span class="align-middle">Already have an account?</span>
3593 <a
3594 role="button"
3595 href='/web/login?redirect=/shop/checkout'
3596 class="btn btn-primary ms-2"
3597 >
3598 Sign in
3599 </a>
3600 </div>
3601 </div>
3602 </t>
3603 <div class="row">
3604 <t t-call="website_sale.address_form_fields"/>
3605 </div>
3606 </form>
3607 </div>
3608 </div>
3609 </t>
3610 </template>
3611
3612 <!-- Deactivatable through the website editor. -->
3613 <template id="address_b2b" inherit_id="website_sale.address" name="Show b2b fields" />
3614
3615 <template id="address_edit_button" name="Address edit button">
3616 <t t-if="xmlid != 'website_sale.confirmation'">
3617 <a t-if="order.partner_invoice_id.country_id" class="float-end no-decoration" href="/shop/checkout">
3618 <i class="fa fa-pencil me-1"/>Edit
3619 </a>
3620 <a
3621 t-else=""
3622 class="float-end no-decoration"
3623 t-attf-href="/shop/address?partner_id={{order.partner_invoice_id.id}}&amp;address_type=billing"
3624 >
3625 <i class="fa fa-pencil me-1"/>Want an invoice?
3626 </a>
3627 </t>
3628 </template>
3629
3630 <!-- Called in `website_sale.payment` and `website_sale.confirmation`. -->
3631 <template id="address_on_checkout" name="Address on payment">
3632 <div class="card">
3633 <div class="card-body" id="delivery_and_billing">
3634 <t t-call="website_sale.address_edit_button"/>
3635 <t t-set="delivery_title_classes" t-value="'badge text-bg-info mb-2'"/>
3636 <t
3637 t-set="use_delivery_as_billing"
3638 t-value="order.partner_invoice_id == order.partner_shipping_id and not order.pickup_location_data"
3639 />
3640 <div class="d-flex flex-column flex-md-row gap-4">
3641 <div
3642 t-if="not use_delivery_as_billing and order._has_deliverable_products()"
3643 t-attf-class="{{not use_delivery_as_billing and not only_services and 'col'}}"
3644 >
3645 <t t-if="order.pickup_location_data">
3646 <p t-att-class="delivery_title_classes">Deliver to pickup point</p>
3647 <div
3648 class="fw-bold" t-out="order.pickup_location_data.get('name', '')"
3649 />
3650 <div t-out="order.pickup_location_data.get('street', '')"/>
3651 <div t-out="order.pickup_location_data.get('city', '')
3652 + ' ' + order.pickup_location_data.get('zip_code','')"
3653 />
3654 </t>
3655 <t t-else="">
3656 <p t-att-class="delivery_title_classes">Delivery</p>
3657 <t
3658 t-out="order.partner_shipping_id"
3659 t-options="dict(
3660 widget='contact',
3661 fields=['name', 'address'],
3662 no_marker=True,
3663 )"
3664 />
3665 </t>
3666 </div>
3667 <div t-attf-class="{{not use_delivery_as_billing and not only_services and 'col'}}">
3668 <p t-if="use_delivery_as_billing and not only_services" t-att-class="delivery_title_classes">Delivery &amp; Billing</p>
3669 <p t-else="" t-att-class="delivery_title_classes">Billing</p>
3670 <t
3671 t-out="order.partner_invoice_id"
3672 t-options="dict(
3673 widget='contact',
3674 fields=['name', 'address'],
3675 no_marker=True,
3676 )"
3677 />
3678 </div>
3679 </div>
3680 </div>
3681 </div>
3682 </template>
3683
3684 <!-- /shop/payment route -->
3685 <template id="payment" name="Payment">
3686 <t t-call="website_sale.checkout_layout">
3687 <t t-set="additional_title">Shop - Select Payment Method</t>
3688 <t t-set='redirect' t-valuef="/shop/payment"/>
3689 <t t-set="oe_structure">
3690 <!-- This is the drag-and-drop area for website building blocs at the end of each
3691 checkout page. This is append at the of the page in `checkout_layout`. The
3692 templates created in the database to store blocs are hooked using XPath on the
3693 `oe_struture` element ID. Therefore, we can't use dynamic IDs (like with
3694 t-att-id) and each template needs to define a div element. -->
3695 <div class="oe_structure" id="oe_structure_website_sale_payment_2"/>
3696 </t>
3697 <div class="col-12" t-if="errors">
3698 <t t-set="hide_payment_button" t-value="True"/>
3699 <t t-foreach="errors" t-as="error">
3700 <div class="alert alert-danger" t-if="error" role="alert">
3701 <h4>
3702 <t t-out="error[0]" />
3703 </h4>
3704 <t t-out="error[1]" />
3705 </div>
3706 </t>
3707 </div>
3708 <div class="oe_structure clearfix" id="oe_structure_website_sale_payment_1"/>
3709
3710 <div t-if="not errors and website_sale_order.amount_total" name="website_sale_non_free_cart">
3711 <div id="payment_method" class="o_not_editable mb-3">
3712 <t t-call="payment.form"/>
3713 </div>
3714 <t t-if="not (payment_methods_sudo or tokens_sudo)" t-set="hide_payment_button" t-value="True"/>
3715 </div>
3716 <h4 t-else="" class="mb-3">
3717 Confirm order
3718 </h4>
3719 <div id="address_on_payment">
3720 <t t-call="website_sale.address_on_checkout"/>
3721 </div>
3722 </t>
3723 </template>
3724
3725 <!-- Activatable through the website editor. -->
3726 <template id="accept_terms_and_conditions"
3727 inherit_id="navigation_buttons"
3728 name="Accept Terms &amp; Conditions"
3729 active="False">
3730 <xpath expr="//div[@name='o_website_sale_free_cart']" position="before">
3731 <div name="website_sale_terms_and_conditions_checkbox" class="form-check mb-2">
3732 <input type="checkbox" id="website_sale_tc_checkbox" class="form-check-input"/>
3733 <label for="website_sale_tc_checkbox" class="form-check-label">
3734 I agree to the <a target="_BLANK" href="/terms">terms &amp; conditions</a>
3735 </label>
3736 </div>
3737 </xpath>
3738 </template>
3739
3740 <!-- Template of the checkout pages. Should be called in every page of the checkout flow. -->
3741 <template id="checkout_layout" name="Checkout layout page">
3742 <!-- Layout customization parameters:
3743 - show_footer: Whether to show the website footer; default: `False`.
3744 - show_navigation_button: Whether to show the navigation buttons; default: `True`.
3745 - show_wizard_checkout: Whether to show the wizard checkout; default: `True`.
3746 - show_shorter_cart_summary: Whether to show the shorter cart_summary (without items
3747 summary and with express checkout buttons) or the full;
3748 default: `None`.
3749 - show_mobile_cart_summary: Whether to show the mobile offcanvas cart_summary;
3750 default: `True`.
3751 - oe_structure: The structure element to append at the bottom of the page;
3752 default: `None`.
3753 -->
3754 <!-- Checkout context (non exhaustive):
3755 - redirect: The route to redirect to when a customer enters a coupon; default: `None`.
3756 - website_sale_order: The current order.
3757 -->
3758 <t t-call="website.layout">
3759 <t t-set="no_footer" t-value="True if show_footer is None else not show_footer"/>
3760 <t t-set="show_navigation_button" t-value="True if show_navigation_button is None else show_navigation_button"/>
3761 <t t-set="expand_order_summary" t-value="not show_navigation_button"/>
3762 <t t-set="show_wizard_checkout" t-value="True if show_wizard_checkout is None else show_wizard_checkout"/>
3763 <t
3764 t-set="show_mobile_cart_summary"
3765 t-value="True if show_mobile_cart_summary is None else show_mobile_cart_summary"
3766 />
3767 <t t-set="body_classname" t-value="'o_website_sale_checkout'"/>
3768 <div id="wrap" class="d-flex flex-column flex-grow-1">
3769 <div class="oe_website_sale o_website_sale_checkout_container container d-flex flex-column flex-grow-1 py-lg-2">
3770 <div t-attf-class="row #{not show_wizard_checkout and 'mt32'} mb32">
3771 <div t-if="show_wizard_checkout" class="col-12">
3772 <t t-call="website_sale.wizard_checkout"/>
3773 </div>
3774 <!-- Checkout Page Content | Left Column -->
3775 <div
3776 t-attf-class="oe_clear_stucture oe_cart col-12 #{'col-lg-7' if website_sale_order and website_sale_order.website_order_line else ''}"
3777 >
3778 <t t-out="0"/>
3779 </div>
3780
3781 <!-- Short Checkout Summary displayed on /cart | Right Column -->
3782 <div
3783 t-if="show_shorter_cart_summary"
3784 class="o_wsale_shorter_cart_summary offset-xxl-1 col-lg-5 col-xxl-4"
3785 >
3786 <!-- Parent element needed for proper JS side rendering -->
3787 <t t-call="website_sale.shorter_cart_summary"/>
3788 </div>
3789 <!-- Full Checkout Summary displayed on all checkout pages | Right Column -->
3790 <div
3791 t-else=""
3792 class="d-none d-lg-block offset-xxl-1 col-12 col-lg-5 col-xxl-4 rounded"
3793 >
3794 <div class="o_total_card card sticky-lg-top o_wsale_sticky_object mb-3 mb-lg-0">
3795 <div class="card-body p-lg-4 pt-lg-3">
3796 <div class="d-none d-lg-block">
3797 <t t-call="website_sale.cart_summary_content"/>
3798 <t t-call="website_sale.total">
3799 <t
3800 t-set="_cart_total_classes"
3801 t-valuef="border-top pt-2"
3802 />
3803 </t>
3804 </div>
3805 <div
3806 t-if="show_navigation_button"
3807 class="o_cta_navigation_container px-0"
3808 >
3809 <t t-call="website_sale.navigation_buttons"/>
3810 </div>
3811 </div>
3812 </div>
3813 </div>
3814 </div>
3815 <!-- Mobile Order Summary | Bottom of page and Offcanvas -->
3816 <t t-if="not show_shorter_cart_summary and show_mobile_cart_summary">
3817 <div class="o_mobile_summary d-lg-none sticky-bottom mt-auto bg-body">
3818 <button
3819 class="btn btn-light d-flex justify-content-between align-items-center gap-2 w-100 mb-2"
3820 data-bs-toggle="offcanvas"
3821 href="#o_cart_summary_offcanvas"
3822 aria-controls="o_cart_summary_offcanvas"
3823 >
3824 Order
3825 <span
3826 id="amount_total_summary"
3827 class="monetary_field ms-auto"
3828 t-field="website_sale_order.amount_total"
3829 t-options='{"widget": "monetary", "display_currency": website_sale_order.currency_id}'
3830 />
3831 <span
3832 class="o_cart_item_count badge ms-1 top-0 bg-primary"
3833 t-out="str(website_sale_order.cart_quantity)"
3834 />
3835 <i class="fa fa-angle-right ms-2" role="img"/>
3836 </button>
3837 <t
3838 t-if="show_navigation_button"
3839 t-call="website_sale.navigation_buttons"
3840 />
3841 </div>
3842 <div
3843 id="o_cart_summary_offcanvas"
3844 class="offcanvas offcanvas-end"
3845 tabindex="-1"
3846 aria-labelledby="o_cart_summary_offcanvas"
3847 >
3848 <div class="offcanvas-body">
3849 <t t-call="website_sale.cart_summary_content"/>
3850 </div>
3851 <div class="offcanvas-footer p-3">
3852 <a href="/shop/cart" class="btn btn-link w-100">
3853 Coupon, Gift card, Promo-code?
3854 </a>
3855 <t t-call="website_sale.total">
3856 <t t-set="hide_promotions" t-value="True"/>
3857 <t
3858 t-set="_cart_total_classes"
3859 t-valuef="border-top px-3 pt-2 mx-n3"
3860 />
3861 </t>
3862 <button
3863 class="btn btn-light w-100"
3864 type="button"
3865 data-bs-dismiss="offcanvas"
3866 aria-label="Close"
3867 >
3868 Close
3869 </button>
3870 </div>
3871 </div>
3872 </t>
3873 </div>
3874 <!-- This is the drag-and-drop area for website building blocs at the end of each
3875 checkout page. The templates created in the database to store blocs are hooked
3876 using XPath on the `oe_struture` element ID. Therefore, we can't use dynamic
3877 IDs (like with t-att-id) and each template needs to define a div element. -->
3878 <t t-out="oe_structure"/>
3879 </div>
3880 </t>
3881 </template>
3882
3883 <template id="website_sale.shorter_cart_summary">
3884 <div
3885 t-if="website_sale_order and website_sale_order.website_order_line"
3886 class="o_total_card card o_wsale_sticky_object sticky-lg-top"
3887 >
3888 <div class="card-body p-0 p-lg-4" name="o_cart_total_card_body">
3889 <t t-call="website_sale.total">
3890 <t
3891 t-set="_cart_total_classes"
3892 t-valuef="o_checkout_cart_total pt-2 pt-lg-0"
3893 />
3894 </t>
3895 <t t-call="website_sale.navigation_buttons"/>
3896 </div>
3897 </div>
3898 </template>
3899
3900 <!-- Called in `website_sale.checkout_layout` and `website_sale.confirmation`. -->
3901 <template id="website_sale.cart_summary_content">
3902 <div
3903 t-if="not website_sale_order or not website_sale_order.website_order_line"
3904 name="cart_summary_info"
3905 class="alert alert-info"
3906 >
3907 Your cart is empty!
3908 </div>
3909 <div>
3910 <div t-att-class="len(website_sale_order.website_order_line) &gt; 3 and 'o_wsale_scrollable_table'">
3911 <table
3912 t-if="website_sale_order and website_sale_order.website_order_line"
3913 class="o_cart_products_table table mb-0"
3914 >
3915 <tbody>
3916 <tr
3917 t-foreach="website_sale_order.website_order_line"
3918 t-as="line"
3919 t-att-class="line_last and 'border-transparent'"
3920 >
3921 <td class="td-img ps-0 pt-3">
3922 <div class="o_cart_product_image position-relative">
3923 <span
3924 t-if="not line._is_sellable() and line.product_id.image_128"
3925 >
3926 <img
3927 t-att-src="image_data_uri(line.product_id.image_128)"
3928 class="img rounded"
3929 t-att-alt="line.name_short"
3930 />
3931 </span>
3932 <span
3933 t-else=""
3934 t-field="line.product_id.image_128"
3935 t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded'}"
3936 />
3937 <span class="o_cart_item_count badge bg-secondary position-absolute top-0 start-100 translate-middle">
3938 <t t-out="int(line.product_uom_qty)" />
3939 <i
3940 t-if="line._get_shop_warning(clear=False)"
3941 class="fa fa-warning"
3942 role="img"
3943 t-att-title="line._get_shop_warning()"
3944 aria-label="Warning"
3945 />
3946 </span>
3947 </div>
3948 </td>
3949 <td
3950 class="td-product_name td-qty w-100 pt-3"
3951 name="website_sale_cart_summary_product_name"
3952 >
3953 <span class="text-wrap" t-out="line._get_line_header()"/>
3954 <p class="text-muted small mb-0" t-out="line._get_combination_name()"/>
3955 <span
3956 t-if="line.product_template_id._has_multiple_uoms()"
3957 class="badge mt-1 bg-light"
3958 t-out="line.product_uom_id.name"
3959 />
3960 </td>
3961 <td class="td-price pe-0 pt-3 text-end"
3962 name="website_sale_cart_summary_line_price">
3963 <t t-call="website_sale.cart_product_price">
3964 <t
3965 t-set="product_price"
3966 t-value="line._get_cart_display_price()"
3967 />
3968 </t>
3969 </td>
3970 </tr>
3971 </tbody>
3972 </table>
3973 </div>
3974 <t t-if='website_sale_order'>
3975 <t t-set='warning' t-value='website_sale_order._get_shop_warning(clear=False)' />
3976 <div t-if='warning' class="alert alert-warning" role="alert">
3977 <strong>Warning!</strong> <t t-out='website_sale_order._get_shop_warning()'/>
3978 </div>
3979 </t>
3980 </div>
3981 </template>
3982
3983 <!-- /shop/confirmation route -->
3984 <template id="confirmation">
3985 <t t-call="website_sale.checkout_layout">
3986 <t t-set="show_wizard_checkout" t-value="False"/>
3987 <t t-set="show_mobile_cart_summary" t-value="False"/>
3988 <t t-set="show_navigation_button" t-value="False"/>
3989 <t t-set="show_footer" t-value="True"/>
3990 <t t-set="additional_title">Shop - Confirmed</t>
3991 <t t-set="hide_promotions" t-value="True"/>
3992 <t t-set="oe_structure">
3993 <!-- This is the drag-and-drop area for website building blocs at the end of each
3994 checkout page. This is append at the of the page in `checkout_layout`. The
3995 templates created in the database to store blocs are hooked using XPath on the
3996 `oe_struture` element ID. Therefore, we can't use dynamic IDs (like with
3997 t-att-id) and each template needs to define a div element. -->
3998 <div class="oe_structure" id="oe_structure_website_sale_confirmation_3"/>
3999 </t>
4000
4001 <t t-set="tx_sudo" t-value="order.get_portal_last_transaction()"/>
4002 <div
4003 t-if="tx_sudo.state in ['pending', 'done'] or not order.amount_total"
4004 class="d-flex justify-content-between align-items-center"
4005 >
4006 <h3>Thank you for your order.</h3>
4007 <a
4008 title="Print"
4009 role="button"
4010 class="d-none d-md-inline-block btn btn-light ms-auto"
4011 href="/shop/print"
4012 target="_blank"
4013 aria-label="Print"
4014 >
4015 <i class="fa fa-print me-2"/>Print
4016 </a>
4017 </div>
4018 <div id="order_name" class="mb-4">
4019 <h5>
4020 <span>Order</span>
4021 <span t-field="order.name"/>
4022 </h5>
4023 </div>
4024 <t t-if="request.env['res.users']._get_signup_invitation_scope() == 'b2c' and request.website.is_public_user()">
4025 <p class="alert alert-info mt-3" role="status">
4026 <a role="button" t-att-href="order.partner_id.signup_prepare() and order.partner_id.with_context(relative_url=True)._get_signup_url()" class="btn btn-primary o_translate_inline">Sign Up</a>
4027 <span class="align-middle">to follow your order.</span>
4028 </p>
4029 </t>
4030 <div class="oe_structure clearfix mt-3" id="oe_structure_website_sale_confirmation_1"/>
4031 <t t-call="website_sale.payment_confirmation_status"/>
4032 <div class="mt-3">
4033 <t t-call="website_sale.address_on_checkout"/>
4034 </div>
4035 <div class="oe_structure mt-3" id="oe_structure_website_sale_confirmation_2"/>
4036 <input t-if='website.plausible_shared_key' type='hidden' class='js_plausible_push' data-event-name='Shop' t-attf-data-event-params='{"CTA": "Order Confirmed", "amount": "#{"%3s-%3s" % (max(0, round(website_sale_order.amount_total/100)*100 - 50), round(website_sale_order.amount_total/100)*100 + 50)}"}' />
4037 <div class="d-lg-none">
4038 <t t-call="website_sale.cart_summary_content"/>
4039 <t t-call="website_sale.total">
4040 <t
4041 t-set="_cart_total_classes"
4042 t-valuef="border-top pt-2"
4043 />
4044 </t>
4045 </div>
4046 </t>
4047 </template>
4048
4049 <!-- Called in `website_sale.checkout_layout`. -->
4050 <template id="total">
4051 <!-- Layout customization parameters:
4052 - _cart_total_classes: CSS classes to append on the root div of the total template;
4053 default `None`.
4054 -->
4055 <div
4056 t-if="website_sale_order and website_sale_order.website_order_line"
4057 t-attf-class="o_cart_total #{_cart_total_classes}"
4058 >
4059 <table class="table mb-0">
4060 <tr
4061 t-if="website_sale_order._has_deliverable_products()"
4062 name="o_order_delivery"
4063 >
4064 <td class="ps-0 pt-0 pb-2 border-0 text-muted" colspan="2">
4065 Delivery
4066 </td>
4067 <td class="text-end pe-0 pt-0 pb-2 border-0">
4068 <span
4069 name="o_message_no_dm_set"
4070 t-att-class="'d-none' if website_sale_order.carrier_id else ''"
4071 title="Price will be updated after choosing a delivery method"
4072 >
4073 -
4074 </span>
4075 <span
4076 t-out="website_sale_order.amount_delivery"
4077 t-att-class="'monetary_field' + ('' if website_sale_order.carrier_id else ' d-none')"
4078 style="white-space: nowrap;"
4079 t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
4080 />
4081 </td>
4082 </tr>
4083 <tr name="o_order_total_untaxed">
4084 <td
4085 class="border-0 pb-2 ps-0 pt-0 text-start text-muted"
4086 colspan="2">
4087 Subtotal
4088 </td>
4089 <td class="text-end border-0 pb-2 pe-0 pt-0">
4090 <span t-field="website_sale_order.amount_untaxed"
4091 class="monetary_field"
4092 style="white-space: nowrap;"
4093 t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
4094 </td>
4095 </tr>
4096 <tr name="o_order_total_taxes">
4097 <td colspan="2" class="text-muted border-0 p-0 pe-3 pb-2">Taxes</td>
4098 <td class="text-end border-0 p-0 ps-3 pb-2">
4099 <span t-field="website_sale_order.amount_tax"
4100 class="monetary_field"
4101 style="white-space: nowrap;"
4102 t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
4103 </td>
4104 </tr>
4105 <tr name="o_order_total" class="border-top">
4106 <td colspan="2" class="border-0 ps-0 pt-2"><strong>Total</strong></td>
4107 <td class="text-end border-0 px-0 pt-2">
4108 <strong t-field="website_sale_order.amount_total"
4109 class="monetary_field text-end p-0"
4110 t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
4111 </td>
4112 </tr>
4113 </table>
4114 </div>
4115 </template>
4116
4117 <!-- Deactivatable through the website editor. -->
4118 <template id="reduction_code" inherit_id="website_sale.total" name="Promo Code">
4119 <!-- Checkout context:
4120 - hide_promotions: Whether to hide promotion input; default: `None`.
4121 - redirect: The route to redirect to when a customer enters a coupon; default: `None`.
4122 - website_sale_order: The current order.
4123 -->
4124 <xpath expr="//div[contains(@t-attf-class, 'o_cart_total')]//table/tr[last()]" position="after">
4125 <tr t-if="not hide_promotions">
4126 <td colspan="3" class="text-end text-xl-end border-0 p-0">
4127 <span>
4128 <t t-set="force_coupon" t-value="website_sale_order.pricelist_id.code"/>
4129 <div t-if="not force_coupon" class="coupon_form">
4130 <t t-call="website_sale.coupon_form"/>
4131 </div>
4132 </span>
4133 </td>
4134 </tr>
4135 </xpath>
4136 </template>
4137
4138 <!-- Called in `website_sale.confirmation`. -->
4139 <template id="payment_confirmation_status">
4140 <div
4141 name="order_confirmation"
4142 class="mt-3"
4143 t-att-data-order-id="order.id"
4144 t-att-data-order-tracking-info="json.dumps(order_tracking_info)"
4145 >
4146 <t t-set="tx_sudo" t-value="order.get_portal_last_transaction()"/>
4147 <div
4148 t-if="tx_sudo"
4149 t-attf-class="alert px-3 pb-0 pt-3 #{
4150 (tx_sudo.state == 'pending' and 'alert-info') or
4151 (tx_sudo.state == 'done' and order.amount_total == tx_sudo.amount and 'alert-success') or
4152 (tx_sudo.state == 'done' and order.amount_total != tx_sudo.amount and 'alert-warning') or
4153 (tx_sudo.state == 'authorized' and 'alert-success') or
4154 'alert-danger'}"
4155 role="alert"
4156 >
4157 <a
4158 title="Edit"
4159 class="btn btn-sm btn-link text-dark float-end"
4160 role="button"
4161 groups="base.group_system"
4162 target="_blank"
4163 aria-label="Edit"
4164 t-attf-href="/odoo/action-payment.action_payment_provider/{{tx_sudo.provider_id.id}}"
4165 >
4166 <i class="fa fa-pencil"/>
4167 </a>
4168 <div>
4169 <t t-if="tx_sudo.state == 'pending'">
4170 <t t-out="tx_sudo.provider_id.sudo().pending_msg"/>
4171 </t>
4172 <t t-if="tx_sudo.state == 'done'">
4173 <span t-if='tx_sudo.provider_id.sudo().done_msg' t-out="tx_sudo.provider_id.sudo().done_msg"/>
4174 </t>
4175 <t t-if="tx_sudo.state == 'done' and order.amount_total != tx_sudo.amount">
4176 <span>Unfortunately your order can not be confirmed as the amount of your payment does not match the amount of your cart.
4177 Please contact the responsible of the shop for more information.</span>
4178 </t>
4179 <t t-if="tx_sudo.state == 'cancel'">
4180 <t t-out="tx_sudo.provider_id.sudo().cancel_msg"/>
4181 </t>
4182 <t t-if="tx_sudo.state == 'authorized'">
4183 <t t-if="tx_sudo.provider_id.sudo().auth_msg" t-out="tx_sudo.provider_id.sudo().auth_msg"/>
4184 <span t-else="">Your payment has been authorized.</span>
4185 </t>
4186 <t t-if="tx_sudo.state == 'error'">
4187 <span t-out="tx_sudo.state_message"/>
4188 </t>
4189 </div>
4190 <t t-if="tx_sudo.provider_code == 'custom'">
4191 <div id="order_reference" t-if="order.reference" class="mt-2">
4192 <b>Communication: </b><span t-out='order.reference'/>
4193 </div>
4194 <div t-if="tx_sudo.provider_id.sudo().qr_code">
4195 <t t-set="qr_code" t-value="tx_sudo.company_id.partner_id.bank_ids[:1].build_qr_code_base64(order.amount_total,tx_sudo.reference, None, tx_sudo.currency_id, tx_sudo.partner_id)"/>
4196 <div class="mt-2" t-if="qr_code">
4197 <h3>Or scan me with your banking app.</h3>
4198 <img class="border border-dark rounded" t-att-src="qr_code"/>
4199 </div>
4200 </div>
4201 </t>
4202 </div>
4203 </div>
4204 </template>
4205
4206 <template id="website_sale.brand_promotion" inherit_id="website.brand_promotion">
4207 <xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace">
4208 <t t-call="web.brand_promotion_message">
4209 <t t-set="_message">
4210 The #1 <a target="_blank" href="http://www.odoo.com/app/ecommerce?utm_source=db&amp;utm_medium=website">Open Source eCommerce</a>
4211 </t>
4212 <t t-set="_utm_medium" t-valuef="website"/>
4213 </t>
4214 </xpath>
4215 </template>
4216
4217 <!-- Product page images -->
4218 <template id="website_sale.shop_product_images" name="Shop Product Images">
4219 <t t-set="product_images" t-value="product_variant._get_images() if product_variant else product._get_images()"/>
4220 <t
4221 t-set="ribbon"
4222 t-value="product.sudo()._get_ribbon(price_vals=combination_info, variant=product_variant)"
4223 />
4224 <t t-set="bg_color" t-value="ribbon.bg_color"/>
4225 <t t-set="text_color" t-value="ribbon.text_color"/>
4226 <t t-call="website_sale.shop_product_#{website.product_page_image_layout}"/>
4227 </template>
4228
4229 <template id="website_sale.shop_product_image">
4230 <span
4231 t-attf-class="o_ribbons o_not_editable #{ribbon._get_css_classes()} z-1"
4232 t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}"
4233 t-att-data-ribbon-id="ribbon.id"
4234 t-out="ribbon.name or ''"
4235 />
4236 <div
4237 t-if="product_image._name == 'product.image' and product_image.embed_code"
4238 t-att-class="image_classes + ' ratio ratio-16x9'"
4239 >
4240 <t t-out="product_image.embed_code"/>
4241 </div>
4242 <div
4243 t-elif="len(product_images) == 1 and website.product_page_image_layout != 'grid'"
4244 class="position-relative d-inline-flex overflow-hidden m-auto h-100 w-100"
4245 >
4246 <span
4247 t-field="product_image.image_1920"
4248 name="o_img_with_max_suggested_width"
4249 class="o_product_detail_img_wrapper d-flex align-items-start justify-content-center h-100 w-100 oe_unmovable"
4250 t-options="{
4251 'widget': 'image',
4252 'preview_image': 'image_1024',
4253 'class': 'oe_unmovable product_detail_img h-100 w-100',
4254 'alt-field': 'name',
4255 'zoom': product_image.can_image_1024_be_zoomed and 'image_1920',
4256 }"
4257 />
4258
4259 </div>
4260 <div
4261 t-else=""
4262 t-field="product_image.image_1920"
4263 t-att-class="image_classes + ' o_product_detail_img_wrapper oe_unmovable'"
4264 t-attf-style="{{
4265 image_natural_index and ('--o-wsale-grid-product-img-natural-order: ' + str(image_natural_index)) or false
4266 }}"
4267 t-options="{
4268 'widget': 'image',
4269 'preview_image': 'image_1024',
4270 'class': 'oe_unmovable product_detail_img w-100 h-100',
4271 'alt-field': 'name',
4272 'zoom': product_image.can_image_1024_be_zoomed and 'image_1920',
4273 }"
4274 />
4275 </template>
4276
4277 <!-- Product page images: Carousel -->
4278 <template id="website_sale.shop_product_carousel" name="Shop Product Carousel">
4279 <t t-set="product_carousel_block_name">Product Carousel</t>
4280 <div
4281 id="o-carousel-product"
4282 t-attf-class="#{len(product_images) > 1 and 'o_carousel_not_single'} carousel slide mb-3 overflow-hidden"
4283 t-att-data-name="product_carousel_block_name"
4284 >
4285 <div
4286 class="o_carousel_product_outer carousel-outer position-relative d-flex align-items-center w-100 overflow-hidden"
4287 >
4288 <span
4289 t-if="len(product_images) > 1"
4290 t-attf-class="o_ribbons #{ribbon._get_css_classes()} z-1"
4291 t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}"
4292 t-out="ribbon.name or ''"
4293 t-att-data-ribbon-id="ribbon.id"
4294 />
4295 <div class="carousel-inner h-100">
4296 <t t-set="image_classes" t-value="'d-flex align-items-center justify-content-center h-100'"/>
4297 <t t-foreach="product_images" t-as="product_image">
4298 <div t-attf-class="carousel-item h-100 w-100 text-center#{' active' if product_image_first else ''}">
4299 <t t-call="website_sale.shop_product_image"/>
4300 </div>
4301 </t>
4302 </div>
4303 <t t-if="len(product_images) > 1">
4304 <a class="carousel-control-prev" href="#o-carousel-product" role="button" data-bs-slide="prev">
4305 <i
4306 class="oi oi-chevron-left oe_unmovable border bg-white text-900"
4307 role="img"
4308 aria-label="Previous"
4309 title="Previous"
4310 />
4311 </a>
4312 <a class="carousel-control-next" href="#o-carousel-product" role="button" data-bs-slide="next">
4313 <i
4314 class="oi oi-chevron-right oe_unmovable border bg-white text-900"
4315 role="img"
4316 aria-label="Next"
4317 title="Next"
4318 />
4319 </a>
4320 </t>
4321 </div>
4322 </div>
4323 </template>
4324
4325 <template id="carousel_product_indicators_bottom" inherit_id="website_sale.shop_product_carousel" name="Carousel Product Indicators Bottom" active="False">
4326 <xpath expr="//div[hasclass('o_carousel_product_outer')]" position="after">
4327 <t t-call="website_sale.carousel_product_indicators">
4328 <t t-set="indicators_div_class" t-value="'pt-2 overflow-hidden'"/>
4329 </t>
4330 </xpath>
4331 </template>
4332
4333 <template id="carousel_product_indicators_left" inherit_id="website_sale.shop_product_carousel" name="Carousel Product Indicators Left">
4334 <xpath expr="//div[hasclass('o_carousel_product_outer')]" position="before">
4335 <t t-call="website_sale.carousel_product_indicators">
4336 <t t-set="indicators_list_class" t-value="'d-flex d-lg-block pe-lg-2'"/>
4337 </t>
4338 </xpath>
4339 <xpath expr="//div[@id='o-carousel-product']" position="attributes">
4340 <attribute name="t-attf-class" add="o_carousel_product_left_indicators d-flex" separator=" "/>
4341 </xpath>
4342 </template>
4343
4344 <template id="carousel_product_indicators" name="Carousel Product">
4345 <div
4346 t-if="len(product_images) > 1"
4347 t-ignore="True"
4348 t-attf-class="o_carousel_product_indicators {{indicators_div_class}}"
4349 >
4350 <ol
4351 t-attf-class="carousel-indicators position-static pt-2 pt-lg-0 mx-auto my-0 {{indicators_list_class}} {{website.product_page_image_width == '100_pc' and 'justify-content-center'}}"
4352 >
4353 <li
4354 t-foreach="product_images" t-as="product_image"
4355 t-attf-class="align-top position-relative {{'active' if product_image_first else ''}}"
4356 data-bs-target="#o-carousel-product"
4357 t-att-data-bs-slide-to="str(product_image_index)"
4358 >
4359 <div
4360 t-field="product_image.image_128"
4361 t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'object-fit-cover w-100 h-100', 'alt-field': 'name'}"
4362 />
4363 <i
4364 t-if="product_image._name == 'product.image' and product_image.embed_code"
4365 class="fa fa-2x fa-play-circle o_product_video_thumb bg-black-50 text-center"
4366 />
4367 </li>
4368 </ol>
4369 </div>
4370 </template>
4371
4372 <!-- Product page images: Grid -->
4373 <template id="website_sale.shop_product_grid" name="Shop Product Grid">
4374 <t t-set="imagesCount" t-value="len(product_images)"/>
4375 <div
4376 id="o-grid-product"
4377 t-attf-class="
4378 o_grid_uses_ratio_{{website.product_page_image_ratio}}
4379 o_grid_uses_ratio_mobile_{{website.product_page_image_ratio_mobile}}
4380 {{
4381 imagesCount &gt; 11 and 'o_grid_has_more_than_11' or
4382 imagesCount &gt; 9 and 'o_grid_has_more_than_9' or
4383 imagesCount &gt; 5 and 'o_grid_has_more_than_5' or
4384 imagesCount &gt; 3 and 'o_grid_has_more_than_3' or
4385 imagesCount == 1 and 'o_grid_solo' or ''
4386 }}
4387 "
4388 data-name="Product Grid"
4389 t-att-data-image_spacing="website.product_page_image_spacing"
4390 t-att-data-image_count="len(product_images)"
4391 t-att-data-grid_columns="website.product_page_grid_columns"
4392 >
4393 <div class="position-relative overflow-hidden">
4394 <span
4395 t-attf-class="o_ribbons #{ribbon._get_css_classes()}"
4396 t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}"
4397 t-out="ribbon.name or ''"
4398 t-att-data-ribbon-id="ribbon.id"
4399 />
4400 <!-- One row for every two images -->
4401 <t t-set="image_classes" t-value="'w-100'"/>
4402 <div
4403 t-attf-class="o_wsale_product_page_grid_row {{website._get_product_page_grid_image_spacing_classes()}}"
4404 >
4405 <t t-foreach="website.product_page_grid_columns" t-as="col_idx">
4406 <t t-set="col_feed_counter" t-value="0"/>
4407
4408 <div
4409 t-if="col_idx_index &lt; len(product_images)"
4410 t-attf-class="o_wsale_product_page_grid_column flex-column px-0"
4411 >
4412 <t t-foreach="len(product_images)" t-as="image_idx">
4413 <t
4414 t-set="product_image"
4415 t-value="image_idx &lt; len(product_images) and product_images[image_idx] or False"
4416 />
4417 <t
4418 t-if="product_image and col_idx == col_feed_counter"
4419 t-call="website_sale.shop_product_image"
4420 >
4421 <t t-set="image_natural_index" t-value="image_idx"/>
4422 <t
4423 t-set="image_classes"
4424 t-value="image_idx_last and 'o_product_detail_img_wrapper_last' or ''"
4425 />
4426 </t>
4427 <t t-if="col_feed_counter == (website.product_page_grid_columns - 1)">
4428 <t t-set="col_feed_counter" t-value="0"/>
4429 </t>
4430 <t t-else="">
4431 <t t-set="col_feed_counter" t-value="col_feed_counter + 1"/>
4432 </t>
4433 </t>
4434 </div>
4435 </t>
4436 </div>
4437 </div>
4438 </div>
4439 </template>
4440
4441 <template id="ecom_show_extra_fields" inherit_id="website_sale.product" active="True" name="Show Extra Fields">
4442 <xpath expr="//div[@id='product_details']" position="inside">
4443 <t t-if="any([product.sudo()[field.name] for field in website.shop_extra_field_ids])">
4444 <hr/>
4445 <p class="text-muted">
4446 <t t-foreach="website.shop_extra_field_ids" t-as='field' t-if="product.sudo()[field.name]">
4447 <b><t t-out='field.label'/>: </b>
4448 <t t-if='field.field_id.ttype != "binary"'>
4449 <span t-out="product.sudo()[field.name]" t-options="{'widget': field.field_id.ttype}"/>
4450 </t>
4451 <t t-else=''>
4452 <a target='_blank' t-attf-href='/web/content/product.template/#{product.id}/#{field.name}?download=1'>
4453 <i class='fa fa-file'></i>
4454 </a>
4455 </t>
4456 <br/>
4457 </t>
4458 </p>
4459 </t>
4460 </xpath>
4461 </template>
4462
4463 </odoo>