Reputation: 6337
I want to show a collection to a logged in customer. This collection of products will be like a (limited/static) wishlist -- and it will belong to the specific customer. Assume I have the collection already. How would I display this collection for the customer who owns it? The customer will have to be logged in.
Upvotes: 0
Views: 260
Reputation: 11427
It is simple. Every customer has an ID unique to them. So name your customer's collection after their ID. Put whatever you want in there. When they visit the store and that collection, use Liquid to ensure they are logged in, and that the current customer's ID matches the handle of the collection, which is also their ID.
I once built a very powerful App using this pattern that was essentially a super nice wishlist/curated collection for a merchant to offer his customers. That pattern works.
Upvotes: 1