コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
2971 ビュー

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
1321
2
1月 23
6701
0
2月 21
2547
0
3月 17
3565
1
12月 16
4515