Skip to content
Snippets Groups Projects
Commit ecefa679 authored by Soukéina Bojabza's avatar Soukéina Bojabza
Browse files

[FIX] website_sale: fix cart popover on hover for all header templates


Before this commit, when hovering the shopping cart in the "Boxed" and
"Centered Logo" header templates, the cart popover was not appearing.

This happened because the `websiteSaleCartLink` public widget was never
started with these templates and so, hovering the cart had no effect.
This is due to this widget selector which targeted a cart link located
inside an element with id `#top_menu`, which is not the case in these
templates where the cart link is located outside of it.

This commit fixes this widget selector, in order for the cart link to be
reachable in all header templates.

opw-3267114

closes odoo/odoo#118822

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 43c888bb
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,8 @@ var _t = core._t;
var timeout;
publicWidget.registry.websiteSaleCartLink = publicWidget.Widget.extend({
selector: '#top_menu a[href$="/shop/cart"]',
// TODO in master: remove the second selector.
selector: '#top a[href$="/shop/cart"], #top_menu a[href$="/shop/cart"]',
events: {
'mouseenter': '_onMouseEnter',
'mouseleave': '_onMouseLeave',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment