Assortments and repositories
Customer assortments are subsets of products associated with specific users or user groups, so that logged-in users will only have access to products in the assortments they as associated with.
Most solutions publish product data in frontend by querying a product index. It is important to remember that while an index contains information about assortments per user, changes are only shown in frontend after the index has been rebuilt.
When defining the product query you can use the macro Dynamicweb.UserManagement.Context.AssortmentIDs to show products in an assortment related to the logged-in user - typically you would want something like:
- AssortmentIDs - IsEmpty
- AssortmentIDs - MatchAny - Dynamicweb.UserManagement.Context.AssortmentIDs
In that manner you the query will fetch all products not in an assortment as well as all products in an assortment associated with the logged-in user.