跳至内容
菜单
此问题已终结
2 回复
2923 查看

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

形象
丢弃

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

编写者

Thank you so much for your help

最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
9月 24
1235
2
1月 23
6654
0
2月 21
2454
0
3月 17
3517
1
12月 16
4460