Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
3074 Zobrazení

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
Zrušit

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

Autor

Thank you so much for your help

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 24
1408
2
led 23
6820
0
úno 21
2713
0
bře 17
3679
1
pro 16
4620