Skip to Content
Menu
This question has been flagged
2 Replies
3091 Rodiniai

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

Portretas
Atmesti

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

Autorius

Thank you so much for your help

Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
rugs. 24
1417
2
saus. 23
6828
0
vas. 21
2721
0
kov. 17
3684
1
gruod. 16
4627