Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3632 Weergaven

I have made a custom theme where my 'shopping cart' icon/link is not inside #top_menu but inside #secundary_menu.


This means that this the following code is not registered to that anchor: (line 11)


https://github.com/odoo/odoo/blob/15.0/addons/website_sale/static/src/js/website_sale.js


What would be the best approach to re-use this code to also add my id in the selector ?


Avatar
Annuleer

 

I have no access to my email.

 

We want to inform our customers that Eauzon BV will be closed for the summer holidays from July 14th to August 15th.

 

 

Kind regards,

 

Peter Callens

 

 

Beste antwoord

Hi,


Try like below code:


odoo.define('module_name.cart', function (require) {

'use strict';


    var publicWidget = require('web.public.widget');


    publicWidget.registry.websiteSaleCartLinkCustom = publicWidget.registry.websiteSaleCartLink.extend({

        selector: 'your_selector_here'

    })


});


Hope it helps

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 22
14138
2
apr. 22
4265
1
apr. 22
3347
0
aug. 20
3142
0
feb. 18
3418