Advice and answers from the Locksmith Team

This method requires you to have your purchase-required content stored in Shopify - common choices for this include pages and blog articles. Two quick notes about this:

  • If your content must live elsewhere, consider using iframes to embed your content into a Shopify page, which you can then lock. This is less secure!
  • Hosting file downloads securely is possible, but does require another provider. Learn more about this here.

To get started with selling content, try these steps:

  1. Create a product in your shop that you'll require the customer to purchase before viewing your locked content.
  2. Make sure you've created at least one page in your store that you'd like to protect.
  3. In your Shopify admin, head to Settings -> Checkout, and make sure that "Accounts are required" is selected, under the "Customer Accounts" section. (This will allow Locksmith to detect the association between a customer and their purchase.)
  4. Next, log in at uselocksmith.com.
  5. Use Locksmith's search box to find the page you'd like to sell access to, and click on it to create a lock.
  6. On the next screen, use the "Keys" section to create a key that permits access if the customer has purchased the appropriate product. (You can also specify a time window, requiring - for example - that the customer has made the purchase within the last 30 days.)
  7. Optional: use the "Guest message content" setting, over in the "Settings" tab, to direct your visitors to the required product when encounter your Locksmith lock.

That's it! :)

Directing customers to your content after purchase

... in order confirmation emails

We can use some custom code to conditionally add a link to your locked content if the customer has purchased the right product.

To set this up, head to Settings -> Notifications in your Shopify admin, then scroll down and click the link for "Order confirmation". Insert this code and adjust as appropriate:

{% for line_item in line_items %}
  {% if line_item.title == "Some Product" %}
    <p>Thank you for your purchase! You may now access <a href="https://awesomeco.myshopify.com/pages/some-locked-page">this locked page</a>.</p>
  {% endif %}
{% endfor %}

Feel free to add multiple copies of this code, if you need to send the customer to one of several pages.

... and in the order confirmation page, after checkout

The code above can also be modified to suit the order confirmation screen that your customers see, right after completing an order.

To set this up, locate the "Additional content and scripts" box, near the end of the Settings -> Checkout area in your Shopify admin.

Use this code:

{% for line_item in order.line_items %}
  {% if line_item.title == "Some Product" %}
    <br><br>
    <p>Thank you for your purchase! You may now access <a href="https://awesomeco.myshopify.com/pages/some-locked-page">this locked page</a>.</p>
  {% endif %}
{% endfor %}

... adjusting the "Some Product" for your actual product title, and "/pages/some-locked-page" part for the address to your locked content.

Feel free to add multiple copies of this code, if you need to send the customer to one of several pages.

Here's how this code will look in your Shopify admin:

... and here's how it would look to a customer:

Selling subscription memberships


Locksmith can do this too! Check out this guide for more information: 

Customer Subscriptions with Locksmith

Some additional options


Locksmith offers subscriptions but there are other options too. Use one of these apps to sell a membership, then have the app autotag your members based on their subscription status. Then, use Locksmith to grant access based on that tag.

Did this answer your question?