Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
2965 Vues

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
Ignorer

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

Auteur

Thank you so much for your help

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
sept. 24
1308
2
janv. 23
6695
0
févr. 21
2520
0
mars 17
3556
1
déc. 16
4504