Hi there,
I have a site that uses assortments for users. I have also set up an anonymous assortment that contains all products. When an anonymous user is on a product details page, the same product is shown again after the user logs in, even when that product is not in the user's assortment.
How can I test if the user is allowed to see the product or not based on the assortment and redirect them away when they can't see it? I could do it with custom code looking at the assortments or assortment table in the database but wonder if there's a built-in way?
The use case here is that the anonymous page is shown to all users but only has limited info, doesn't display a price and doesn't allow adding to the cart. When logged in, the user does see the price and cart button, but shouldn't see them for products not in the assortment.
Thanks!
Imar