I would like to restrict some products only to logged in users.
For the product page itseft, I can use the build in "Public Access" from Umbraco. But for the front page and categories pages, I'd like to only show public products.
It there a clever way to do it ? Or should I use "Catalog.GetAllProducts()" and for each product, check if the product is allowed.
I was thinking of adding a "memberGroupPicker" data type to the product doc type so I could do something like : Catalog.GetAllProducts().Where(p => p.GetProperty("GroupMemberPicker") == xx)
uWebshop by default does not let vistors visit pages that are protected, but indeed does show them when you requests all products for example in the menu (so you can link to them).
Restrict some products to logged in members
Hello,
I would like to restrict some products only to logged in users.
For the product page itseft, I can use the build in "Public Access" from Umbraco. But for the front page and categories pages, I'd like to only show public products.
It there a clever way to do it ? Or should I use "Catalog.GetAllProducts()" and for each product, check if the product is allowed.
I was thinking of adding a "memberGroupPicker" data type to the product doc type so I could do something like : Catalog.GetAllProducts().Where(p => p.GetProperty("GroupMemberPicker") == xx)
What do you think ?
Thank you very much
Hi,
uWebshop by default does not let vistors visit pages that are protected, but indeed does show them when you requests all products for example in the menu (so you can link to them).
You can simply use the HasAccess function in the Umbraco Library API to check the permission.
Information about that can be found here: http://umbraco.com/follow-us/blog-archive/2011/3/13/umbraco-razor-feature-walkthrough-part-5.aspx
Best,
Arnold
is working on a reply...