コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3736 ビュー

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 ?


アバター
破棄

 

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

 

 

最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
5月 22
14227
2
4月 22
4338
1
4月 22
3427
0
8月 20
3200
0
2月 18
3471