Skip to Content
मेन्यू
This question has been flagged
2 Replies
2905 Views

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
Discard

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

Author

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

Avatar
Discard
Related Posts Replies Views Activity
1
सित॰ 24
1212
2
जन॰ 23
6639
0
फ़र॰ 21
2442
0
मार्च 17
3507
1
दिस॰ 16
4452