This method requires you to have your purchase-required content stored or displayed in your Shopify store - 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 order for Locksmith to associate a specific order to a customer account, it's necessary for the customer to be signed in when they make the purchase. To enforce this, you can either make customer accounts required for your entire store, or you can use Locksmith to require a sign in to access specific products. To make customer accounts required: In your Shopify admin, head to Settings -> Checkout, and make sure that "Accounts are required" is selected, under the "Customer Accounts" section.
  4. Next, open the Locksmith app
  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 on your lock to add a link which directs your visitors to the required product when they 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.


Note:

Locksmith does not offer automatically recurring subscriptions directly. But, there are apps that do! Check out Paywhirl or ReCharge for that functionality.

Both of those apps can tag customers that have subscriptions, which Locksmith can read! With this implementation, use the Locksmith key "Permit if the customer is tagged with..."

Did this answer your question?