Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3084 Näkymät

I am trying to make the website shop only accessible to customers who have a log in. Alternatively, prices should only be available to members who have a log in. Is this possible?


Many thanks for any help

Avatar
Hylkää

Hello,

Yes, you can show the product price to only log in users.
You need to take some changes from coding side.

Thanks,
shivoham.odoo@gmail.com

Tekijä

Thank you so much for your help

Paras vastaus

Hi,

Yes it is possible. You need to override the shop route and give auth='user'. Eg: 
@http.route([
        '/shop',
        '/shop/page/',
        '/shop/category/',
        '/shop/category//page/',
    ], type='http', auth="user", website=True, sitemap=sitemap_shop)
def shop():
     return super().shop() 

Hope it helps

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
syysk. 24
1415
2
tammik. 23
6827
0
helmik. 21
2719
0
maalisk. 17
3684
1
jouluk. 16
4623