"i only speak liquid" #11: Access control 🔐

Written by Erin Vaage 🧙

Hey all 👋!

Welcome to 'i_only_speak_liquid' by Storetasker, where active Shopify developers like me (Erin) share learnings we face daily.

PS: I'm an expert on Storetasker and work with the best wellness, beauty, and food and beverage brands. Storetasker helps me to connect with awesome brands and work on projects I’m passionate about. Apply here if you want in.

What I’ve been thinking about:

There are various reasons a merchant may want to make some products available only to specific customers. For example, I’ve seen several loyalty programs where only VIP members can access exclusive products.

You could set this up with an app like Locksmith (I’ll talk more about this option below) or go the custom route. There are always multiple solutions to a coding problem!

To set this up, only customers signed in and have a specific tag can access the “locked” collection or products. In this example, customers who are logged in and have the tag VIP will be shown a secret link so they can access the exclusive products.

Click to see example or see below.

{% assign vip_customer = false %}

{% if customer %}

{% for tag in customer.tags %}

{% if tag == 'VIP' %}

{% assign vip_customer = true %}

{% endif %}

{% endfor %}

{% endif %}

{% if vip_customer %}

<a href="/pages/secret-link">Secret Link</a>

{% endif %}

3 links you can’t miss:

  • JSONLint - Are you running into the dreaded “Invalid JSON in tag ‘schema’” warning but can’t find the missing comma or where your JSON is invalid? Just copy and paste your code into JSONLint and this tool will tidy and validate your messy JSON code.

  • Shopify Theme Customization with Liquid - This book by Ivan Djordjevic is perfect for those who need to brush up on their Liquid or Shopify skills. It covers a host of Shopify topics and has hands-on projects so you can showcase your theme customization expertise.

  • Checkout Links - With a checkout link, you can select the products, quantities, and discounts you’d like to apply and send customers directly to checkout.

One app I like:

Locksmith by Lightward

If you need more robust access control then Locksmith is the best app for the job. In addition to granting access if the customer has a certain tag, you can grant access by passcode, secret link, IP address or country, and so many other ways.

I’ve used the secret link to give newsletter subscribers early access to a product and the country lock to hide products that can’t be shipped to certain countries. It can also be used as a solution for a simple wholesale program. I love that there are so many creative ways to use this app!

One learning as a freelancer:

Spooky season is upon us and what’s scarier than a potential client who ghosts!? đŸ‘» You had a great discovery call, created a thoughtful proposal, and sent it over sharing your enthusiasm to potentially work together. And then? Crickets


So you send a few polite follow-ups to see what’s going on. If you’re still getting the silent treatment it’s time to bring in “The Magic Email.” Here it is:

“Since I have not heard from you on this, I have to assume your priorities have changed.”

This email makes it clear that you’ve moved on and removes the emotional reasons for the prospect to continue to avoid you.

Personally, I think the email sounds a bit robotic (just because your client is being a ghost doesn’t mean you need to be less human!) so I like to personalize it to match my voice and brand. If the client responds, great! If not you’ve closed the loop and can move on to better prospects.

Talk soon,