| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
|
| 5 |
<template |
| 6 |
id="website_sale_wishlist.add_to_wishlist" |
| 7 |
inherit_id="website_sale.shop_product_buttons" |
| 8 |
name="Wishlist Button" |
| 9 |
priority="20" |
| 10 |
active="True" |
| 11 |
> |
| 12 |
<t name="buttons_container" position="inside"> |
| 13 |
<t t-set="isWishlistAvailable" t-value="products_in_wishlist is not None"/> |
| 14 |
|
| 15 |
<t t-if="isWishlistAvailable" t-call="website_sale.product_tile_element_visibility"> |
| 16 |
<t t-set="visible_element_class" t-value="'o_wsale_products_opt_has_wishlist'"/> |
| 17 |
|
| 18 |
<t t-set="in_wish" t-value="product in products_in_wishlist"/> |
| 19 |
<t t-set="btnTitle">Add to wishlist</t> |
| 20 |
<t t-set="btnTitleActive">Handle your wishlist from the menu icon.</t> |
| 21 |
<t |
| 22 |
t-set="product_variant_id" |
| 23 |
t-value="in_wish or product._get_first_possible_variant_id()" |
| 24 |
/> |
| 25 |
<button |
| 26 |
t-if="product_variant_id" |
| 27 |
type="button" |
| 28 |
t-attf-class="btn o_add_wishlist #{in_wish and 'o_in_wishlist'}" |
| 29 |
t-att-disabled="in_wish" |
| 30 |
t-att-data-product-template-id="product.id" |
| 31 |
t-att-data-product-product-id="product_variant_id" |
| 32 |
data-action="o_wishlist" |
| 33 |
t-att-title="in_wish and btnTitleActive or btnTitle" |
| 34 |
> |
| 35 |
<span |
| 36 |
t-attf-class="fa o_not-animable #{in_wish and 'fa-heart' or 'fa-heart-o'}" |
| 37 |
role="presentation" |
| 38 |
/> |
| 39 |
<span t-if="not in_wish" class="o_label small ms-2">Add to wishlist</span> |
| 40 |
<span t-else="" class="o_label small ms-2">In your wishlist</span> |
| 41 |
</button> |
| 42 |
</t> |
| 43 |
</t> |
| 44 |
</template> |
| 45 |
|
| 46 |
<template id="product_cart_lines" inherit_id="website_sale.cart_lines" active="True"> |
| 47 |
<xpath expr="//div[@name='o_wsale_cart_line_button_container']/a" position="after"> |
| 48 |
<t t-if="line._is_sellable()"> |
| 49 |
<span class="text-300">|</span> |
| 50 |
<a |
| 51 |
href="#" |
| 52 |
class="o_add_wishlist js_delete_product small" |
| 53 |
t-att-data-product-template-id="line.product_id.product_tmpl_id.id" |
| 54 |
t-att-data-product-product-id="line.product_id.id" |
| 55 |
data-action="o_wishlist" |
| 56 |
> |
| 57 |
Save for Later |
| 58 |
</a> |
| 59 |
</t> |
| 60 |
</xpath> |
| 61 |
|
| 62 |
<xpath expr="//div[@name='o_wsale_cart_line_button_container_mobile']/button" position="before"> |
| 63 |
<button |
| 64 |
t-if="line._is_sellable()" |
| 65 |
class="o_add_wishlist js_delete_product btn btn-link d-inline-block d-md-none px-2" |
| 66 |
t-att-data-product-template-id="line.product_id.product_tmpl_id.id" |
| 67 |
t-att-data-product-product-id="line.product_id.id" |
| 68 |
data-action="o_wishlist" |
| 69 |
title="Wishlist" |
| 70 |
> |
| 71 |
<i class="fa fa-fw fa-heart-o"/> |
| 72 |
</button> |
| 73 |
</xpath> |
| 74 |
</template> |
| 75 |
|
| 76 |
<template |
| 77 |
id="website_sale_wishlist.product_add_to_wishlist" |
| 78 |
inherit_id="website_sale.cta_wrapper" |
| 79 |
name="Wishlist Button" |
| 80 |
priority="20" |
| 81 |
> |
| 82 |
<xpath expr="//div[@id='product_option_block']" position="inside"> |
| 83 |
<t t-set="product_variant" t-value="product_variant or product._create_first_product_variant()"/> |
| 84 |
<t t-set="in_wish" t-value="product_variant and product_variant._is_in_wishlist()"/> |
| 85 |
<t |
| 86 |
t-set="_button_classes" |
| 87 |
t-valuef="o_add_wishlist_dyn btn btn-outline-primary text-nowrap" |
| 88 |
/> |
| 89 |
<t |
| 90 |
t-if="website.product_page_image_width == '50_pc' and not (is_view_active('website_sale.cta_wrapper_boxed') or is_view_active('website_sale.cta_wrapper_large'))" |
| 91 |
t-set="_button_classes" |
| 92 |
t-value="_button_classes + ' flex-grow-1 flex-sm-grow-0'" |
| 93 |
/> |
| 94 |
<t |
| 95 |
t-else="" |
| 96 |
t-set="_button_classes" |
| 97 |
t-value="_button_classes + ' flex-grow-1'" |
| 98 |
/> |
| 99 |
<t |
| 100 |
t-if="is_view_active('website_sale.cta_wrapper_large')" |
| 101 |
t-set="_button_classes" |
| 102 |
t-value="_button_classes + ' btn-lg px-lg-0'" |
| 103 |
/> |
| 104 |
|
| 105 |
<a |
| 106 |
t-if="product_variant" |
| 107 |
t-att-class="_button_classes" |
| 108 |
t-att-disabled="in_wish" |
| 109 |
t-att-data-product-template-id="product.id" |
| 110 |
t-att-data-product-product-id="product_variant.id" |
| 111 |
data-action="o_wishlist" |
| 112 |
title="Add to wishlist" |
| 113 |
> |
| 114 |
<i class="fa fa-heart-o me-2 me-lg-0" role="img" aria-label="Add to wishlist"/> |
| 115 |
<t |
| 116 |
t-set="_span_classes" |
| 117 |
t-valuef="d-inline" |
| 118 |
/> |
| 119 |
<t |
| 120 |
t-if="website.product_page_image_width == '50_pc' and not (is_view_active('website_sale.cta_wrapper_boxed') or is_view_active('website_sale.cta_wrapper_large'))" |
| 121 |
t-set="_span_classes" |
| 122 |
t-value="_span_classes + ' d-lg-none'" |
| 123 |
/> |
| 124 |
<span t-att-class="_span_classes">Add to wishlist</span> |
| 125 |
</a> |
| 126 |
</xpath> |
| 127 |
</template> |
| 128 |
|
| 129 |
<template id="header_wishlist_link" name="Header Wishlist Link"> |
| 130 |
<t t-set="wishcount" t-value="len(request.env['product.wishlist'].current())"/> |
| 131 |
<t t-set="show_wishes" t-value="website.has_ecommerce_access()"/> |
| 132 |
<li t-attf-class="o_wsale_my_wish #{not show_wishes and 'd-none'} #{_item_class}"> |
| 133 |
<a href="/shop/wishlist" t-attf-class="#{_link_class}"> |
| 134 |
<div t-attf-class="#{_icon_wrap_class}"> |
| 135 |
<i t-if="_icon" class="fa fa-1x fa-heart fa-stack"/> |
| 136 |
<sup |
| 137 |
t-out="wishcount" |
| 138 |
t-attf-class="my_wish_quantity o_animate_blink badge bg-primary #{_badge_class} #{'d-none' if (wishcount == 0) else ''}" |
| 139 |
/> |
| 140 |
</div> |
| 141 |
<span t-if="_text" t-attf-class="#{_text_class}">Wishlist</span> |
| 142 |
</a> |
| 143 |
</li> |
| 144 |
</template> |
| 145 |
|
| 146 |
<template id="header_hide_empty_wishlist_link" inherit_id="website_sale_wishlist.header_wishlist_link"> |
| 147 |
<xpath expr="//t[@t-set='show_wishes']" position="after"> |
| 148 |
<t t-set="show_wishes" t-value="show_wishes and wishcount > 0"/> |
| 149 |
</xpath> |
| 150 |
<xpath expr="//li[contains(@t-attf-class, 'o_wsale_my_wish')]" position="attributes"> |
| 151 |
<attribute name="t-attf-class" add="o_wsale_my_wish_hide_empty" separator=" "/> |
| 152 |
</xpath> |
| 153 |
</template> |
| 154 |
|
| 155 |
<template id="template_header_mobile" inherit_id="website_sale.template_header_mobile"> |
| 156 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 157 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 158 |
<t t-set="_icon" t-value="True"/> |
| 159 |
<t t-set="_link_class" t-value="'o_navlink_background_hover btn position-relative rounded-circle border-0 p-1 text-reset'"/> |
| 160 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1'"/> |
| 161 |
</t> |
| 162 |
</xpath> |
| 163 |
</template> |
| 164 |
|
| 165 |
<template id="template_header_default" inherit_id="website_sale.template_header_default"> |
| 166 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 167 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 168 |
<t t-set="_icon" t-value="True"/> |
| 169 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-center text-reset'"/> |
| 170 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 171 |
</t> |
| 172 |
</xpath> |
| 173 |
</template> |
| 174 |
|
| 175 |
<template id="template_header_hamburger" inherit_id="website_sale.template_header_hamburger"> |
| 176 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 177 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 178 |
<t t-set="_icon" t-value="True"/> |
| 179 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-pill p-1 text-reset'"/> |
| 180 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded'"/> |
| 181 |
</t> |
| 182 |
</xpath> |
| 183 |
</template> |
| 184 |
|
| 185 |
<template id="template_header_stretch" inherit_id="website_sale.template_header_stretch"> |
| 186 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 187 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 188 |
<t t-set="_icon" t-value="True"/> |
| 189 |
<t t-set="_item_class" t-value="'border-start o_border_contrast'"/> |
| 190 |
<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'"/> |
| 191 |
<t t-set="_badge_class" t-value="'rounded'"/> |
| 192 |
</t> |
| 193 |
</xpath> |
| 194 |
</template> |
| 195 |
|
| 196 |
<template id="template_header_vertical" inherit_id="website_sale.template_header_vertical"> |
| 197 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 198 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 199 |
<t t-set="_icon" t-value="True"/> |
| 200 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-reset'"/> |
| 201 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 202 |
</t> |
| 203 |
</xpath> |
| 204 |
</template> |
| 205 |
|
| 206 |
<template id="template_header_search" inherit_id="website_sale.template_header_search"> |
| 207 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 208 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 209 |
<t t-set="_text" t-value="True"/> |
| 210 |
<t t-set="_item_class" t-value="'border-start o_border_contrast'"/> |
| 211 |
<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'"/> |
| 212 |
<t t-set="_badge_class" t-value="'rounded'"/> |
| 213 |
</t> |
| 214 |
</xpath> |
| 215 |
</template> |
| 216 |
|
| 217 |
<template id="template_header_sales_one" inherit_id="website_sale.template_header_sales_one"> |
| 218 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 219 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 220 |
<t t-set="_icon" t-value="True"/> |
| 221 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-reset'"/> |
| 222 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 223 |
</t> |
| 224 |
</xpath> |
| 225 |
</template> |
| 226 |
|
| 227 |
<template id="template_header_sales_two" inherit_id="website_sale.template_header_sales_two"> |
| 228 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 229 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 230 |
<t t-set="_icon" t-value="True"/> |
| 231 |
<t t-set="_text" t-value="True"/> |
| 232 |
<t t-set="_icon_wrap_class" t-value="'o_navlink_background position-relative me-2 rounded-circle p-2 transition-base'"/> |
| 233 |
<t t-set="_link_class" t-value="'o_navlink_trigger_hover btn d-flex align-items-center fw-bold text-reset'"/> |
| 234 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 235 |
<t t-set="_text_class" t-value="'small'"/> |
| 236 |
</t> |
| 237 |
</xpath> |
| 238 |
</template> |
| 239 |
|
| 240 |
<template id="template_header_sales_three" inherit_id="website_sale.template_header_sales_three"> |
| 241 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 242 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 243 |
<t t-set="_text" t-value="True"/> |
| 244 |
<t t-set="_item_class" t-value="'position-relative'"/> |
| 245 |
<t t-set="_link_class" t-value="'nav-link d-flex flex-row-reverse align-items-center text-uppercase fw-bold'"/> |
| 246 |
<t t-set="_icon_wrap_class" t-value="'d-contains'"/> |
| 247 |
<t t-set="_badge_class" t-value="'top-0 d-block ms-2'"/> |
| 248 |
</t> |
| 249 |
</xpath> |
| 250 |
</template> |
| 251 |
|
| 252 |
<template id="template_header_sales_four" inherit_id="website_sale.template_header_sales_four"> |
| 253 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 254 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 255 |
<t t-set="_icon" t-value="True"/> |
| 256 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-pill p-1 text-reset'"/> |
| 257 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 258 |
</t> |
| 259 |
</xpath> |
| 260 |
</template> |
| 261 |
|
| 262 |
<template id="template_header_sidebar" inherit_id="website_sale.template_header_sidebar"> |
| 263 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 264 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 265 |
<t t-set="_icon" t-value="True"/> |
| 266 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative p-1 rounded-circle text-reset'"/> |
| 267 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 268 |
</t> |
| 269 |
</xpath> |
| 270 |
</template> |
| 271 |
|
| 272 |
<template id="template_header_boxed" inherit_id="website_sale.template_header_boxed"> |
| 273 |
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after"> |
| 274 |
<t t-call="website_sale_wishlist.header_wishlist_link"> |
| 275 |
<t t-set="_icon" t-value="True"/> |
| 276 |
<t t-set="_link_class" t-value="'o_navlink_background btn position-relative rounded-circle p-1 text-center text-reset'"/> |
| 277 |
<t t-set="_badge_class" t-value="'position-absolute top-0 end-0 mt-n1 me-n1 rounded-pill'"/> |
| 278 |
</t> |
| 279 |
</xpath> |
| 280 |
</template> |
| 281 |
|
| 282 |
<template id="product_wishlist" name="Wishlist Page"> |
| 283 |
<t t-call="website.layout"> |
| 284 |
<t t-set="additional_title">Shop Wishlist</t> |
| 285 |
<div id="wrap" class="js_sale"> |
| 286 |
<div class="oe_structure" id="oe_structure_website_sale_wishlist_product_wishlist_1"/> |
| 287 |
<div class="container oe_website_sale"> |
| 288 |
<section class="container wishlist-section pb-5"> |
| 289 |
<div class="o_wishlist_products_header pt-4 pb-3"> |
| 290 |
<h1 class="h4-fs mb-0">My Wishlist</h1> |
| 291 |
</div> |
| 292 |
<div |
| 293 |
id="empty-wishlist-message" |
| 294 |
t-attf-class="w-100 #{'d-none' if wishes else ''}" |
| 295 |
> |
| 296 |
<div class="mt-5 mb-3"> |
| 297 |
<t t-call="website_sale_wishlist.empty_wishlist_svg"/> |
| 298 |
</div> |
| 299 |
<h5 class="mb-3" style="text-align: center;"> |
| 300 |
Your wishlist is empty! |
| 301 |
</h5> |
| 302 |
<p style="text-align: center;"> |
| 303 |
<a href="/shop" class="btn btn-primary"> |
| 304 |
Shop |
| 305 |
</a> |
| 306 |
</p> |
| 307 |
</div> |
| 308 |
|
| 309 |
<div |
| 310 |
id="o_comparelist_table" |
| 311 |
t-att-data-wishlist-grid-columns="website.wishlist_grid_columns" |
| 312 |
t-att-data-wishlist-mobile-columns="website.wishlist_mobile_columns" |
| 313 |
t-attf-style="--o-wsale-wishlist-grid-gap: {{website.wishlist_gap}};" |
| 314 |
t-attf-class="o_wishlist_table grid table-comparator mb-5 {{website.wishlist_opt_products_design_classes}}" |
| 315 |
> |
| 316 |
<t t-foreach="wishes" t-as="wish"> |
| 317 |
<t t-set="product_variant" t-value="wish.product_id"/> |
| 318 |
<t t-set="product" t-value="product_variant.product_tmpl_id"/> |
| 319 |
<t t-set="product_href" t-value="product_variant.website_url"/> |
| 320 |
<t t-set="combination_info" t-value="product_variant._get_combination_info_variant()"/> |
| 321 |
<article |
| 322 |
class="o_wishlist_item" |
| 323 |
t-att-data-wish-id="wish.id" |
| 324 |
t-att-data-product-id="product_variant.id" |
| 325 |
> |
| 326 |
<t t-call="website_sale.products_item"> |
| 327 |
<t t-set="show_variations" t-value="False"/> |
| 328 |
<t t-set="show_ribbons" t-value="False"/> |
| 329 |
<t t-set="product_price"> |
| 330 |
<br t-if="combination_info['prevent_zero_price_sale']"/> |
| 331 |
<div t-else="" class="align-middle o_wish_price"> |
| 332 |
<span aria-label="Sale price"> |
| 333 |
<t t-out="combination_info['price']" |
| 334 |
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" |
| 335 |
/> |
| 336 |
</span> |
| 337 |
<small |
| 338 |
t-if="combination_info['has_discounted_price']" |
| 339 |
class="cart_product_base_unit_price text-muted" |
| 340 |
> |
| 341 |
<del |
| 342 |
aria-label="Original price" |
| 343 |
t-out="combination_info['list_price']" |
| 344 |
class="text-nowrap" |
| 345 |
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" |
| 346 |
name="product_list_price" |
| 347 |
/> |
| 348 |
</small> |
| 349 |
</div> |
| 350 |
</t> |
| 351 |
<t t-set="product_actions"> |
| 352 |
<div class="o_wsale_product_action_row"> |
| 353 |
<a |
| 354 |
t-if="combination_info['prevent_zero_price_sale']" |
| 355 |
t-att-href="website.contact_us_button_url + '?subject=' + combination_info['display_name']" |
| 356 |
class="btn btn-primary btn_cta" |
| 357 |
> |
| 358 |
Contact Us |
| 359 |
</a> |
| 360 |
<button |
| 361 |
t-else="" |
| 362 |
id="add_to_cart_button" |
| 363 |
type="button" |
| 364 |
class="o_wsale_product_btn_primary btn btn-primary o_wish_add" |
| 365 |
t-att-data-show-quantity="is_view_active('website_sale.product_quantity')" |
| 366 |
t-att-data-product-template-id="product.id" |
| 367 |
t-att-data-product-product-id="product_variant.id" |
| 368 |
t-att-data-product-type="product.type" |
| 369 |
t-att-data-ptav-ids="json.dumps(product_variant.product_template_attribute_value_ids.ids)" |
| 370 |
> |
| 371 |
<i |
| 372 |
class="fa fa-fw fa-shopping-cart o_not-animable" |
| 373 |
role="presentation" |
| 374 |
/> |
| 375 |
<span class="o_label small ms-1">Add to Cart</span> |
| 376 |
</button> |
| 377 |
</div> |
| 378 |
</t> |
| 379 |
<t |
| 380 |
t-set="extra_actions" |
| 381 |
> |
| 382 |
<button |
| 383 |
type="button" |
| 384 |
class="btn btn-light o_wish_rm z-3 rounded-pill lh-1" |
| 385 |
title="Remove from wishlist" |
| 386 |
> |
| 387 |
<i class="oi oi-close" role="presentation"/> |
| 388 |
</button> |
| 389 |
</t> |
| 390 |
</t> |
| 391 |
</article> |
| 392 |
</t> |
| 393 |
</div> |
| 394 |
</section> |
| 395 |
</div> |
| 396 |
</div> |
| 397 |
</t> |
| 398 |
</template> |
| 399 |
|
| 400 |
</odoo> |