Restricting customer access to specific Snipcart products

Hi there, I’ve not used Snipcart before and am fairly new to Kirby too (due to launch 1st Kirby site this week!)… I’m looking for a Kirby based e-commerce solution that would allow a specific category or collection of products to be accessible only to certain logged in customers, i.e those tagged as community members. Would this be possible with the Zero one theme or with any Kirby / Snipcart integration?
Does the customer account management and order history all take place within Snipcart or can it be managed from within Kirby?
I can see how I might allow customers to create Kirby user accounts from the website front end and to restrict access to content based on how they’re tagged & whether they’re logged but I’m not sure how I’d go about linking the customer in Kirby with the relevant customer data from Snipcart. Any thoughts on how to approach this?
Many thanks!

Hi. I don’t know if creating a Kirby user really helps you since you need to still match it to the Snipcart user, if already existing.

What you can do is to use the Snipcart customer dashboard which lets you create and login user on your website: Customer dashboard – Snipcart Documentation

Once you have an active SC user session on your website, you can get the current users details via API: user sessions – Snipcart Documentation

Hope that helps,
Alex

Thanks Alex, that’s really helpful. It looks like using the snipcart customer login & pulling in customer data from Snipcart should all work - just need to figure out if I can tag customers within Snipcart and use that to show/hide content with Kirby.

1 Like