# Quick Start

Basic guide to using the Locksmith app to restrict access to content in your Shopify Online Store

Locksmith is a tool for merchants on Shopify to restrict access to the content in the "Online Store" sales channel of their Shopify store. It's a simple tool, and in some cases can be set up in only a few minutes.

### To get started, open up Locksmith from your apps list.

You'll be presented with the main page. The "Add new lock" section will be your first stop:

<figure><img src="/files/YribsJvafgZThSYc8sGM" alt=""><figcaption></figcaption></figure>

For a more detailed overview of what Locksmith is and how the app works, see our guide linked below:

{% content-ref url="/pages/-MUeGYwG3r9J1oH2nDz1" %}
[A Locksmith Overview](/basics/overview)
{% endcontent-ref %}

### Create your first lock

To restrict access to something in your store, simply type in the name of a product, collection, page, variant, etc - you'll immediately start seeing search results. Alternatively, select a type from the dropdown to filter your search by resource type. Select the resource that you want, to place a lock on it:

![](/files/cGjKhTnh5LMSVDnK3Pi0)

{% hint style="warning" %}
**Note:** This input does not work with URLs.
{% endhint %}

{% hint style="info" %}
**Tip:** A lock isn't limited to a single resource. After creating it, you can attach more resources of the same type (e.g. several products) from the **Protected resources** section of the lock editor, and give the lock a name to find it easily later. [More here](/basics/creating-locks).
{% endhint %}

More information on (and help troubleshooting) lock creation here:

{% content-ref url="/pages/M9JRoxsNMqxR7taTbDTe" %}
[Creating locks](/basics/creating-locks)
{% endcontent-ref %}

### Create a key

On the next page, press the "Add key" button to create a key:

<figure><img src="/files/GXrfneAWMQdWr1Vh9rpv" alt=""><figcaption></figcaption></figure>

Next, add at least one condition to your key. The most commonly-used key conditions will show up first, but **you can search or keep scrolling for more options.**

<figure><img src="/files/C8QCw39yR1kxFXArbI4Q" alt=""><figcaption></figcaption></figure>

Simply select the condition that you want to use. Some conditions may ask you for some additional settings, you'll be prompted if appropriate.

**There are over 20 out-of-the-box key conditions**, and you can even create custom conditions! You can also combine key conditions in different ways to create unique access scenarios. For more information on that, and the complete list of key conditions, see the page here:

{% content-ref url="/pages/BbEIkISi5XdTtEe4SKt1" %}
[Creating keys](/basics/creating-keys)
{% endcontent-ref %}

{% hint style="info" %}
**Note**: If you don't want to hide your product pages entirely, and instead only want to hide specific content on the product page, such as the prices or add-to-cart, we call this "manual locking", and it takes a couple extra steps beyond this guide. To get started with this, [check out our guide on that here](/tutorials/hiding-prices).
{% endhint %}

### Wait for Locksmith to install to your theme

After you **save the lock**, Locksmith will usually take about 5-10 seconds to automatically update your theme. A green status bar will briefly show at the bottom of the page - once it is gone, the installation has finished.

You can now navigate to your locked content on your store front, and you should immediately see the restriction is now in place. Locksmith will automatically show the appropriate content, using the styling from your theme, on the page. The access denied content will correspond to the key condition that you used.

So, for example, if you chose a condition requiring a sign-in:

![](/files/H30RX2WLD6p0pQj037Zy)

Or, if you chose a passcode-only entry method, you'll see a different prompt:

![](/files/1VxveccttLgAs0lgA3S4)

Each key condition type will have a slightly different landing page, the above two examples are not a complete list. The messages displayed on these pages can be customized as much as you need:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

{% hint style="danger" %}
**Important**: The Locksmith app only restricts content inside the "Online Store" sales channel. It won't work inside of other sales channels such as the Buy Button or the Wholesale sales channel.
{% endhint %}


# A Locksmith Overview

Locksmith is a simple yet powerful tool to help you make sure the right people see the right things in your Shopify store. In the spirit of the name of our app - ✨ Locksmith ✨ - you'll be using "locks" to determine what content in your store is restricted and using "keys" to denote how, when, and who gets access.

### Locks

Locks are created using the search bar within our Locksmith app. You can search for most resources in your store by name. More in-depth information on the in-app search bar here:

[Creating locks →](https://www.locksmith.guide/basics/creating-locks)

A **lock** restricts access to something on your shop. You can lock:

* Your entire shop
* Pages
* Products
* Collections
* Prices [more information here](https://www.locksmith.guide/tutorials/hiding-prices)
* The shopping cart (useful for preventing checkout until a condition is met)
* The login page
* The registration page (type 'register' into the Locksmith search bar)
* Product variants

A single lock can protect **multiple resources of the same type** — for example several products, or several collections — so one set of keys can cover a whole group at once. Manage a lock's resources from the **Protected resources** section of the lock editor, and give the lock an optional **name** (via the pencil icon in the header) to keep your lock list tidy. [More on creating locks →](https://www.locksmith.guide/basics/creating-locks)

For more advanced use cases, you can also create **custom Liquid locks** — these let you lock content based on any condition you can express in Liquid. Create one by clicking the *Start a Liquid Lock* link above the Locksmith search bar.

#### Lock options

After selecting a resource and clicking Save, you'll see a set of options for that lock. The most commonly used ones are:

* **Is the lock currently active?** Toggle the lock on or off without deleting it.
* **Should it also protect the products in this collection?** Disabling this means only the collection page itself will be locked, not the individual product pages within it.
* **Should it hide the collection, and its products, from search results and other lists?**
* **Should it hide links to this resource from navigation?**

You'll see different options depending on what type of resource you've locked. There are also additional options available under the **Advanced** section, including manual locking mode [more on that here](https://www.locksmith.guide/keys/more/manual-mode).

### Keys

A **key** permits access to the locked resource based on your criteria. Keys are created on the lock page using the "+ Add key" button.

Keys allow you to specify the exact conditions that give your customers access to the locked resource. There are over 20 built-in key conditions to choose from. You can also create your own **custom Liquid keys** by choosing *custom Liquid* from the keys menu.

More information on creating keys here:

[Creating keys →](https://www.locksmith.guide/basics/creating-keys)

#### Combining conditions: OR versus AND

Locksmith gives you the flexibility to add multiple keys and logically combine them to create unique access scenarios.

**OR** — Add another separate key to your lock by clicking *Add Another Key*. Keys connected by OR can individually open your lock, regardless of whether the other keys' conditions are met. A customer only needs to satisfy one condition to gain access.

You can tell you're looking at OR keys because there are **multiple key symbols**, each preceded by "Permit if the customer..." text.

<figure><img src="/files/rTDN17XPPf0scslT5m6G" alt=""><figcaption></figcaption></figure>

**AND** — Add another condition to the *same* key by clicking *+ add key condition* below an existing condition. When conditions are connected by AND, **all** of them must be met before access is granted.

You can tell you're looking at AND conditions because there is **only one key symbol**, with each condition inset beneath it.

<figure><img src="/files/pMczHp4Nfg4ziktD7ByB" alt=""><figcaption></figcaption></figure>

[Combining key conditions →](https://www.locksmith.guide/keys/more/combining-key-conditions)

#### Inverting keys

All key conditions can be inverted — meaning Locksmith will check for the *opposite* of the original condition. To invert a key, click the "invert" box in the upper right of the key.

For example, using inversion on a location key gives you: *Permit if the customer is **not** visiting from the United States.*

[Inverting conditions in Locksmith →](https://www.locksmith.guide/keys/more/inverting-conditions-in-locksmith)

### Other useful settings

#### The "force open other locks" setting

If you have several locks covering overlapping content (e.g. locked collections that share some of the same products), you may want to enable the **"force open other locks"** setting on a key. This tells Locksmith to grant access to all content covered by the current lock, even if other locks might otherwise apply.

[Using the "Force open other locks" setting →](https://www.locksmith.guide/keys/more/using-the-force-open-other-locks-setting)

#### Cart and checkout validation

Locksmith also has a checkout validation feature, which lets you create a rule ensuring that products with a specific product tag can only be purchased by customers with a specific customer tag — without modifying the checkout UI itself.

[Setting up checkout validation with Locksmith →](https://www.locksmith.guide/tutorials/more/setting-up-checkout-validation-with-locksmith)

***

### Questions?

Feel free to reach out at any time. You can contact us via email at [**team@uselocksmith.com**](mailto:team@uselocksmith.com).


# Creating locks

How to use Locksmith's in-app search bar to create a lock

Locks are how Locksmith controls access to content in your store. To create a lock, simply search for the resource you want to protect, select it, and then configure your access conditions (keys). A single lock can protect more than one resource — see [Protecting multiple resources with one lock](#protecting-multiple-resources-with-one-lock) below. This guide walks you through everything you need to know to get started.

### **What Is Searchable**

Use the search bar within Locksmith to find and lock any of the following resource types:

* **Products**
* **Collections**
* **Pages** — more info on Shopify pages here: [Pages](https://help.shopify.com/en/manual/online-store/os/pages)
* **Variants** — more info on Shopify product variants here: [Variants](https://help.shopify.com/en/manual/products/variants)
* **Blogs** — more info on Shopify blogs here: [Blogs](https://help.shopify.com/en/manual/online-store/os/blogs)
* **Blog posts** (also called articles) — articles must be tagged first; the tag is then searchable. More info on blog posts here: [Articles](https://help.shopify.com/en/manual/online-store/os/blogs/writing-blogs)
* **Product vendors**

To search, type the name of your resource into the search bar. Use specific terms. For example, "Long Sleeved T-shirt" rather than a broad term like "shirt".

![](/files/yTcdnKphHsaJtbLq1pT4)

### What is not searchable

The following cannot be directly locked via search:

* **Product tags** — to lock products that share a tag, create an Automated Collection and lock that instead.
* **Third-party app pages —** sometimes, a liquid lock can handle this, using the canonical\_url object.
* **Any page outside of your Online Store**
* **Menus and menu links** — menu links aren't directly lockable, but links pointing to lockable resources (such as products or collections) can be hidden from unauthorized visitors. To enable this, turn on the "Hide any links to this \[resource] in your shop's navigation menus" option under the lock's Settings.

### Specifying a resource type when searching

If a search returns too many results, or returns an error, you can narrow things down by specifying the resource type using this syntax:

* `product:snowboard`
* `collection:snowboards`
* `page:about snowboards`
* `blog:life is snowboarding`

{% hint style="info" %}
**Hint**: If you're searching for a resource, but not getting the result you're looking for, try updating Locksmith to re-sync. Head over to the Help page in the app, and click the Update Locksmith button.
{% endhint %}

### Protecting multiple resources with one lock

A single lock can protect more than one resource at a time, as long as they're **the same type** — for example, several products, or several collections. This is handy when the same access rule should apply to a group of resources: you set up the keys once, on one lock, instead of recreating the same key over and over.

Once you've created a lock, scroll to the **Protected resources** section of the lock editor. Use the **Add \[resource]** button to search for and attach more resources of the same type, and use the remove control on any chip to detach one. These changes are staged and take effect when you **Save** the lock, alongside any other settings you've changed.

<figure><img src="/files/NJGWzPbdtGtOmVpXtdqR" alt="The Protected resources section of the lock editor, showing two attached products and an Add product button"><figcaption><p>The Protected resources section lists everything a lock protects. Use Add to attach more.</p></figcaption></figure>

Clicking **Add \[resource]** opens a picker where you can search your store and select another resource to attach:

<figure><img src="/files/HRkE2o7idDjCG9LUPts9" alt="The resource picker modal, showing a product search and a list of products to select"><figcaption><p>The resource picker. Search, then select a resource to add it to the lock.</p></figcaption></figure>

{% hint style="info" %}
**Mixing types isn't supported.** A lock protects resources of a single type — a products lock holds products, a collections lock holds collections, and so on. To protect different kinds of resources, create a separate lock for each type.
{% endhint %}

{% hint style="warning" %}
**Don't see an "Add resource" button?** Multi-resource locks require Locksmith to have updated permissions on your store. If you installed Locksmith before this feature shipped, you may see a prompt to grant access — follow it, and the **Add \[resource]** affordance will appear. Until then, each lock is limited to a single resource.
{% endhint %}

### Naming your lock

Locks can be given an optional **name** to make them easier to find in your lock list. Click the pencil icon next to the lock's title in the editor header, type a name, and confirm with Enter (or the checkmark). A name is purely for your own organization — it doesn't change what the lock protects.

If you don't name a lock, Locksmith labels it automatically using its resources: the first resource's title, plus a "+ N more" suffix and a count badge (for example, "4 collections") when the lock protects several resources.

### Locking your entire store

Click into the search bar and select "Entire store" from the dropdown.

![](/files/VB8QpgJUDdp9KyRnw5P9)

#### Excluding resources from the store lock

The store lock settings page includes options to keep certain areas accessible to everyone:

* Allow access to the home page
* Allow access to policy pages
* Allow access to customer areas

For anything not covered by those options, see our guide on excluding content from locks:

{% content-ref url="/pages/BaozDnbfMLmse4BlHLKD" %}
[Excluding content from locks](/keys/more/excluding-content-from-locks)
{% endcontent-ref %}

### Locking all products in your store

By default, Shopify stores feature an 'All' collection that automatically encompasses all products in the store. Locking this collection offers an efficient method to secure all products in your Shopify store simultaneously, without the need to lock the entire store.

This collection can be locked just like any other collection. Search for the collection title 'all', select 'Collection: All' from the list of results, and follow the steps to create your lock.

<figure><img src="/files/gbLrEbNCYP0HeT75AsrH" alt=""><figcaption></figcaption></figure>

### A note about Liquid locks

For resources that aren't searchable through the standard search bar, Locksmith offers "Liquid locks" — a more flexible option that lets you target nonstandard resources or custom groups of pages.

To start a Liquid lock, click into the search bar and select "Start a Liquid Lock".

<figure><img src="/files/nKCM4br2GqfGqtLWYafX" alt=""><figcaption></figcaption></figure>

For more detail, see our guide on Liquid locking basics:

{% content-ref url="/pages/kDZqJC3FEIXwGvqQNR5J" %}
[Liquid locking basics](/tutorials/more/liquid-locking-basics)
{% endcontent-ref %}

### Troubleshooting

*My resource isn't showing up in search*

If something isn't appearing in search results, try the following:

* Use fewer, more specific search terms.
* Search by name rather than pasting in a URL — URLs won't work in most cases.
* For variants, include the variant option in your search. For example: "Color" equals "blue".
* If you've recently created the resource, it may not yet be indexed — try updating Locksmith (see below).

*Updating Locksmith*

Updating Locksmith refreshes its index of your store's resources, which can resolve search issues.

1. Open the Locksmith app and navigate to the "Help" page.
2. Click on the "Update Locksmith" button.\
   ![](/files/wcwJsdWHaQeMMmMjmWzV)
3. When the blue bar at the bottom of the screen disappears, the update is complete. This should only take a few seconds.

\
As always, if you have questions or issues **please feel free to get in touch with us** at <team@uselocksmith.com>.


# Creating keys

Explore the types of key conditions that Locksmith makes available to you.

Once you [create a lock](/basics/creating-locks), you'll need to create *keys* – simple statements that describe the conditions for access. For example, one might have a key that says "Permit if the customer is signed in". In this example, the *key condition* is "if the customer is signed in".

Keys are added inside the "Keys" section on the lock page. Click "+ Add key" to see the full list of available key conditions.

<figure><img src="/files/JUPFzVX8upc8EhxGUBj2" alt=""><figcaption></figcaption></figure>

Locksmith offers a wide range of key conditions, grouped below by type to help you find the right one.

## **Permit if...**

#### *The customer...*

These conditions require the visitor to be logged into a customer account. If they aren't already signed in, they'll be prompted to do so before access is granted.

* **is signed in** — grants access to any visitor with a customer account, once logged in.
* **is tagged with...** — grants access if the customer's account carries a specific tag. If your store's login form includes a registration link, that will be shown too.
* **has one of many email addresses** — grants access if the customer's email address matches one from a list you specify.
* **has an email address from an input list** — works the same way, but draws from an input list that has been synced with Locksmith. (For more on this, see [Input Lists](/tutorials/more/input-lists).)
* **email contains...** — grants access if the customer's email address contains specific text you define — for example, "@mycompany.com".
* **has purchased...** — grants access if the customer's last 50 orders include a specific product, identified by SKU, title, or product tag.
* **has placed at least x orders** — grants access if the customer's lifetime order count meets a minimum number you set.

[Customer account keys](/keys/customer-account-keys)

#### *The visitor...*

These conditions do not require a customer account, and apply to anyone visiting your store.

**Gives passcodes**

Locksmith supports three passcode conditions, covering single, multiple, and bulk use cases:

* **gives the passcode...** — prompts the visitor to enter a passcode matching the one you configure. If the passcode is incorrect, they'll be prompted again.
* **gives one of many passcodes...** — grants access if the visitor provides any passcode from a list you configure.
* **gives a passcode from an input list...** — works the same way, but draws passcodes from an input list, making it suitable for bulk use. ([Input Lists](/tutorials/more/input-lists))

[Passcode keys](/keys/passcode-keys)

**Follows secret links**

Locksmith supports two secret link conditions:

* **arrives via a secret link...** — generates a secret URL for the locked resource. Visitors arriving via that link are granted access; visitors using any other link will be denied.
* **arrives using a secret link code from an input list...** — works the same way, but draws secret codes from an input list, making it suitable for bulk use. ([Input Lists](/tutorials/more/input-lists))

[Secret link keys](/keys/secret-link-keys)

**Cart contents**

* **has a certain product in their cart** — grants access if a specific product is present in the visitor's current cart.
* **has a certain variant in their cart** — grants access if a specific product variant is present in the visitor's current cart.
* **has at least $x in their cart** — grants access if the subtotal of the visitor's current cart meets a minimum amount you set.

**Email subscriptions**

* **subscribes to your Mailchimp list** — connects to your Mailchimp account and grants access once a visitor provides their email address, adding it to your list.
* **subscribes to your Klaviyo list** — connects to your Klaviyo account and grants access once a visitor provides their email address.
* **if the customer is a member of a Klaviyo list or segment** — grants access only if the email address is *already* on the list.

[Newsletter keys](/keys/more/newsletter-keys)

**Other visitor conditions**

* **has a certain IP address** — grants access if the visitor's IP address matches an address or range you specify.
* **is visiting from a certain location (city, country, etc.)** — uses the visitor's IP address to estimate their location via [GeoIP by MaxMind](https://www.maxmind.com/en/geoip2-services-and-databases) , granting access if it matches a location you define.
* **confirms the prompt** — grants access based solely on the visitor confirming a prompt that you configure.
* **is visiting a certain domain** — grants access if the visitor's domain matches a specific domain on your store. This is useful if your store has multiple domains scoped to different regions or audiences.

[IP address keys](/keys/more/ip-address-keys)

[Visitor location keys](/keys/visitor-location-keys)

[Confirmation key condition](/tutorials/more/editing-the-confirmation-message)

[Showing content only to specific Markets](/tutorials/more/shopify-markets)

#### *Based on time*

* **is visiting before a certain date and time** — grants access if the current time is before a date and time you specify.
* **is visiting after a certain date and time** — grants access if the current time is after a date and time you specify.
* **if it's during a weekly schedule** — configure different schedules for each day with multiple time periods.

[Using date and time key conditions](/tutorials/more/using-date-and-time-key-conditions)

[Creating weekly schedules](/tutorials/more/creating-weekly-schedules)

#### *Special conditions*

* **(always permit)** — forces a lock open, regardless of other conditions. This is most commonly used when you need to exclude certain content from another lock. For more detail, see: [Excluding Content from Locks](https://www.locksmith.guide/keys/more/excluding-content-from-locks) .
* **(custom Liquid)** — allows you to write custom Liquid code that grants access when your condition evaluates to true. This is the most flexible key condition available, and is useful when no standard condition fits your needs. For more detail, see our guide on custom [Liquid Keys](https://www.locksmith.guide/keys/more/custom-liquid-key-condition-basics).

## Copying keys between locks

If you need to reuse a key setup across multiple locks, Locksmith includes a copy and paste feature for keys.

**Here’s how it works:**

1. **Find the key you want to copy.** On any existing lock, locate the key you'd like to reuse and click the copy icon to the right of the key name.

<figure><img src="/files/v7VJGsKXSPiC1CRe2oGJ" alt=""><figcaption></figcaption></figure>

2. **Navigate to your new lock.** Open the lock where you'd like to apply that key.
3. **Paste the key.** Click the paste icon beside "Add key." Locksmith will automatically add the copied key to your new lock.

<figure><img src="/files/q2PucSxgFE1nVnkDmGSV" alt=""><figcaption></figcaption></figure>

You can repeat this as many times as needed to reuse key configurations across multiple locks.

{% hint style="info" %}
**Note:** If your keys include product- or time-specific conditions, be sure to update those details after pasting.
{% endhint %}

***

## Related articles

More information on how to **combine key conditions together** is covered in our "Overview" guide here:

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions)
{% endcontent-ref %}

Remember that all key conditions can be **inverted!**

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
{% endcontent-ref %}

Having issues with **locks overlapping**? Perhaps the "Force open other locks" setting is for you:

{% content-ref url="/pages/0c8BffnjAyaptBUb4Z8f" %}
[Using the "Force open other locks" setting](/keys/more/using-the-force-open-other-locks-setting)
{% endcontent-ref %}

More information on customer account keys:

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}


# Compatibility with other apps and Shopify features

Locksmith works in and around the online storefront theme layer – an arena shared by many, many other apps. Locksmith's interoperability is excellent; its internal Liquid engine is very good at injecting its code in the right places, without causing issues for themes or apps. Because of this, **in the vast majority of cases, you won't need to worry about Locksmith's compatibility**.

Having said that, there are a few places where there are specific points of compatibility or incompatibility.

### Locksmith and the Shop App

We're pleased to announce that Locksmith is now compatible with the Shop app. Shopify has updated its policies to allow stores using Locksmith to remain eligible for the Shop app, provided all other Shop app eligibility requirements are met.

Shopify's policies prohibit the use of password control and age verification apps, such as Advanced Registration, B2B Login Access Management, Login to View Price, and MagicPass Wholesale, for stores wishing to use the Shop app. However, Locksmith is now explicitly listed as an exception to this rule.

When you use Locksmith to lock certain products, your store will still remain eligible to display on Shop, and your locked products will not be included in your Shop Store. This ensures that merchants can maintain the control Locksmith provides while remaining eligible for the Shop app.

{% hint style="info" %}
By default, Locksmith removes locked products and collections from the Shop channel using a product metafield.

If you want a locked product or collection to stay visible on the Shop channel, open the lock's **Advanced settings** and enable **Allow \[this product / products in this collection] on the Shop channel**.:<br>
{% endhint %}

<figure><img src="/files/oeX8ub4Zy6zHJh5EPMVl" alt="A checkbox labeled &#x27;Allow products in this collection on the Shop channel&#x27; in Locksmith&#x27;s Advanced settings. The checkbox is unchecked. The description reads: &#x27;Locksmith cannot enforce its access conditions on the Shop channel, so locked products are removed from the Shop channel via a product metafield that we automatically keep in sync. Use this setting to explicitly allow products in this collection to remain visible in the Shop channel."><figcaption></figcaption></figure>

{% hint style="warning" %}
Locksmith can only manage visibility in the Shop app at the **product level**. Products locked by product and collection locks will automatically be removed from the Shop app. However, variants locked by variant locks will still be purchasable in the Shop app. It is therefore your responsibility to manage desired visibility for your variants in the Shop app.
{% endhint %}

For more details on Shop app eligibility requirements, including prohibited product types or other restrictions, please refer to Shopify's [Shop app eligibility requirements](https://help.shopify.com/en/manual/online-sales-channels/shop/eligibility/requirements).\
\
**Variant Locks and the Shop App**

Locksmith’s variant-level locks don’t automatically remove locked variants from the Shop app, as the app manages visibility at the product level. While Locksmith adds a metafield to exclude locked products or collections from the Shop app, Shopify doesn’t support sales channel visibility controls for individual variants.

If a product includes locked variants, the Shop app will flag it with a warning (“This product is hidden by a third-party app”) and prevent it from being listed.

**Workaround for Variant Visibility on the Shop App**\
To keep unlocked variants available while hiding locked ones, you can create duplicate products:

* One product with only unlocked variants, published to the Shop app.
* Another product with locked variants, excluded from the Shop app.

This solution offers greater control but may increase inventory management complexity. For guidance on using duplicate products, refer to our tutorial on [price tiers](https://www.locksmith.guide/tutorials/more/price-tiers#using-product-duplicates-1). You can also explore [inventory management tips](https://www.locksmith.guide/tutorials/more/price-tiers#inventory).

**Important: The Shop channel may be added to your store automatically**

Shopify automatically adds the Shop sales channel to any store that meets their Shop Merchant Guidelines — including stores that have Shopify Payments (or Shop Pay) enabled and a chargeback rate of less than 1% in the last six months. This means the Shop channel can appear in your Shopify admin without you installing it yourself, and your eligible products may become listed in the Shop app without any action on your part.

{% hint style="warning" %}
If you're using Locksmith to lock variants, be aware that the Shop channel being auto-added could expose those locked variants to purchases through the Shop app — since Locksmith's Shop app protection only works at the product level, not the variant level.
{% endhint %}

If you **don't** want your store or products listed on Shop, you have a few options:

* **Opt out of Sell with Shop:** In your Shopify admin, go to **Sales channels > Shop > Settings**, and change the **Sell with Shop** setting to "Link to online store" (this prevents direct purchases through Shop, though your products may still be discoverable).
* **Remove the Shop channel entirely:** In your Shopify admin, go to **Settings > Sales channels**, find Shop, and click **Uninstall**. Note that orders may still come through Shop even without the channel installed — see Shopify's documentation below for details.
* **Contact Shopify support** to request an account-level opt-out from the Shop App and/or Agentic Storefronts.

For full details on Shop eligibility and how auto-enrollment works, refer to Shopify's documentation:

* [Requirements for displaying your store in Shop](https://help.shopify.com/en/manual/online-sales-channels/shop/eligibility/requirements)
* [Setting up the Shop channel](https://help.shopify.com/en/manual/online-sales-channels/shop/setup)
* [Activating Shop Pay](https://help.shopify.com/en/manual/payments/shop-pay/activating-shop-pay)

## Officially unsupported apps

The following apps have known compatibility issues with Locksmith - although they *may* work in some cases, with the correct settings.

* Any other **access control apps** that work in a similar way to Locksmith will almost certainly not work well alongside Locksmith, as they tend to inject code into the same areas of your theme.
* [Bold Custom Pricing: Wholesale](https://apps.shopify.com/customer-pricing) - but only when using [Locksmith's variant locking ](/tutorials/more/locking-variants)and [manual locking](/tutorials/more/manual-mode) features.
* Any app that controls price at the variant level - but only when using [Locksmith's variant locking ](/tutorials/more/locking-variants)and [manual locking](/tutorials/more/manual-mode) features.
* Locksmith's [manual locking](/tutorials/more/manual-mode) feature, and many times full-page locks, can ***not*** generally be used to hide content being displayed by other third-party apps, including prices, buttons, widgets etc.
* [Gempages](https://apps.shopify.com/gempages) - while it is possible to use the apps together *in some cases*, there are still many compatibility issues between the two apps.
* [Weglot](https://apps.shopify.com/weglot) - Locksmith's [location detection key condition](/keys/visitor-location-keys) is not compatible with Weglot, but you should otherwise be fine using both apps at the same time if not using location detection.

## Other areas of incompatibility

* **Predictive searches** - Locksmith generally cannot remove products from searches that dynamically show search results as you type. This includes built-in theme searches, and most apps that add predictive searches to your theme. That being said, it is possible to manage the appearance of specific products in store searches using product metafields: [more information on that here](https://community.shopify.com/c/ecommerce-marketing/hiding-a-product-from-search-engine/td-p/484788).
* [The Checkout area](https://help.shopify.com/en/manual/checkout-settings) - Apps are heavily limited in their ability to change checkout, for security reasons. Locksmith cannot restrict shipping methods, shipping addresses, or most other checkout elements. However, you can [hide payment methods by customer tag](https://www.locksmith.guide/tutorials/more/hiding-payment-methods-by-customer-tag). If you need to restrict a customer's ability to check out,

  you now have two options:

  1. **Use Locksmith on the cart page**, before checkout begins. This is the traditional approach—more on that [here](https://www.locksmith.guide/tutorials/more/protecting-against-bots).
  2. **Use our checkout validation feature**, which allows you to set up a single rule: products with a specific tag can only be purchased by customers who have a specific customer tag. This can help block unauthorized purchases—*without* modifying the checkout UI itself. Learn how to set that up [here](https://www.locksmith.guide/tutorials/more/setting-up-checkout-validation-with-locksmith).
* Protecting against bot/resellers - Locksmith can’t fully prevent purchases made by bots or resellers—especially when they’re using direct-to-checkout links, which bypass the Online Store entirely. Since Locksmith works within the Online Store channel, it can’t intervene at the checkout layer directly.\
  \
  However, we *do* now offer a **checkout validation** feature, which can help you block unwanted purchases **after** a customer reaches checkout. This is a powerful way to add another layer of control over who gets to buy what. Learn how to set it up here:\
  [Setting up checkout validation with Locksmith](https://www.locksmith.guide/tutorials/more/setting-up-checkout-validation-with-locksmith)\
  \
  There are also other strategies you can use alongside Locksmith to reduce the risk of bot purchases. While these aren't built into Locksmith itself, we've outlined a helpful approach here:\
  [Protecting against bots (without using Locksmith directly)](https://www.locksmith.guide/tutorials/more/protecting-against-bots)
* Locksmith cannot block RSS feeds from locked blogs.
* Locksmith can only hide products published to the **Online Store** sales channel, and absolutely cannot help with protecting, hiding, or restricting purchases on other channels.
* **Locksmith generally cannot hide elements or filter locked content in areas controlled by other third-party apps**, especially if those apps render their content outside the theme files where Locksmith injects its code.
* Locksmith is **not** compatible with [**headless or custom storefronts**](https://www.shopify.com/plus/solutions/headless-commerce) (e.g. sites built with Next.js, Hydrogen, custom frontend frameworks). Locksmith relies on Shopify's Liquid rendering engine and only works within the Online Store sales channel. In fully custom storefronts, there is no theme for Locksmith to work with, and no way for it to insert or enforce access logic.


# Removing Locksmith

If you've been using Locksmith to protect your shop, uninstallation means two things:

1. Removing Locksmith from your theme
2. Removing Locksmith from your Shopify apps list

The order is important! **Locksmith is NOT able to clean up its code from your theme after you remove it from your apps list** (and neither can Locksmith staff), so it's critical to have Locksmith remove itself from your theme before removing the app from your list.

{% hint style="warning" %}
**Please note -** Before proceeding, please consider whether or not there has been any Locksmith code added to your theme manually in the past. This can happen if you are doing price hiding with Locksmith, or if you wrote in for support help and your theme needed to be adjusted. Any Locksmith code that was added manually to your theme needs to be manually removed from your theme! If this is you, **do not follow the rest of this guide** - simply disable Locksmith from the "Settings" tab in the app, for now. This will cause Locksmith to be dormant in your store. Then, contact us at [team@uselocksmith.com ](mailto:team@uselocksmith.com)for help removing the code.

*Do not delete the app from your apps list before getting the code removed - deleting the app while the code is still in your theme can cause your pages to be inaccessible!*
{% endhint %}

## 1. Removing Locksmith from your theme

{% hint style="warning" %}
**Important**: If you've already deleted Locksmith from your apps list, you'll need to temporarily add the app back to your store and accept the permissions, which will give Locksmith the ability to edit your theme to remove its code. You can add the app back to your store from [our app store listing](https://apps.shopify.com/locksmith).

*You do **not** need to start a subscription to run Locksmith's code removal process.*
{% endhint %}

1. To start, open the Locksmith app from within Shopify.
2. Click on the "Help" link under "Locksmith" from the Shopify admin navigation menu.
3. Click the red "Remove Locksmith" button.

<figure><img src="/files/Wz8IgOdoMrdJwvZcPo1J" alt=""><figcaption></figcaption></figure>

After clicking this, you'll see a status bar at the bottom of the screen, which is Locksmith letting you know that it's syncing your settings with Shopify. **When this status bar goes away, the removal has completed** - it should only take a handful of seconds. Wait for this to complete before continuing.

## 2. Removing Locksmith from your Shopify apps list

Delete Locksmith from your apps list in the standard way. Namely, from your Shopify admin, go to Apps > App and Sales Channel Settings > Locksmith > Delete.

[More information from Shopify about deleting apps here](https://help.shopify.com/en/manual/apps/working-with-apps#uninstall-an-app).

{% hint style="info" %}
**Note**: Deleting the Locksmith app from your apps list will automatically cancel your subscription, so at this point, no further action is necessary.
{% endhint %}

### Cancelling your Locksmith subscription

**If you have decided to NOT delete the Locksmith app** from your apps lists, as outlined above, please make sure to cancel your subscription manually, to avoid being charged unexpectedly:

<figure><img src="/files/5wS5THdCuLkp7WDPW9cr" alt=""><figcaption></figcaption></figure>


# Locksmith Glossary & Reference

{% hint style="info" %}
Hey there, human reader!\
\
(Lightward human speaking)\
\
You've reached a document with a lot of information all at once. This is *mostly* designed for AI to read and help you better, since many folks are asking questions through Claude, ChatGPT, and others.\
But read on, if you want the nitty-gritty of Locksmith. :)\
\
If you're looking for smaller chunks, start with the "Quick Start" or "Locksmith Overview" guides in the left-side menu.\
\
We can be reached directly at <team@uselocksmith.com>\
\
Cheers!
{% endhint %}

A glossary of terms, concepts, and behaviors for the Locksmith app for Shopify (by Lightward). Designed to serve two audiences:

1. **Merchants and support readers** — who want clear, plain-language definitions.
2. **Claude AI, ChatGPT, Lightward AI and other generative AI**— when this document is included in a system prompt, an LLM can use it to answer user questions accurately and translate informal phrasing into Locksmith's actual terminology.

> **Scope note (read first):** Locksmith only restricts content inside the **Online Store sales channel**. It does not apply to the Buy Button, Wholesale channel, Shopify POS, Shop app, or any headless / custom storefront.

***

### 1. Mental model

Locksmith is built around two concepts:

* A **lock** is placed on a piece of store content. Without a lock, content is public; with a lock, access is restricted.
* A **key** describes a way someone is allowed in. A lock can have many keys, and any one of them is enough to grant access (keys are OR'd together by default).

Each key is made up of one or more **key conditions** — the actual rules being checked (a customer tag, a passcode, a location, etc.). Within a single key, multiple conditions are AND'd together.

Visualize it as a physical lock with a keyring: the lock is what's protecting the door, and any key on the ring will open it — but a key with two notches on it has to match both notches.

***

### 2. Core concepts

#### Lock

A restriction placed on a specific piece of store content. A lock is enabled or disabled, and can have zero or more keys. A lock with no enabled keys denies everyone — including the merchant themselves on their live storefront.

#### Key

A single permission rule attached to a lock. A lock with multiple keys grants access if **any** key is satisfied. Each key contains one or more conditions.

#### Key condition

The actual test inside a key — e.g. "customer is signed in", "gives the passcode", "is visiting from Canada". Locksmith ships with 20+ built-in conditions and supports custom conditions via Liquid.

The Shopify object a lock is attached to. Lockable things include:

* Products
* Collections (custom or smart)
* Pages
* Blogs (and, by extension, the articles inside them)
* The shop (the entire storefront)
* Product variants (a specialized lock — see "Variant lock")
* Targets that aren't searchable from Locksmith's resource picker (handled via "Liquid lock")

A single lock can protect **multiple resources of the same type** — for example several products, or several collections — not just one. Resources are managed from the **Protected resources** section of the lock editor. Mixing types in one lock is not supported: a products lock holds products, a collections lock holds collections, and so on. (See "Standard (resource) lock" in §3 for the permissions requirement and the single-resource fallback.)

In the Admin API, the supported `resource_type` values are: `product`, `custom_collection`, `smart_collection`, `page`, `blog`, and `shop`.

#### Access denied content / lockout view

What an unauthorized visitor sees instead of the locked content. Locksmith renders this using your theme's styling and shows a prompt appropriate to the key condition (login form, passcode entry, etc.). The wording is fully customizable.

***

### 3. Lock types and lock-level features

#### Standard (resource) lock

A lock attached to one or more Shopify resources **of the same type** — one or several products, or one or several collections, etc. — selected from Locksmith's resource picker. The most common kind. Resources are managed in the lock editor's **Protected resources** section: use **Add \[resource]** to attach more, or remove individual ones. (There is no separate "edit target" page; everything happens inline on the lock editor.) A lock with no resources is simply inactive — its keys are preserved — until a resource is re-added.

**Permissions note:** protecting *multiple* resources with one lock requires the shop to have granted Locksmith updated permissions. Shops that have not re-granted are limited to a single resource per lock, and Locksmith prompts them to grant access where the "Add resource" affordance would otherwise appear. On those shops there is no "swap" affordance — to change which resource a single-resource lock protects, remove the existing one and add another.

#### Lock name

An optional, merchant-given label for a lock, edited inline (the pencil icon) in the lock editor header and shown in the lock list. When a lock has no name, Locksmith derives a display title from its resources — the first resource's title, plus a "+ N more" suffix for multi-resource locks — and shows a count badge (e.g. "4 collections"). A name is purely organizational; it does not affect what the lock protects.

#### Shop lock

A lock applied to the entire storefront. Useful for coming-soon pages, gating the whole site behind a passcode or sign-in, or geo-restricting access. Note that this is distinct from Shopify's native storefront password protection (see §8) — a shop lock is configured inside Locksmith and supports any key condition.

#### Variant lock

A lock applied to a specific product variant. By default, hidden variants are removed from variant pickers automatically. Note: passcode keys are not directly compatible with variant locks — see §8 for the recommended landing-page workaround.

#### Manual lock (manual locking / manual mode)

A lock that hides only **part** of a page rather than the whole resource. Common uses: hiding prices, hiding the add-to-cart button, hiding a custom region. Manual locking is enabled per-lock under **Advanced Settings** ("Enable manual locking"). Turning this on **disables full-page protection** for that lock — the merchant is then responsible for hiding the right pieces of the page, either by:

* adding hand-written Liquid wrappers to the theme files, or
* defining a **theme hiding profile** (see below) so Locksmith hides the right sections, blocks, or snippets automatically.

Manual locks do not automatically prompt the visitor. If the key is a passcode, the merchant typically adds an "Enter passcode" button in the theme that triggers the prompt. Manual locking is **not compatible with variant locks**, and generally cannot reach into content rendered by other apps (e.g. page builders).

#### Theme hiding profile (theme hiding definition)

A no-code (or low-code) way to tell Locksmith **which parts of a theme to hide** when a manual lock is in effect. Used together with the lock's "Enable manual locking" setting. Documented under "How to hide theme sections, blocks, and snippets" in the Locksmith guide.

A theme hiding profile is made up of one or more **hiding definitions**. Each definition points at a specific section, block, or snippet in the theme — for example, the snippet that renders the price, or the block that renders the buy buttons. When a visitor doesn't have access, Locksmith suppresses the matching elements; when they do have access, the elements render normally.

Key facts:

* **Per theme.** Profiles are configured per theme, since every theme's section/block/snippet structure is different. Profiles for unpublished themes can be edited via the ellipsis ("...") menu next to each theme listed in-app.
* **Two selection methods when building a profile:**
  * **Add by name** — search the theme's files by name (e.g. typing "price" surfaces every section/block/snippet with "price" in the filename). Pick each one you want to hide; one definition is added per pick.
  * **Add from theme presets** — for the free Shopify-made themes (Dawn and friends), Locksmith ships ready-made bundles of definitions covering the common cases. Current presets are **Price** and **Buy buttons**. Add the relevant preset(s) and you're done. Add both if you're hiding both. Note: presets only match newer versions of these themes, and the **Trade** theme is an exception (it doesn't use sections/blocks for price/cart, so no presets exist for it).
* **Liquid variable.** Each hiding definition needs to know which Liquid object the hiding decision is based on. The default is `product`, which is right for most cases. Themes that use different variable names need that name supplied — for example, a `card-product` snippet often uses `card_product`, a `featured-product` section often uses `featured_product`, and the header/footer hiding pattern uses `item`.
* **Online Store 2.0 dependency.** Hiding profiles rely on theme modularity (the section/block/snippet system in OS 2.0). Legacy or heavily customized themes may still need manual Liquid in the theme file. If the thing you want to hide isn't contained in a section, block, or snippet, manual code is also still required.
* **What hiding profiles cannot do:**
  * Hide content that's rendered by another app (page builders, third-party product widgets, etc.).
  * Be used with **variant locks**.
  * Truly remove the price from page source — the value may still appear in HTML used by analytics/marketing tools (Google Analytics, etc.). The hide is *visual*. For true source-level removal, prefer full-page locking.

#### Liquid lock

A lock created against a target that isn't searchable through Locksmith's resource picker — typically a non-standard page or a custom storefront section. The resource is identified via Liquid in the theme rather than picked from a list.

> **Don't confuse with a Liquid&#x20;*****key*****.** A Liquid lock identifies *what* is being locked. A Liquid key (in §4) is a custom condition that determines *who* gets in. They sound similar but solve different problems.

#### Lock-level options

* **Hide from navigation** — removes links to the resource from theme nav menus when the visitor doesn't have access.
* **Hide from product grids** — removes the product from collection pages, search results, and other product lists for unauthorized visitors.
* **Remove from sitemap** — excludes the resource from `sitemap.xml`.
* **noindex** — adds a `noindex` meta tag so search engines won't index the lockout page.
* **Disabled** — the lock exists but isn't enforcing anything. Useful for staging.

***

### 4. Key conditions (built-in)

Grouped by category. Each can typically be **inverted** — flipping a "grant access if X" key into a "grant access *unless* X" key. See §5 for the inverse option.

#### Customer account conditions

* **Is signed in** — visitor must be logged into a Shopify customer account.
* **Is tagged with…** — customer account must carry the specified tag. Requires sign-in.
* **Has one of many email addresses** — customer's account email must be in a list you provide. Requires sign-in.
* **Has an email address from an input list** — same as above but sourced from an input list (see §6). Requires sign-in.
* **The customer's email contains…** — substring match on the customer's email (e.g. `@mycompany.com`). Requires sign-in.

#### Passcode conditions

* **Gives the passcode** — single passcode that the visitor types in. Supports a usage limit that counts down on each successful entry (single-passcode key only).
* **Gives one of many passcodes** — small set of passcodes managed inside Locksmith.
* **Gives a passcode from an input list** — bulk passcodes (hundreds to hundreds of thousands) managed via an external input list.

#### Secret link conditions

* **Arrives via a secret link** — Locksmith generates a special URL containing a secret code; only visitors who arrive via that URL gain access.
* **Arrives using a secret link code from an input list** — bulk secret links sourced from an input list.

#### Location conditions

* **Is visiting from a certain location** — geolocation by IP. Supports countries, regions (e.g. "North America"), and cities. Subject to IP-geolocation accuracy and bypassable via VPN.

#### Cart conditions

* **Has a certain product in their cart**
* **Has a certain variant in their cart**
* **Has at least $X in their cart** — checks cart subtotal.

#### Purchase history conditions

* **Has purchased…** — checks the customer's last 50 orders for a SKU, product title, or product tag. Requires sign-in.
* **Has placed at least X orders** — lifetime order count. Requires sign-in.

#### Date / time conditions

* **Schedule / date-time window** — grants access only during specified date or time windows. Supports both fixed windows (a launch on a particular date) and recurring **weekly schedules** (e.g. "open Mon–Fri, 9am–5pm"). Useful for launches, sales, time-limited drops, and business-hours gating.

#### Newsletter / email-marketing conditions

* **Mailchimp signup** — grants access after the visitor enters their email; the email is added to your Mailchimp list.
* **Klaviyo** — by default, signs the visitor up to a Klaviyo list when they enter their email. Can also be configured to verify membership against an existing Klaviyo list (using a Klaviyo API key).

#### Custom condition

* **Liquid key** — write a Liquid expression that evaluates to truthy/falsy. The most flexible option; used for any rule the built-in conditions don't cover. Distinct from a *Liquid lock* (§3), which identifies a non-searchable resource rather than a key condition.

***

### 5. Key-level options

These are settings you can turn on for any key, modifying how it behaves:

* **Inverse / "unless..."** — flips the condition. "Customer is tagged with `wholesale`" becomes "customer is **not** tagged with `wholesale`, or is not signed in".
* **Customer auto-tagging** — when a signed-in customer successfully uses the key, Locksmith adds a tag of your choice to their customer record. Useful for tracking and for chaining locks.
* **Customer remember** — for passcode, secret link, newsletter, and similar keys: if the visitor was signed in when they unlocked, Locksmith remembers it on their account so they aren't reprompted.
* **Force open other locks** — when this key grants access, the visitor is *also* allowed past **other** locks that happen to cover the same resource. Example: a product sits in two collections, each of which has its own lock with different key conditions. Normally the visitor would have to satisfy both. With "Force open other locks" on the satisfied key, the second collection lock is bypassed for that resource.
* **Redirect URL** — when a visitor uses this key to open the lock, they are sent to the URL you specify. Note: this only redirects *successful* unlocks; it does **not** redirect visitors who are denied access.
* **Usage limit** — for the single-passcode key: number of allowed uses; counts down on each success.
* **Case sensitivity** — for passcode keys: whether the visitor's input must match case exactly.

***

### 6. Other features and integrations

#### Input lists

A way to feed large quantities of data (passcodes, secret link codes, email addresses) into a key from an external file (e.g. a Google Sheet) rather than typing them into Locksmith's UI. Designed for bulk scenarios — performant up to many hundreds of thousands of entries. A single usage limit can be applied across the whole list.

#### Checkout Validation

A bot-protection feature that runs at checkout. Helps block automated checkout abuse independent of any lock you've set up.

#### Customizable messages

Every prompt and access-denied message can be customized — globally for the store, per-key-condition-type, or on individual keys for maximum flexibility.

#### Mechanic

Lightward's other Shopify app. Sometimes referenced in workarounds — for example, to tag orders with the secret-link code a customer used during their visit.

***

### 7. Developer concepts

#### Liquid integration

Locksmith works by writing Liquid into your published theme. Most key checks happen on Shopify's servers via that Liquid — that's why most keys are fast and don't add network round-trips.

#### Admin API

A REST-style API at `https://uselocksmith.com/api/unstable/lock` for creating, reading, and managing locks programmatically. Authenticated with `x-shopify-shop-domain` and `x-locksmith-access-token` headers. Supports a `dryrun` parameter for safe testing. A lock's resources can be managed either by passing a `resources` array in the lock body, or via the dedicated endpoints `POST /locks/:lock_id/resources`, `PATCH /locks/:lock_id/resources/:lock_resource_id`, and `DELETE /locks/:lock_id/resources/:lock_resource_id`. Locksmith support cannot debug user-written API requests.

#### Lock JSON shape (high level)

A lock has an optional `name`, a `resource_type`, a `resources` array (each entry an attached resource with its own `resource_type`, `resource_id`, and `resource_options`), and an array of `keys`. The `resources` array is how a lock's protected resources are expressed, and is how multiple resources are attached to one lock. When creating a lock via the Admin API, set the top-level `resource_type` (required) and list the resources in the `resources` array; a lock response also exposes a top-level `resource_id` reflecting its primary resource. (See §7 → Admin API and the "Using the Admin API with Locks" guide for the resource-management endpoints.) Each key has an `options` object and a `conditions` array. Each condition has a `type`, `inverse`, and a type-specific `options` object. The recommended way to author a key configuration is to build it in the Locksmith UI and copy the JSON.

Mapping between key-`options` JSON fields and their UI labels (see §5):

| JSON field         | UI label               |
| ------------------ | ---------------------- |
| `inverse`          | Inverse / "unless..."  |
| `force_open`       | Force open other locks |
| `customer_autotag` | Customer auto-tagging  |
| `redirect_url`     | Redirect URL           |

#### Theme code installation

Locksmith installs code into your theme's files. There is a **"Liquid assets to ignore"** setting (one full theme path per line, e.g. `sections/collection-list.liquid`) that lists files Locksmith should leave alone — useful when a particular file is being heavily customized or is causing a conflict.

***

### 8. Important behaviors, edge cases, and caveats

#### Online Store channel only

Locksmith does not protect content in any other channel. The Buy Button, Wholesale channel, headless storefronts, and APIs accessed directly will not respect Locksmith locks.

#### URLs stay active; content is replaced

A locked resource's URL is **not blocked** — it still resolves and returns a 200. What Locksmith does is replace the page's content with the appropriate lock prompt or access-denied message. This means:

* Merchants will continue to see hits to those URLs in analytics, logs, and Shopify reports. Hits do not imply that locked content was viewed; the content shown was the lock prompt unless the visitor opened the lock.
* The URL itself is not "secret" by virtue of being locked. If you need a URL that's only known to permitted visitors, use a **secret link** key.

#### Resources must be published to the Online Store sales channel

Locksmith only grants access to resources that are published to the **Online Store** sales channel. If a product, page, or collection is unpublished from Online Store, the visitor will see a Shopify **404** at that URL — even if they have a perfectly good key. From Locksmith's perspective there's nothing to unlock, because Shopify isn't serving the resource in the first place. If customers report 404s on a locked resource, the publish state is the first thing to check.

#### Cannot bypass Shopify's native storefront password protection

Shopify itself offers a native **storefront password protection** feature in the Online Store preferences (the one that puts a single password on the entire storefront before anyone can see it). This runs *before* the storefront loads, at a layer Locksmith doesn't reach. If that feature is enabled, every visitor must clear it first; Locksmith cannot let anyone past it, even with a valid key. If you're using Locksmith to control access, the native storefront password should normally be off.

#### Uninstall must be done correctly

Because Shopify doesn't allow apps to clean up their theme code automatically on uninstall, you must either disable/delete all locks **or** click the in-app **"Disable Locksmith"** button **before** removing the app from your Shopify admin. Otherwise, theme code remains and locked content can stay locked.

#### Trial expiration / suspended mode

If the free trial ends without a paid plan — or if a paid subscription lapses — Locksmith enters **suspended mode**. Locks remain active and continue to block content, but **keys stop working**: even authorized visitors who would normally have access cannot open the locks. Resolving this requires either subscribing or disabling Locksmith. Note that Locksmith does **not** auto-subscribe the merchant when the trial ends — the merchant must click **Subscribe** in the app (see §9). The safe path, if you don't intend to subscribe, is to use the in-app **"Disable Locksmith"** button before the trial ends.

#### Caching and "the key stopped prompting me"

Once a passcode, secret link, location, or newsletter key has been satisfied, Locksmith caches that fact so the visitor isn't reprompted: on the **customer account** if they were signed in, or in the **cart** if they weren't. Re-testing the prompt typically requires a fresh incognito window — and for location keys with a VPN, also clearing the browser cache. Clearing the cart can also appear to "log out" of a key for guest visitors.

#### No built-in usage analytics

Locksmith does not record per-customer usage statistics out of the box. Workarounds:

* **Auto-tagging** customers when they unlock (works only for signed-in customers).
* **Usage limit countdown** on single-passcode keys, by setting a high starting number and reading the remaining count.
* **Mechanic tasks** for tagging orders by the secret link they used.

#### Lock and key limits

Locksmith itself does **not** impose a cap on the number of locks or keys a store can have. However, because Locksmith works by writing Liquid into the published theme (see §7), every lock and key adds to the size of those theme files — and Shopify enforces a per-file size limit on theme assets. At very high lock/key volumes, merchants can run into Shopify's file-size ceiling before they run into anything on the Locksmith side.

As a rough ballpark, most merchants can reach **around 200 locks with one key each** without running into this limit. This is a practical observation, not a guarantee — actual headroom varies with the theme (some leave more room in the relevant files than others) and with the mix of key types (some generate more verbose Liquid than others).

For merchants approaching this scale, the recommended paths are: use the **Admin API** to manage locks programmatically rather than maintaining many similar locks by hand, and contact Locksmith support — they can advise on theme-side strategies for staying under the limit.

#### Manual locks with passcodes need a trigger button

Because manual locks don't automatically prompt, if the key is a passcode, you must add a button in the theme that triggers the passcode prompt. Sample button code is available in the official docs.

#### Variant locks + passcodes

Passcode keys are not directly compatible with variant locks. The recommended workaround is a **landing page pattern**: create a separate page (a normal Shopify page), lock it with the passcode key, and direct customers there. When the customer enters the correct passcode on that page, the variant-level lock opens for them as well — they can then continue to the product and select the variant. A manual-locking-with-code approach is also technically possible, but the landing page is the simpler and more common solution.

#### Admin lockout

A merchant can lock themselves out of their own storefront by stacking restrictive locks. When this happens, the safest fix is to access the Locksmith app directly through the Shopify admin (which doesn't depend on the storefront) and disable the offending locks. See Locksmith's FAQ for the current recommended steps.

***

### 9. Pricing model

Locksmith uses Lightward's "**pay what feels good**" policy. Plans are tiered to the merchant's Shopify plan, with a suggested price for each tier. Merchants cannot adjust the price themselves — but they are welcome to reach out to Locksmith support to have a conversation about pricing if the suggested price doesn't feel right for their situation. There are no usage-based fees on top of the subscription.

#### Subscriptions are merchant-initiated

Locksmith does **not** automatically start a subscription for the merchant — not at install, not when the trial begins, and not when the trial ends. To start (or restart) a paid subscription, the merchant must click the **Subscribe** button inside the Locksmith app. This is why a trial that ends without action puts Locksmith into suspended mode (see §8) rather than rolling silently into a paid plan.

| Shopify plan tier | Suggested Locksmith price |
| ----------------- | ------------------------- |
| Basic             | $12 / month               |
| Shopify (Grow)    | $29 / month               |
| Advanced          | $99 / month               |
| Shopify Plus      | $199 / month              |

A free trial is available. (Always confirm current pricing on the Shopify App Store listing.)

***

### 10. User vocabulary translation

The phrasing customers and merchants use rarely matches Locksmith's official terms. This table maps common informal phrasings to the right concept — useful both for support staff and for Claude when answering questions.

| User says…                                             | Locksmith concept                                                                                                                                  |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| "password-protect a page / product"                    | A lock with a **passcode** key                                                                                                                     |
| "members-only" / "logged-in customers only"            | A lock with an **is signed in** key                                                                                                                |
| "wholesale customers only" / "trade only"              | A lock with an **is tagged with `wholesale`** key (or whatever your tag is)                                                                        |
| "VIP / exclusive access"                               | A lock with an **is tagged with…** key, often combined with **customer auto-tagging** elsewhere                                                    |
| "hide prices until login"                              | A lock with **manual locking** enabled and a **theme hiding profile** (Price preset on supported themes), paired with an **is signed in** key      |
| "hide the buy button" / "hide add-to-cart"             | Same as above, with the **Buy buttons** preset (or hiding definitions matching the buy-button section/block)                                       |
| "geo-block" / "region restriction" / "block country X" | A **shop lock** (or resource lock) with an **inverse** location key                                                                                |
| "country-specific catalog"                             | Multiple resource locks each with a location key                                                                                                   |
| "secret URL" / "private link"                          | A **secret link** key                                                                                                                              |
| "coming soon page" / "site under construction"         | A **shop lock** with whatever access rule you want for previewers                                                                                  |
| "drop at midnight" / "scheduled launch"                | A **schedule** (date/time) key                                                                                                                     |
| "buy this to unlock that"                              | A **has purchased…** key on the second product                                                                                                     |
| "free shipping over $X" — type cart logic              | A **has at least $X in their cart** key                                                                                                            |
| "newsletter signup wall"                               | A **Mailchimp** or **Klaviyo** key                                                                                                                 |
| "remove from Google" / "stop indexing this page"       | The **noindex** lock-level option                                                                                                                  |
| "hide from menu / collection / search"                 | The **hide from navigation** and **hide from product grids** lock options                                                                          |
| "I want to grant access via API / from another app"    | The **Admin API** for direct lock manipulation, or have the other app tag the Shopify customer record and use an **is tagged with** key            |
| "block bots at checkout"                               | **Checkout Validation** (separate from lock/key system)                                                                                            |
| "I deleted Locksmith and my products are still locked" | Locksmith was uninstalled without first using **Disable Locksmith** — theme code remains. Reinstall, then click Disable Locksmith, then uninstall. |

***

### 11. Quick troubleshooting reference

| Symptom                                                                      | Likely cause                                                                                                                                                                                      |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Lock not enforcing on Buy Button / wholesale channel / headless              | Locksmith only protects the **Online Store channel**                                                                                                                                              |
| Passcode prompt no longer appears                                            | Browser is caching prior unlock — test in incognito                                                                                                                                               |
| Location key inconsistent                                                    | IP geolocation imprecision, or VPN; clear cache + use incognito                                                                                                                                   |
| Customer keeps getting asked for newsletter email                            | They aren't signed in, so Locksmith can't remember them                                                                                                                                           |
| Customer sees a 404 at a locked resource                                     | Resource isn't published to the Online Store sales channel — Locksmith can't grant access to something Shopify isn't serving                                                                      |
| Analytics still shows traffic to a locked URL                                | Expected — the URL stays active, Locksmith just replaces the rendered content. Hits do not mean the content was seen.                                                                             |
| Whole storefront prompts for a single password before Locksmith ever appears | Shopify's native **storefront password protection** is enabled in Online Store preferences — Locksmith runs after that, not before. Disable the native feature if Locksmith is your access layer. |
| Products show "out of stock" or behave oddly after install                   | Theme code conflict — contact Lightward support                                                                                                                                                   |
| Locks still active after uninstall                                           | Theme code wasn't removed; reinstall → "Disable Locksmith" → uninstall                                                                                                                            |
| Admin can't reach pages                                                      | Admin caught by their own locks — disable the offending locks via the Locksmith app in the Shopify admin (see §8)                                                                                 |
| Manual lock with passcode doesn't prompt                                     | Manual locks need a trigger button in theme code                                                                                                                                                  |
| Errors when saving or installing at very high lock/key counts                | Likely hitting Shopify's theme file size limit — most stores can reach \~200 locks before this becomes a concern (see §8)                                                                         |
| Variant lock + passcode not working                                          | Default incompatibility — use a separate locked landing page for the passcode (see §8)                                                                                                            |

***

### 12. Support boundary

Lightward's support team is generally hands-on and willing to help. Based on Locksmith's documentation:

* **Things they're happy to help with:** lock and key configuration, theme installation troubleshooting, behavioral questions, adding manual-locking code to a theme "within reason," and answering documentation questions.
* **Things they explicitly don't take on:** writing or debugging Admin API requests for the merchant, building extensive custom edits to forms or theme code, and creating from-scratch custom Liquid keys.

When in doubt, the right move is to ask — Lightward's docs lean toward "get in touch and we'll see what we can do" rather than firm refusals.

***

*Sources: Locksmith official documentation (locksmith.guide, docs.uselocksmith.com), Shopify App Store listing, and Lightward's developer docs. Verify specifics — particularly pricing, the full list of key conditions, and any setting names — against the live docs before relying on them in customer-facing copy.*

*Last reviewed: June 2026.*


# Approving customer registrations

How to use the Locksmith app to approve customer registrations on your Shopify Online Store

You can use Locksmith to only grant access to your content to **registered customers that you approve**.

{% hint style="info" %}
**Note**: Locksmith does not create a separate account system or customer database, you'll be using the default customer accounts feature that comes with all Shopify stores. Before using this guide, you'll want to make sure that accounts are enabled on your Shopify store. [Learn more about customer accounts in Shopify.](https://help.shopify.com/en/manual/customers/customer-accounts)
{% endhint %}

## Step 1: Creating the lock

To get started with this, you'll want to first create the lock that covers the content that you want to restrict. Since Locksmith gives you flexibility to decide what content you want to lock, you can apply this restriction to your entire store, or just to specific pages or collections in your store. Our full guide on locks contains all the information you need to create your lock, including how to create a lock to cover your entire store:

{% content-ref url="/pages/M9JRoxsNMqxR7taTbDTe" %}
[Creating locks](/basics/creating-locks)
{% endcontent-ref %}

If you are choosing a more granular approach, you will need to create multiple locks that span the different products, collections, and pages that you want to lock.

## Step 2: Creating the key

Once the lock is created, you'll want to create the key next. When setting up an approval process, the simplest way to do it is to use the key condition labelled "**Permit if customer is tagged with...**". This means that only accounts that have the specific tag can gain access to the locked content. That will look like this:

<figure><img src="/files/qLrniUhRCJUi4EvsKcVr" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: You can use whatever tag you prefer here! Using **approved** here is just an example, but will be referred to in the rest of the guide.
{% endhint %}

Using customer tags to grant access is the easiest way to approve accounts. However, you can technically use any customer data to grant access. More information on that here:

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

## Step 3: Choosing how customer accounts are created

The above two steps outline how you use Locksmith to approve customer access to content. However, it's also important is to decide how the customer accounts are created to begin with.

You have some options:

1. Allow customers to create the accounts on their own
2. Create pre-approved customer accounts, and send email invitations.

### Option 1: Allow customers to register their own accounts, then approve as appropriate.

This would be considered the default way, and doesn't require any extra steps. Customers will simply register their accounts as normal, using your default registration form, and you can choose the ones you want to "let through" to your locked content. You'll simply [use Shopify's "Customers" area ](https://help.shopify.com/en/manual/customers/manage-customers#edit-a-customers-tags)to tag the customers appropriately.

#### If you need email alerts when customers sign up...

Shopify does NOT send registration notifications. If this is important to you try [this customer email alert task from Mechanic](https://tasks.mechanic.dev/customer-signup-email).

#### If you need to collect additional information from customers in your registration form...

{% content-ref url="/pages/aGfqo2XVdHpo4Z5mXBsa" %}
[Customizing the registration form](/tutorials/more/customizing-the-registration-form)
{% endcontent-ref %}

### Option 2: Create pre-approved customer accounts, and send email invitations.

If you already have the email addresses of those to whom you'd like to grant access, you can use Locksmith's customer import/creation tool to create their accounts. The customer import tool allows you to pre-tag any customer accounts that you create this way, so they'll automatically be granted access once they begin using your site.

A complete guide on the importing tools is here:

{% content-ref url="/pages/Ov4IPUuwI2SlEccDfxs4" %}
[Importing customers in bulk](/tutorials/more/importing-customers-in-bulk)
{% endcontent-ref %}

Beyond entering the customers' email addresses, make sure to use the "Customer tags" field and enter "**approved**" as the tag, so that all of the customers imported this way are tagged. There are also some other options worth taking a look at:

<figure><img src="/files/k2FRzgKzIFATqBzjXqhB" alt=""><figcaption></figcaption></figure>

#### Optional: Lock the registration page

If you are using [**Legacy Customer Accounts**](https://help.shopify.com/en/manual/customers/customer-accounts)**,** you also have the ability to place a lock on the registration form directly, so that customers cannot register their own accounts.

{% content-ref url="/pages/yutuUWRxV7hBIvI1sspy" %}
[Locking the customer registration form](/tutorials/more/locking-the-customer-registration-form)
{% endcontent-ref %}


# Creating restricted wholesale products

How to use the Locksmith app to restrict access to wholesale products or wholesale-only content in your Shopify Online Store

Locksmith allows you to restrict access to any content in your Online store, so it is a great solution for those wanting to add wholesale products that can only be purchased by **select customers**. Plus, Locksmith works with whatever Shopify plan you're on!

## Scenario 1: Selling wholesale and retail in the same store

You can set up your store so that both sides of your business are run out of the same shop.

This is done by creating price tiers in your store. This requires that you create two versions of each of your products in the backend. This can be achieved by either duplicating products, or by using variant tiers.

In-depth setup instructions for this can be found here:

{% content-ref url="/pages/iCvhp2NAQjezCM2Pj9GV" %}
[Setting up multiple price tiers](/tutorials/more/price-tiers)
{% endcontent-ref %}

## Scenario 2: Creating a wholesale-only store

If your store is going to *only* be used for wholesale, and you don't need multiple price tiers in the same store, your setup will be more simple.

You can simply create a lock that covers your entire store:

<figure><img src="/files/mpUayagDm8CTVaGQCORp" alt=""><figcaption></figcaption></figure>

For your key, you have options for how to grant access, but the recommended option here would be to simply use approved customer accounts:

{% content-ref url="/pages/JLN0jWFrcYvt6efxhMT0" %}
[Approving customer registrations](/tutorials/approving-customer-registrations)
{% endcontent-ref %}

Or, if you prefer not to use customer accounts, and want to grant access with a simple code, try passcodes:

{% content-ref url="/pages/QDnvLtkLiYqhX0WaiZJp" %}
[Passcode keys](/keys/passcode-keys)
{% endcontent-ref %}


# Hiding product prices and/or the add to cart button

How to use the Locksmith app to hide product prices and buy buttons on your Shopify Online Store

Locksmith can hide prices and buy buttons for locked products, so that customers can still browse your shop, but can only see prices and purchase products if certain conditions are met.

This is built into every lock's settings — no theme code required. Locksmith integrates directly with your theme's own price and buy-button code, so hiding follows the locked products wherever your theme displays them.

Here is an example of a product page that has been set up with Locksmith to hide prices:

![](/files/x9nflazetSKmyXDLTvqo)

Then, when the customer meets the conditions, the product pages will appear normally:

![](/files/084jC3YjqqNMUtTGxICx)

{% hint style="info" %}
**Note:** The results may look different depending on your Locksmith conditions, theme, or other settings.
{% endhint %}

Use the following two steps to set it all up:

## 1. Create a lock

The first step is to create a lock that covers the products that you would like to hide prices on. To do this, open up Locksmith and use the search bar on the main page of the app. If this is all of your products (most common), you can simply search for "all" and choose the "All Products" collection:

{% hint style="warning" %}
**Warning**: make sure to choose "Collection: All" and **not** "Collections Listing"
{% endhint %}

If you are only wanting to apply price hiding to some of your products, you can instead create a lock on different collection(s) or products that you want prices hidden for.

Once you've created the lock, you'll choose the conditions for access. Many merchants use the "Permit if customer is tagged with..." key condition, which lets you manually approve accounts for price access by adding a customer tag:

That's the most common way to set it up, but you have the freedom to choose whatever key conditions work for your setup.

## 2. Turn on hiding

In the lock editor, find the **Price & add-to-cart hiding** card, just below your keys. It has two settings:

* **Hide buy buttons** — hides the add-to-cart button, dynamic checkout buttons (like "Buy it now"), and quantity selectors for the locked products. This is what keeps locked products out of the cart.
* **Hide price** — hides the locked products' prices.

When you turn either setting on, Locksmith scans your published theme to find the places where it can integrate, and shows you a compatibility result for each setting. Save your lock, and Locksmith updates your theme automatically — and re-checks your theme every time it installs from then on, so theme updates are picked up on their own.

Where the buy buttons were, your visitors will see your lock's message content instead (a "Log in to purchase" button, a passcode prompt, or whatever fits your key conditions) — styled to match your theme.

## What gets hidden

Wherever your theme renders the locked products through its own templates: the product page, collection and search grids, featured-product sections, and quick-view popups. Unlocked products are never affected — hiding follows the locked products individually.

## Good to know

{% hint style="warning" %}
**Hiding prices without hiding buy buttons?** Prices always appear in the cart and at checkout — Shopify doesn't provide a way to hide them there. If you're hiding prices, we recommend hiding buy buttons too, so locked products can't reach the cart in the first place. The app will remind you about this combination.
{% endhint %}

{% hint style="warning" %}
While Locksmith hides the price visually, it may still be possible for someone viewing the page source (or using the browser console) to find it. This is because of things like SEO markup and analytics tools, which reproduce the price in the source — but not visually on the page — for their own usage.
{% endhint %}

{% hint style="info" %}
Prices displayed by **third-party apps** (page builders, currency converters, wishlist apps, and so on) render outside your theme's own code, so they aren't hidden automatically — but Locksmith support may still be able to help with these. Feel free to reach out.
{% endhint %}

{% hint style="info" %}
If your theme already contains **hand-written Locksmith code** (from the manual methods below), the automatic settings may not work well alongside it — the app will show a warning if it detects this. Write to us if you'd like help transitioning.
{% endhint %}

## If your theme shows "Incompatible"

Every theme is different, and occasionally Locksmith won't find a spot it can safely integrate with. If that happens, the app will say so rather than guessing — and this is exactly the kind of thing our support team is here for. [Write to us](/policies/contact) and we'll work with you to get your theme set up.

## Advanced: adjusting what Locksmith found

The scan's results are visible — and editable — on your theme's hiding profile page (**Themes → your theme → hiding profile**). Each automatic definition can be adjusted (its Liquid variable, whether it shows your replacement message), removed, or restored, and there's a reset if you'd like to return to the theme defaults. Your edits survive re-scans.

## Manual setup

The rest of this guide shows how to set up price hiding manually in your theme, using Locksmith's [manual mode](/tutorials/more/manual-mode) feature — an approach that can still be useful for special cases.

### Enable manual mode

Before saving your lock, turn on "Enable manual mode" right there in the lock (Clicking "Advanced" will show the option):

![](/files/L33CMyVWdNraB7AKCITV)

### Updating your theme for manual locking

You'll now need to let Locksmith know which parts of the page should be hidden. There are two methods to handling this:<br>

### Theme hiding profiles:

This method allows you define sections, blocks, or snippets which Locksmith will hide based on locks that have the Manual Locking option enabled.

This method shouldn't require any coding in your theme, *if* your theme is fully compatible. (Most modern themes are.) This is a newer feature, and we recommend trying this method first.

Here's a complete guide to setting this up:

{% embed url="<https://www.locksmith.guide/tutorials/more/how-to-hide-theme-sections-blocks-and-snippets>" %}
Theme hiding profiles: Hide prices without coding.
{% endembed %}

### Using manual locking code in your theme:

**Because each theme is a bit different, adding manual locking code will require manually editing your theme to hide your pricing or add to cart buttons.**

**If you install a new theme down the road, these changes will need to be re-applied.** Try the the Theme Hiding Profiles method first (outlined above), to avoid these limitations.

The rest of this guide gets a bit technical, we'll happily to the coding portion for you! If you've already created the lock described in step 1, simply write us a message at **<team@uselocksmith.com>** to request help.

{% hint style="danger" %}
**Note:** Locksmith's manual locking feature generally can ***not*** hide elements or sections that are being managed or displayed by other third-party apps, including page builder apps.\
\
Manual locking is only compatible with full-page locks, and is ***not*** compatible with variant locks.
{% endhint %}

If you are a developer type, and prefer to do the coding portion yourself, read on...\
\
You'll need to start by locating the places in your theme that show the price. Here are some examples of files that you might find the price in:

* snippets/product-card-grid.liquid
* templates/product.liquid
* snippets/product-card-list.liquid
* snippets/product-price.liquid

Each theme is very different, so those are simply examples. You'll need to go to each of the files that display price, and do the following steps:

1. Open up the Liquid file, and add this to the very top of the file:

   <pre class="language-liquid" data-overflow="wrap"><code class="lang-liquid">

   </code></pre>
2. Find the code you want to hide from unauthorized viewers, and wrap it with:

   <pre class="language-liquid" data-overflow="wrap"><code class="lang-liquid">

     &#x3C;!-- your price code here -->



   </code></pre>
3. To hide prices, you'll be looking for elements like:

   ```liquid
   {{ product.price }}
   ```

   ... or:

   ```
   {{ item.price }}
   ```

   **Example:**

   <img src="https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859c04286364bc9436f7/5e27859cb1aeb.png" alt="" data-size="original">

   This shows Locksmith manual locking code wrapping an entire price section, which I've highlighted.
4. Save!

Remember, those 4 steps need to be done for each file that display the price.

{% hint style="info" %}
In many cases, the above code only needs to be added to two or three files. Whichever file is in charge of displaying the price on **product** pages, **collection** pages, and **searches**. The latter two are oftentimes the same.
{% endhint %}

### Configuring Locksmith to hide the add-to-cart button only <a href="#hide-add-to-cart" id="hide-add-to-cart"></a>

You can still restrict purchasing products, while leaving the product details visible to the customer. This also a good option for those wanting to make sure that products are **available for search engines to index**.

**As a reminder**, we can help guide you through this process, including adding the code, so don't hesitate to get in touch.

Step 1 is exactly the same, but the code you add in step 2 will be slightly different.

Find the product-template or product-form file in your theme, and locate the code that generates the "add-to-cart" button. This is different for all themes, so it won't be possible to give you an exact location for this. Then, add the code that you want to render, inside of a Liquid "else" statement. For example:

{% code overflow="wrap" %}

```liquid
{% capture var %}{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject: product %}{% endcapture %}{% if var == 'true' %}{% assign locksmith_access_granted = true %}{% else %}{% assign locksmith_access_granted = false %}{% endif %}

{% if locksmith_access_granted %}
  <button type="submit">
    Add to cart button example
  </button>
{% else %}
  <p><strong>Product not available</strong></p>
{% endif %}
```

{% endcode %}

This results in the add-to-cart button being replaced, in cases where the customer doesn't have access. What is shown depends on what is added above. Just make sure your key conditions on the lock match the conditions that you want your customers to meet before being able to purchase.

#### For stores using Shopify's [legacy customer account system](https://help.shopify.com/en/manual/customers/customer-accounts/legacy-customer-accounts) (formerly "Classic customer accounts"):

If you need to render a "Login to purchase" button, use the following code (the button classes may need to be edited). This button includes a redirect to return customers after login:

{% code overflow="wrap" %}

```html
<a href="/account/login?return_url={{ request.path }}" class="btn button button button--full-width button--secondary">Log in to purchase</a>
```

{% endcode %}

#### For stores using Shopify's [customer account](https://help.shopify.com/en/manual/customers/customer-accounts/new-customer-accounts) system (formerly "New customer accounts":

If you need to render a "Login to purchase" button, use the following code (the button classes may need to be edited). This button will return customers after login:

{% code overflow="wrap" %}

```html
<a href="/customer_authentication/login?locale={{ request.locale.iso_code }}&return_to={{ request.path | url_encode }}" class="btn button button--full-width button--secondary">Log in to purchase</a>
```

{% endcode %}

#### For locks using passcode keys:

If you need to render a passcode prompt button, use the following code (the button classes may need to be edited):

{% code overflow="wrap" %}

```html
<button class="locksmith-manual-trigger btn button">Enter passcode to purchase</button>
```

{% endcode %}

#### For locks using location keys:

You can add an access denied message of location keys by adding paragraph tags and some text within the Liquid "else" statement, for example:

```html
<p><strong>Product not available in your country.</strong></p>
```

#### When using the "is tagged with..." key condition you can display a "Login to purchase" button *or* an access denied message depending on a visitors access:

<details>

<summary>Click here for an example</summary>

The following example includes an "else" statement that will:

* display an access denied message to customers who *are* signed in and *don't* have access to the lock.
* or a "Login to purchase" button for customers who aren't signed in.

```


  <button type="submit">
    Add to cart button example
  </button>


  
  

    <p style="font-weight: bold; padding-top:20px; padding-bottom:20px;">You do not have access to this resource.</p>

      <a style="width: 100%;" href="/customer_identity/sso_hint" class="btn button" data-locksmith>Log in to purchase</a>

  

```

**Note:** The above example uses a "Login to purchase" button for Shopify's [standard customer accounts](#for-stores-using-shopifys-customer-account-system-formerly-new-customer-accounts) system.

</details>

### Here are some visual examples of the result

#### Requiring, a sign-in:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/600d05382e764327f87c1b63/file-5T8frc6HsP.png)

#### **A passcode:**

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/600d056e1c64ad47e4b724f8/Screen-Shot-2021-01-23-at-10.17.02-PM.png)

#### **A country-specific visitor:**

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/600d05bf1c64ad47e4b724f9/file-tT77eLbVWn.png)

{% hint style="warning" %}
Please note: since the custom liquid code is added manually to the store theme, anytime you switch to a ***new*** or ***updated*** theme the custom code has to be manually added again to the new theme. We're always happy to add code to new or updated themes if you write into [team@uselocksmith.com](/policies/contact)\
\
We recommend leaving the new theme *unpublished* while you wait for the code to be added, so that nothing is exposed in the meantime. :)
{% endhint %}

{% hint style="info" %}
If Locksmith's custom manual locking code is added to an ***unpublished*** theme, please be sure to visit our guide below for instructions on testing:\
\
[Testing Locksmith on unpublished themes](/tutorials/more/testing-locksmith-on-unpublished-themes)
{% endhint %}


# Selling digital content on Shopify

How to use the Locksmith app to sell digital content on Shopify

If you have special content that you want to monetize, and it **lives in your Shopify store**, Locksmith allows you to sell access to it via in-store purchases.

{% hint style="info" %}
**Note**: Selling digital content on Shopify might mean different things for different merchants. If you are simply wanting to sell *digital files that are sent to customers via email*, [see Shopify's guide on this here](https://help.shopify.com/en/manual/products/digital-service-product/selling-services-or-digital-products).
{% endhint %}

## **Step 1: Create your restricted content**

Common choices for this are to add your restricted content to one of the following:

* [Shopify's built-in blogging engine for your store](https://help.shopify.com/en/manual/online-store/blogs). Keep in mind that you are not restricted to a single blog, so you can have a general access blog for your site news, etc, and still use a restricted blog for your digital content.
* [Pages - Shopify's built in webpages for your store](https://help.shopify.com/en/manual/online-store/themes/theme-structure/pages).
* Product page - You can build custom product templates that also house your restricted content and combine it with [Locksmith's manual locking](/keys/more/manual-mode), so that the restricted portion only reveals itself *after the product has been purchased*. This option has a less straightforward setup, but is still available if desired. If this is you, the best place to start is by contacting us via email at **<team@uselocksmith.com>**.

Again, for best results, your content should live in your online store. However, there are some other options that might apply to you:

#### Secure file viewing or downloading

This requires another provider, and we recommend Dropbox: [Get started with this on Dropbox' website](https://help.dropbox.com/files-folders/share/set-link-permissions).

#### Secure video viewing

You can embed the videos to be viewed just like any of your other content. However, if you want to secure this process, you'll need to enlist the help of a third party video viewing service. We recommend private and unlisted videos on Vimeo, but keep in mind that making your videos private/unlisted on Vimeo **requires a paid Vimeo plan**! [Get started with this on Vimeo's website](https://vimeo.zendesk.com/hc/en-us/articles/224817847-Manage-your-video-s-privacy-settings).

#### **Other general content that doesn't live in Shopify**

If your content must live elsewhere, consider using iframes to embed your content into a Shopify page, which you can then lock. This is more of an *advanced technique* and would require someone familiar with code. Locksmith support won't be able to code this kind of thing for you. This is also **less secure** because the original source of the iframe can't be locked by Locksmith.

####

## Step 2: Create your "access product"

### Requiring a simple one time purchase

You'll need to have at least one product that is clearly marked as the product that customers will purchase, in order to gain access to the locked content. Something like this:

![](/files/AafScuQbklOSOMJzxFYB)

### Requiring a recurring subscription charge for access

You'll need to **use a third party app** to set up the subscription service. We recommend ReCharge or PayWhirl, and we have in-depth guides for those here:

{% embed url="<https://www.locksmith.guide/tutorials/more/recharge>" %}

{% embed url="<https://www.locksmith.guide/tutorials/more/use-locksmith-and-paywhirl-together-to-grant-access-based-on-subscriptions>" %}

## Step 3: Setting up the lock

[Create a lock](/basics/creating-locks) on your subscription product (the one created in the previous step). For your key, use the condition labelled **"has purchased...**" to create a key condition that permits access if the customer has purchased the appropriate product:

<figure><img src="/files/Ngwi2RLnhaxkzrjMYHLI" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: You can also specify a time window, using the option labelled "*Only look for orders in the last...*". With this, you could require - for example - that the customer has made the purchase within the last 365 days. This is a good way to limit the access period time, but you should still [use a recurring subscription app](#requiring-a-recurring-subscription-charge-for-access) if you want an automatically recurring charge.
{% endhint %}

## Step 4: Making sure your customers are signed in when purchasing your "access product"

In order for Locksmith to register that a customer has actually purchased your "access product", it is important that you require that customers are actually signed in when the purchase is made.

You can do that with either of the following ways:

**Make customer accounts required for your entire store**: This means that everyone must be signed into your store when they check out. [More information from Shopify on doing this](https://help.shopify.com/en/manual/checkout-settings/customer-accounts#set-your-customer-account-preferences). This might be considered overkill for some merchants, so if that's the case, use the next option.

**Use Locksmith to require that a customer is signed in when purchasing your "access product"**: Pretty simple - just add a lock directly to the "access product" and use "Permit if customer is signed in" as the key condition. You can [edit the locked landing page for this product](/tutorials/more/customizing-messages) by editing the "Guest message content" message to let the customer know that they need to sign in before access. Or, if you prefer, you can even [employ manual locking](/tutorials/hiding-prices) if you just want to hide the add-to-cart button instead of the whole page.

## Optional: Directing customers to your content after purchase

You may wish to direct customers to the content that they just purchased.

### ... 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 select "**Customer notifications**" and click the link for "**Order confirmation**". To edit the code for this email, you'll need to click the "**Edit code**" button in the top right of the page. Insert this code and adjust as needed:

```
{% 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" %}
    <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.<br>

## Use Case: Defer access to the restricted product until some time after the required product is purchased.

Let's say you want to grant access based on the purchase, but not immediately. You can grant access later using two conditions in your key.\
\
For example, this key will grant access 12 weeks (84 days) after the purchase of the Starter Pack:

<figure><img src="/files/NmreSwxVoIozDlzZODzu" alt=""><figcaption></figcaption></figure>

Notice the "unless" in the first condition. That's the result of using the [invert](/keys/more/inverting-conditions-in-locksmith) option. :)


# More tutorials...

Check the following or simply use the search bar in the header to quickly find the topic that you're looking for!


# Setting up multiple price tiers

How to use the Locksmith app set up restricted prices levels on your Shopify Online Store

Many, many merchants use Locksmith for managing different price levels **within the same store.**

Frequently, this means *wholesale and retail*. We'll use those terms in the rest of this article, but feel free to substitute them for whatever applies to your situation - for example:

* Members vs Non-members
* EU customers Vs. Non-EU customers

...or any other situations that require price tiers.

## **Customer management**

Before setting up your product tiers, you'll need to decide how you want your customers to gain access to the separate tiers. The most common way to do this is to use approved customer registrations. More information on setting this up here:

{% content-ref url="/pages/JLN0jWFrcYvt6efxhMT0" %}
[Approving customer registrations](/tutorials/approving-customer-registrations)
{% endcontent-ref %}

So in this case, you would use customer tags to denote the customer tiers. So, for example, customers with the "wholesale" customer tag are considered wholesale customers, while customers without the "wholesale" tag are regular/retail customers.

## **Deciding between product duplicates or variants**

Using Locksmith to sell products at two different prices levels means that **your products need to be duplicated in some way**. This can be achieved using either product duplicates *or* by using variant tiers.

Keep in mind that Locksmith itself does not create these alternate versions. No matter which one you choose, the work to duplicate the products will be done on your end.

### [**Using Product duplicates**](#using-product-duplicates)

**Pros** -

* Allows you to have distinct sections in your store that are dedicated to different types of customers.
* A straightforward approach

**Cons** -

* Introduces [collection filtering issues](/faqs/faq-i-see-blank-spaces-in-my-collections-and-or-searches-when-locking).

### [**Using variant tiers**](#using-variants)

**Pros** -

* Uses the same products, collections, and navigation menus
* Avoids [collection filtering issues](/faqs/faq-i-see-blank-spaces-in-my-collections-and-or-searches-when-locking)!

**Cons** -

* This is not a good option if your products already have many variants. Adding a price tier variant essentially doubles the number of product variants that each product has. The Shopify-wide **maximum** number of variants per product is 100.
* Can be seen as more complicated since managing individual variants is less straightforward than managing products.
* Variant locks are **not** compatible with [passcode keys](/keys/passcode-keys).

## Option 1 - Using product duplicates <a href="#using-product-duplicates" id="using-product-duplicates"></a>

### Basic steps:

1. Use your Shopify admin area to create duplicate versions of every single one of your products that will be sold at more than one price.
2. Once your product duplicates are created, create a collection of wholesale-only products - no mixing in other products from other parts of your store! Don't forget you can use[ Shopify's automated collection feature here](https://help.shopify.com/en/manual/products/collections/automated-collections).
3. Next, use Locksmith to [create a lock](/basics/creating-locks) on your wholesale collection. This lock will cover all of the products in that collection.
4. On the next screen, use the "Keys" section to create a key that corresponds to [the method of access that you decided on earlier](#customer-management).

That's it for the basic setup! There are some optional steps below\...

### Optional: Locking your retail products

You may want to consider also adding a lock to your retail products, so that wholesale customers don't get confused after they sign in. We'll use a new lock with the opposite condition, to make sure that the customer can only view your retail products if they're *not* approved.

**To add a corresponding lock to your retail products**, following these steps:

1. Create a collection that covers all of your non-wholesale products.
2. [Create a lock](/basics/creating-locks) on this new collection: search for it by name in the Locksmith app
3. On the next screen, use the "Keys" section to create that has the [exact inverse condition of the key you created above](/keys/more/inverting-conditions-in-locksmith).

That's it! Your wholesalers will now be prevented from seeing retail products once they're logged in. (Note: this trick doesn't prevent the wholesaler from arriving at your shop as a guest, adding retail products to the cart, *then* logging in to their wholesale account!)

### **Optional: Pointing your wholesale customers to your wholesale collection**

Now that you have a wholesale collection set up, you will want give your wholesale customers a way to find their content. You can do this by adding a "Wholesale" link to your navigation menu, that points directly to the Wholesale collection. This link will be visible to everyone, but once it's clicked, Locksmith will ask for access credentials.

Locksmith will automatically use the login template and style from your theme. The message is easily customizable:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

### Optional: Hiding wholesale product prices

If you prefer to **leave your wholesale offerings open to the public**, but still want to hide the prices, this is also possible!

This requires a few more steps, and we have a guide that covers that kind of thing here:

{% content-ref url="/pages/eHG9k5snoahy4lKbaR7b" %}
[Hiding product prices and/or the add to cart button](/tutorials/hiding-prices)
{% endcontent-ref %}

## Option 2 - Using variant tiers <a href="#using-variants" id="using-variants"></a>

To create price tiers using product variants, you'll need to use your Shopify admin area to **create an "Audience" option** *on each of your products that you want to add tiers to:*

<figure><img src="/files/Au68fp9X34UJSstwg0NH" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: You can use whatever Option or value names you prefer! Just make sure that you *use consistent naming* on each of your products. This will make creating the locks easier. If you have a large number of products, we recommend that you use the [export/import CSV method.](https://help.shopify.com/en/manual/products/import-export)
{% endhint %}

Next, **create a variant lock in the Locksmith app**:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/623f9cf4c1688a6d26a79d99/file-NA1ytkqrFL.png)

**Create a key**. If you are using customer tags to grant access, that will look like this:

<figure><img src="/files/wXRLuN2iJofRICSTIlr5" alt=""><figcaption></figcaption></figure>

Additionally, **create a corresponding lock for the retail variant**. You should end up with two locks:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/623f9eea2ce7ed0fb0919f63/file-qZ4NUAbzkJ.png)

## Inventory

Managing inventory across multiple price tiers is a very common concern

**Separate inventory for each tier**

Some merchants love the ability to set inventory separately for wholesale and retail customers. If that is you, then you're already good to go, no matter which option you have chosen, since each product and variant has separate inventory.

**Same inventory across tiers**

If you have more retail purchases than wholesale, one option is to let Shopify track the retail products, and manually update your retail inventory when you receive a wholesale order.

If you absolutely need to sync inventory across your products or variants, you'll need to get another app involved. Namely, [the Mechanic app](https://apps.shopify.com/mechanic)! This app is made by the same folks here at Locksmith. It offers several automation "tasks" for syncing inventory levels:

* [Sync inventory for shared SKUs](https://usemechanic.com/task/sync-inventory-for-shared-skus)
* [Sync inventory across product variants](https://usemechanic.com/task/sync-inventory-across-product-variants)

{% hint style="info" %}
**Note**: if you are concerned about incurring a lot of extra cost by adding another app for managing inventory, both Locksmith and Mechanic have a "Pay what feels good" pricing policy. So, we're confidant that we can get you at a price that feels good while using both apps. [See the policy here](/policies/pricing).
{% endhint %}


# Customizing messages

Most of the messages that Locksmith shows to your customers on the front end of your store are completely customizable!

You can edit the text itself as much as you need, plus you can add code, just like you would a template in your theme. That means you can use the following:

* HTML
* CSS (via the \<style> tag)
* Javascript (via the \<script> tag)
* Liquid ([Shopify's template language for themes](https://shopify.dev/docs/themes/liquid/reference/basics))

{% hint style="info" %}
If you are wanting to add translations to your messages, [check out our dedicated guide on that here](/tutorials/more/adding-translations-to-your-locksmith-messages).
{% endhint %}

In general, your messages can be edited in two places...

## Lock-specific messages:

\
To customize your messages for one lock only, go to the lock page and scroll down to the "Messages" area.

<figure><img src="/files/en2voiFTP5HZlaCzMQIN" alt=""><figcaption></figcaption></figure>

## Default messages:

You can also customize the default messages, which will be used for all applicable locks when a lock-specific message is not present. To edit these, head over to the "Content" area of the "Settings" page:

<figure><img src="/files/YolPkWBioE4W5fG7JGWD" alt=""><figcaption></figcaption></figure>

\
Messages that [require a customer account](/keys/customer-account-keys):
------------------------------------------------------------------------

\
Locksmith will only show the type of messages in the "Messages" area that apply to the key conditions you've selected in your lock(s). Most of the key conditions in Locksmith use customer data, and therefore require a sign in. In these cases, Locksmith will show you the following two editable messages:

* **Guest message content**: shown to customers that are not yet signed in.
* **Access denied content**: shown to customers that are signed in, but don't meet the requirements for the lock (e.g. don't have the specific customer tag that is required for access, if applicable)

\
Passcode and newsletter key conditions:
---------------------------------------

\
There are two other types of messages that will show up if you have selected the applicable key conditions:

* **Passcode prompt**: for ['passcode' conditions](/keys/passcode-keys) only.
* **Newsletter prompt**: for [Mailchimp and Klaviyo conditions](/keys/more/newsletter-keys) only.

\
These conditions both show a special prompt to the customer, asking for their submission before continuing. You can customize the message in the same places as outlined above.

#### Condition-specific messages

For merchants that have multiple passcode or newsletter conditions *in one lock*, you can customize the messages at the condition level. This is done inside the condition popover in the input labelled "Custom input prompt, as shown below.

**In most cases, you won't need to set the prompt at the condition level - simply use the lock level messages, as shown above - this is a convenience feature for when it's needed**.

<figure><img src="/files/5MmtRp0Aj5lSS6EJ3WHe" alt=""><figcaption></figcaption></figure>

**Important**: If a message is set at this level, it will override any messages set at the other levels. If this is the case, you'll see a warning, just to let you know what's going on:

<figure><img src="/files/U45DWPM17a1anukvrnSX" alt=""><figcaption></figcaption></figure>

## Customizing the Continue button and loading message

Additionally, you can customize the submit buttons and loading text. To do this, head over to your theme's "Edit default theme content" settings:

![](/files/p7kHuYHQsxhYiIZc6WeO)

... and open the "Locksmith" tab:

![](/files/HcGFX9ZYCbvL884cMOUG)

Locksmith will use the values you customize here when displaying content to your visitors.<br>

***

While we cannot make extensive custom edits to your form for you, if you have any questions you can contact us via email at **<team@uselocksmith.com>**

## Related articles:

{% content-ref url="/pages/xbxhHadjI7Iip4aWc2rq" %}
[Customizing the customer login page](/tutorials/more/customizing-the-customer-login-page)
{% endcontent-ref %}

{% content-ref url="/pages/EetOspcpGCRq9p3wY9Fi" %}
[Customizing the passcode form](/tutorials/more/customizing-the-passcode-form)
{% endcontent-ref %}

{% content-ref url="/pages/9OqKmRBcX77ody3p6kr5" %}
[Customizing the email list signup form](/tutorials/more/customizing-the-email-list-signup-form)
{% endcontent-ref %}

{% content-ref url="/pages/aGfqo2XVdHpo4Z5mXBsa" %}
[Customizing the registration form](/tutorials/more/customizing-the-registration-form)
{% endcontent-ref %}

{% content-ref url="/pages/aP8lIk1Bb966HCf6shyh" %}
[Adding translations to your Locksmith messages](/tutorials/more/adding-translations-to-your-locksmith-messages)
{% endcontent-ref %}

{% content-ref url="/pages/YtpR0xAXeb47E9sEPG1d" %}
[How do I add a hero banner image to Locksmith's access messages](/faqs/more/how-do-i-add-a-hero-banner-image-to-locksmiths-access-messages)
{% endcontent-ref %}


# Customizing the customer login page

Customizing the login form shown on a page locked by Locksmith in your Shopify Online Shop

{% hint style="warning" %}
If you are using Shopify's [new customer account system](https://help.shopify.com/en/manual/customers/customer-accounts/new-customer-accounts), the login form comes directly from Shopify (as opposed to coming from the theme) so editing the login form is **not possible**. However, using this guide, you can still edit Locksmith's landing page (which links to the login form).
{% endhint %}

Whenever you use Locksmith to require your visitors to log in with their customer account, Locksmith will automatically pull in your theme's customer login form, with a message of your choosing added just above it.

You can customize the message in two places:

* Using the sidebar navigation, go to **Settings > Messages > Guest message content**. This is where you can edit the default message that is applied to all locks.
* **On the lock page, find Messages > Guest message content**. This is where you can edit the lock-specific message, which overrides the default.

```
<p><strong>This content is protected</strong> - please log in with your customer account to continue.</p>
```

You can customize this message using as much HTML, CSS, and Liquid as you need!

Also, keep in mind that the "Guest message content" only applies to pages locked by keys that actually require a login. If your lock does not require a login, you may need to edit one of the other fields under "Lock Messages".

There are many ways to customize this page which the rest of this guide will cover!

## 1. Customizing the login form itself

Since Locksmith is just grabbing the login template directly from your theme, you'll need to head into your theme to edit it. Shopify has [a guide dedicated to doing this here](https://shopify.dev/docs/storefronts/themes/architecture/templates/customers-login) ***(please note: this is for Legacy customer accounts only )***. Using that guide you can do things like remove the "Register" link from your login form or edit the styling in other ways.\
\
If you have a theme from a third-party developer, feel free to contact them for more personalized guidance on your specific theme's login template.

{% hint style="warning" %}
**Important:** Anytime you edit the login template in your theme, you'll want to make sure that Locksmith is using the updated version of it. To do this, go to the Help area within the Locksmith app and press the "Update Locksmith" button there.
{% endhint %}

## 2. Adding the registration form to this page

Easy! Just add the following into the "Guest message content" area.

```
{{ locksmith_customer_register_form }}
```

Once again, this is just grabbing the registration page from your theme. If you've edited your registration template and you aren't seeing it updated here, head to the "Help" area within the Locksmith app and press the "Update Locksmith" button to see the latest version on your lock page.

## 3. Editing the placement of the login form in relation to your lock message

By default, the "Guest message content" is displayed in its entirety as the first thing on the page (after the header) followed by the login form. You have the ability to change this: display the message after the login form, or perhaps add content before *and* after the login form. To do this, use the following in your "Guest message content" area:

```
{{ locksmith_customer_login_form }}
```

This will determine the placement of your login form and you're then free to add any content before/after it.

## 4. Remove the login form from the page entirely, or prevent Locksmith from adding it's version of your login form.

If you don't want your customers to see the login form on this page for whatever reason, you can remove it by just adding this to your "Guest message content":

```
{% comment %}
  {{ locksmith_customer_login_form }}
{% endcomment %}
```

You can then add the rest of your message alongside that code.

{% hint style="info" %}
This method is necessary when adding your own custom html form to the Guest Message Content field. Otherwise, you may see two login forms on the lock page.
{% endhint %}

## 5. The Locksmith message isn't visible on the locked page, or its partially hidden

If the message is nowhere to be seen, it's probably just hidden under your header. Some themes don't add padding directly to the header and rely on the template to have its own padding. Since Locksmith replaces the template's code with its own content, it may be necessary to add the padding to it. This is usually as easy as adding this to the beginning of your "Guest message content":

```
<p style="padding-top: 150px"></p>
```

Of course, you can adjust the number as needed.

As always, feel free to contact us at **<team@uselocksmith.com>** if you need help with this.

## 6. Centering the message on the lock page

To get the text on this page centered, change the beginning \<p> tag to the following:

```
<p style="text-align: center">
```

If you've removed the beginning \<p> tag, just add a new one :) And, of course, make sure to close it with \</p> at the end of your text.

## 7. Including other form types

If you have multiple key condition types on the same lock, it might be useful to include other form types within the prompt, so that they display on the same page. We have a guide on doing this here:

{% content-ref url="/pages/ThvKsaJtKXtdZ5y5612d" %}
[Showing multiple prompts on the same page](/tutorials/more/showing-multiple-prompts-on-the-same-page)
{% endcontent-ref %}

## 8. Placing the lock message within the login form itself

There are a few reasons you might want this. For example, if your login form is preceded by a heading or some breadcrumbs, you may want to insert the Locksmith-specific message beneath the heading, but above the email and password fields.

*This gets a bit technical, so if you need a hand, just hit that message button in the lower-right corner! :)*

To customize where your guest content message appears, open up the code editor for your Shopify theme ( [here's how!](https://help.shopify.com/themes/customization#view-the-edit-code-page)), and open the file **templates/customers/login.liquid**. You might see something like this:

```
<h1>Login</h1><br><br>{% form 'customer_login' %}<br>  {{ form.errors | default_errors }}

  <label for="customer_email">Email Address</label>
  <input type="email" name="customer[email]">
  <label for="customer_password">Password</label>
  <input type="password" name="customer[password]">
  <input type="submit" value="Sign In">
{% endform %}
```

Add the code `<!-- locksmith-message -->` wherever you'd like your guest message to appear, like so:

```
<h1>Login</h1>

<!-- locksmith-message -->

{% form 'customer_login' %}
  {{ form.errors | default_errors }}


  <label for="customer_email">Email Address</label>
  <input type="email" name="customer[email]">
  <label for="customer_password">Password</label>
  <input type="password" name="customer[password]">
  <input type="submit" value="Sign In">
{% endform %}
```

Next, head to the "Settings" tab of your Locksmith account, and scroll down to the "Guest message content" field. Use a value like the example below to (a) customize your guest message, and (b) have Locksmith display your login template with your custom message injected into it:

```
{% capture locksmith_message %}<br>  <p>Please login below! :)</p><br>{% endcapture %}<br><br>{{ locksmith_customer_login_form | replace: '<!-- locksmith-message -->', locksmith_message }}
```

That's it! :D You've just customized the login form's display using pure Liquid - congratulations, and feel free to experiment until the result is just right for your shop. :)

## Something else not covered here?

Let us know by emailing us at: **<team@uselocksmith.com>**


# Customizing the registration form

First thing to know is that Locksmith uses the [built in customer account system that comes with your store](https://help.shopify.com/manual/customers/customer-accounts)! This means it doesn't create a separate registration form, sign-in form, or customer database.

{% hint style="danger" %}
Important: This guide applies only to **Legacy** Customer Accounts.

Shopify’s New Customer Accounts don’t use a traditional registration page — an account is created automatically when someone signs in. Because of this, the registration form can’t be locked or customized in the same way.

If your store is using **New** Customer Accounts, we recommend using customer tags to approve or review new customers after their account is created instead.
{% endhint %}

All Shopify themes come with a registration form that includes Name, E-mail, and Password fields.

Many merchants want to collect more information from a customer when they register. Although **Locksmith doesn't get involved directly with this process**, you do have options here.

### 1. Simply request that your customers e-mail you the information

This is a simple solution to the issue and does work for some merchants. Use the Locksmith access-denied "Messages" area, which you can customize in the app, to let your customers know the contact email.

### 2. Use a dedicated Shopify app

[The Customer Fields app](https://app.customerfields.com/billing/referral?code=LOCKSMITH) lets you create unique registration forms and add fields in an easy way. You can enable account approval, auto-tag customers, and receive email notifications when customers create or update their accounts. The Customer Fields app is not created by us, but we have had merchants have a lot of success with it!

#### Pros:

* Extremely easy to set up
* Install forms nearly anywhere on your storefront (no coding required)
* Choose whether to automatically create customer accounts in Shopify or require admin approval before an account is created
* Create unique forms for different customer groups, or use conditional logic to show/hide fields for different users on one form
* You can get notified by e-mail when the form is filled out!
* Plenty of other features

#### Cons:

* It is, naturally, a paid app

### 3. Use a third party form-creating service

If you just need to collect information, and don't need to automatically do anything with it, it is always an option to use Google forms, Wufoo, or other online forms. There are some other great services out there that let you create a fully customized HTML form.

#### Pros:

* Free
* Can be used to create a **second registration** to be used by *some* of your customers while leaving your regular registration form alone. (These accounts will still be funneled back to the same customer database.)
* You can get notified by e-mail when the form is filled out!

#### Cons:

* The accounts are not automatically created which means you'll need to manually move the information over to Shopify from the third party app

### Legacy Option 4: Edit the registration form in your theme directly

If you are using Shopify's Legacy account system with a Legacy theme, your theme will have a built-in registration form which you can edit as needed. Shopify has a guide that will walk you through doing this. You can [view that here](https://shopify.dev/docs/storefronts/themes/architecture/templates/customers-register).

#### Pros:

* Editing your own theme is free

#### Cons:

* Requires coding knowledge. (But, If you don't have coding knowledge, you can still [hire an expert](https://experts.shopify.com/)!)
* Extra fields in the registration form end up as customer "notes". Saving unique customer data to the customer note doesn’t allow much flexibility for using that data, or segmenting customers accordingly.
* Changes the registration form for *everyone* which means that your different types of customers(I.e. wholesale and retail, if applicable) would be using the same registration form. You can still make the form usable for everyone by making the extra fields optional.
* There is **not** an option to get notified when customers register.


# Customizing the passcode form

Locksmith gives you flexibility in how you can customize the passcode form!

Here are some of the many different ways you can edit the passcode form!

## Add content that is displayed before the form.

This is the default behavior for the message. You can add as much content as you need, including text, images and backgrounds, by simply adding code directly to the "Passcode prompt" area, found on the lock page, under Messages:

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/6179b6139ccf62287e5f0638/file-A4L7rINXDU.png)

Any code that you add to this area will be rendered normally, as if adding it to the theme. Including:

* HTML - using regular HTML tags
* CSS - using \<style> *your CSS code here* \</style>
* Javascript - using \<script> *your javascript code here* \</script>
* Liquid - using [regular Liquid syntax](https://shopify.dev/api/liquid/basics)

## Add content *after* the form

Simply use {{ locksmith\_passcode\_form }} to denote where the form itself will go, and then add in content that you want to display before and after it.

```
<p>Please enter the passcode to continue: </p>

{{ locksmith_passcode_form }}

<p> Content to be displayed after the form </p>
```

## Editing the "Continue" and "One moment..." text

This is not done in the Locksmith app, but rather in the theme's "Edit default theme content" settings:

<figure><img src="/files/L9aYpc3xCSweaLy33eLI" alt=""><figcaption></figcaption></figure>

Once in the "Theme content" settings, you'll need to go to the "Locksmith" tab, which is typically not visible right away:

<figure><img src="/files/uOhxP5SS6rPYhMDHJzKi" alt=""><figcaption></figcaption></figure>

So then finally, you can edit the text itself, under the Locksmith tab:

<figure><img src="/files/TGi3yseJcH9eiqnOYAP7" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Note**: This step only changes the wording for your default language. If you are using multiple languages in your store, you'll also need to go through the "Localize" step. Check out [Shopify's guide on doing that](https://help.shopify.com/en/manual/markets/languages/manage-languages) here.
{% endhint %}

<details>

<summary>Editing the "Cancel" button text used in the manually triggered passcode form</summary>

Locksmith's manual mode can be used to hide specific parts of your theme, such as the add-to-cart button, instead of hiding the entire product page. In this case, the passcode form needs to be 'manually triggered' to present the form to customers, using a custom passcode button.

This is covered in our price hiding guide here: [Hiding product prices and/or the add to cart button](/tutorials/hiding-prices)

The manually triggered passcode form includes a 'Cancel' button that can be used to close the passcode form, revealing the product page again.

<img src="/files/5ZC8jMdwU70bIdqQUdP0" alt="" data-size="original">

To edit the text for this button, some CSS will need to be added to the 'Passcode prompt' message field. The following example code can be used for that, replacing the 'Close' text with your own.

```
<style>
    .or-cancel a:nth-child(1) {
        visibility: hidden;
        position: relative;
    }
    .or-cancel a:nth-child(1):after {
        content: "Close";
        visibility: visible;
        position: absolute;
        top: 0;
        left: 0;
        color:black
    }
</style>
```

</details>

## Including other form types

If you have multiple key condition types on the same lock, it might be useful to include other form types within the prompt, so that they display on the same page. We have a guide on doing this here:

{% content-ref url="/pages/ThvKsaJtKXtdZ5y5612d" %}
[Showing multiple prompts on the same page](/tutorials/more/showing-multiple-prompts-on-the-same-page)
{% endcontent-ref %}

Please note that this is NOT compatible with replacing/editing the form itself (as detailed in the next section).

## Replacing or editing the form itself

Some merchants want more control over the form itself, not just the text that is shown alongside it. This could just be for more granular edits to the way it looks, or to perform more complicated javascript operations on the text input.

Although we can help troubleshoot, if you choose to override the form, the coding and style is up to you, we are not able to create a new form for you.

To do this, simply use the "Passcode prompt" area to put in your new form. Since you're overriding the form, you'll need to add in all the code for the new form. To begin, copy/paste this entire section (including the script!) into the Messages > Passcode prompt area. Then, edit as needed:

```
<div class="locksmith-passcode-container container page-width">
  <form id="locksmith_passcode_form">
    <p>Enter the passcode to continue: </p>
    <p><input autofocus id="locksmith_passcode" class="locksmith-passcode {% if locksmith_passcode_attempted %}failed{% endif %}"></p>
    <p><button type="submit" class="button button-primary btn btn-primary action-button action_button">CONTINUE</button></p>
  </form>
</div>

<script>
  var passcodeForm = document.getElementById("locksmith_passcode_form");
  passcodeForm.addEventListener('submit', function (event) {
    event.preventDefault();
    var passcode = document.getElementById("locksmith_passcode").value;
    /* REMOVE THIS LINE and insert any desired transforms to passcode here */
    Locksmith.submitPasscode(passcode, event);
  });
</script>
```

If you need to perform text transforms (e.g. downcasing the text for case-insensitivity), do that in the marked area in the script above.

**Editing tips**

* Changing the form too extensively (editing the text input, script, classes/ids) could cause the passcode not to be submitted correctly, so try to stick as close to the above as possible.
* Locksmith will look for the \<form> tag with the "locksmith\_passcode\_form" id, so that's something to keep in mind if you see that Locksmith is still rendering the default form when overriding:

```
<form  id="locksmith_passcode_form">
  ...rest of form code...
</form>
```

## 5. Editing other specific elements on the form

Here are a few examples of how you might use CSS to style your passcode messages. You can put these directly in your passcode messages in Locksmith (making sure to surround them with the `<style> ... </style>` tag), or add them to the stylesheets in your theme.

***

### **Target the 'Continue' button by ID**

```
#locksmith_passcode_submit { color: blue; }
```

***

### **Target the input field by class**

```
#locksmith_passcode { border: 1px solid red; }
```

***

### **Center the continue button**

```
.locksmith-passcode-container p:last-child { text-align: center; }
```

***

### **Showing a message when the customer enters the wrong passcode**

```
form.locksmith-authorization-failed::before {
  content: 'The passcode you have entered is invalid. Please enter another passcode.';
  color: red;
}
```

***

### Add a basic image

```
<img src="https:// your image source here" alt="Your image description">
```

***

### **Add a background image to the entire page**

```
body {
  background-image: url('https://YOUR-URL-HERE') !important;
}
```

***

### **Add a background image to only the&#x20;*****form*****&#x20;area**

```
#locksmith-content {
  background-image: url('https://YOUR-URL-HERE');
  background-size: 100%;
  background-repeat: no-repeat;
}
```

***

### **Add a r**esponsive background image to the entire page

```
  #MainContent {
    background: url(//https://YOUR-URL-HERE') center bottom no-repeat;
    background-size: cover;
    padding-top: 10%;
    padding-bottom: 10%;
    max-width: 100%;
  }
```

<details>

<summary>If the above CSS doesn't work for #MainContent, try the following</summary>

* Use the following CSS instead

```
.locksmith-passcode-container {
    content: "";
    display: block;
    padding-top: 56.25%; /* Adjust this value based on the actual aspect ratio of your background image. For example, here is a calculation of the aspect ratio for an image of size 1080*1920 pixeles: ((1080 / 1920) * 100)% = 56.25% */
    flex-direction: column;
    justify-content: center; /* Aligns content vertically center */
    align-items: center; /* Aligns content horizontally center */
    height: 100%; /* Ensures the container takes full height of its parent */
}
#locksmith-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https:// your image source here');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1;
}

#locksmith-content {
    position: relative;
}

#locksmith-passcode-form {
    position: absolute;
    top: 50%; /* Aligns content vertically center */
    left: 50%; /* Aligns content vertically center */
    transform: translate(-50%, -50%); /* Adjusts the position of the passcode from so that its center aligns with the center of the div. */
    box-sizing: inherit;
    max-width: 475px; /* Sets the maximum width of the passcode form */
    width: 100%;
    padding: 20px 25.45px;
    z-index: 1;
}
```

* Update the `background-image:` attribute with the URL for your image
* Make sure you update the `padding-top:` attribute with your images aspect ratio. For example, to calculate the aspect ratio of an image of size 1080\*1920 pixels like this: ((1080 / 1920) \* 100)% = 56.25%

</details>

***

### **Add placeholder text to the passcode entry field using javascript**

With jquery:

```
<script> setTimeout(() => { $('#locksmith_passcode').attr('placeholder', 'This is a placeholder!'); }, 10); </script>
```

With vanilla javascript:

```
<script>document.querySelector('#locksmith_passcode').setAttribute('placeholder', 'Enter password');</script>
```

***

## Related Guides:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

{% content-ref url="/pages/YtpR0xAXeb47E9sEPG1d" %}
[How do I add a hero banner image to Locksmith's access messages](/faqs/more/how-do-i-add-a-hero-banner-image-to-locksmiths-access-messages)
{% endcontent-ref %}

{% content-ref url="/pages/QDnvLtkLiYqhX0WaiZJp" %}
[Passcode keys](/keys/passcode-keys)
{% endcontent-ref %}

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}

***

While we cannot make extensive custom edits to your form for you, if you have any questions you can contact us via email at **<team@uselocksmith.com>**


# Customizing Locksmith’s "Access denied content" messages, and redirecting customers

Locksmith access denied content is presented to customers who are signed in, but don’t meet the access requirements of the lock (e.g. the customer doesn’t have the specific customer tag that is required for access). Or when the lock has no keys.

## Key conditions that use the “Access denied content" filed:

* is tagged with…
* has one of many email addresses
* has an email address from an input list…
* the customer's email contains…
* has placed at least x orders
* has purchased…
* (custom Liquid) in some cases

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

## 1. Modifying the default message

The "Access denied content" message field can be modified in the same way as Locksmith’s other access messages, including using code to modify the appearance and functionality of the message.

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

### The following code can be used in this field:

* HTML
* CSS (via the \<style> tag)
* Javascript (via the \<script> tag)
* Liquid (Shopify's template language for themes)

## 2. Adding the registration form to this page

Simply add the following Liquid to the "Access denied content" message field:

```
{{ locksmith_customer_register_form }}
```

This will render the theme’s default registration form.

## 3. Adding a custom registration form or content

Liquid code can be used to **render** a **snippet** or section from your theme that contains a custom form or message.

1. [render](https://shopify.dev/docs/api/liquid/tags/render) - Renders a snippet

```
{% render 'filename' %}
```

2. [section](https://shopify.dev/docs/api/liquid/tags/section) - Renders a section.

```
{% section 'name' %}
```

## 4. Automatically redirecting customers to another part of your store

A JavaScript redirect can can be added to the “"Access denied content" message field if you would like to automatically send customers who are denied access to your lock, to some other part of your store.

This might be useful for a few different reasons:

* To take customers to a specific product they can purchase for access. For example, to buy a product, or membership, or subscription for access.
* To take customers to an information page.
* To take customers to a custom registration form
* To direct customers to an alternative resource

Simply add the following code to the "Access denied content" message field and modify the URL to your desired location.

<pre><code>&#x3C;script>
<strong>    window.location.replace("http://www.example.com");
</strong>&#x3C;/script>
</code></pre>

<figure><img src="/files/3W4Di47RWkza87iqwA13" alt=""><figcaption></figcaption></figure>

## Related articles:

{% content-ref url="/pages/aP8lIk1Bb966HCf6shyh" %}
[Adding translations to your Locksmith messages](/tutorials/more/adding-translations-to-your-locksmith-messages)
{% endcontent-ref %}

{% content-ref url="/pages/xbxhHadjI7Iip4aWc2rq" %}
[Customizing the customer login page](/tutorials/more/customizing-the-customer-login-page)
{% endcontent-ref %}

{% content-ref url="/pages/aGfqo2XVdHpo4Z5mXBsa" %}
[Customizing the registration form](/tutorials/more/customizing-the-registration-form)
{% endcontent-ref %}

{% content-ref url="/pages/Rtavrz1uam6HlWPicwww" %}
[Selling digital content on Shopify](/tutorials/selling-digital-content-on-shopify)
{% endcontent-ref %}

{% content-ref url="/pages/jbjADWrqtfREkzTcxWZg" %}
[Earn recurring revenue on your exclusive content using ReCharge](/tutorials/more/recharge)
{% endcontent-ref %}

{% content-ref url="/pages/eG56o6Uu6VtxcgDbdhwU" %}
[Newsletter keys](/keys/more/newsletter-keys)
{% endcontent-ref %}

{% content-ref url="/pages/j92Gw3r69gFu7w9Tk25g" %}
[How do I change where customers are redirected to after registration on Shopify](/faqs/more/how-do-i-change-where-customers-are-redirected-to-after-registration-on-shopify)
{% endcontent-ref %}

### Something else not covered here?

Let us know by emailing us at: **<team@uselocksmith.com>**


# Customizing the email list signup form

An overview of the ways you can customize the the email list sign up prompt for our newsletter key conditions

This applies to Klaviyo and Mailchimp key condition types - the setup instructions for which are linked below:

* [Klaviyo](/tutorials/more/klaviyo)
* [Mailchimp](/tutorials/more/mailchimp)

## Adding a regular prompt

You can add any text prompt to the "Mailing list signup prompt" area, and it will be displayed right before the email input. The default prompt is shown below:

<figure><img src="/files/XC4QapEVDPzHVm29MpxJ" alt=""><figcaption></figcaption></figure>

In addition, you can add any code to this area, and it will be rendered normally, as if adding it to the theme. Including:

* HTML - using regular HTML tags
* CSS - using \<style> *your CSS code here* \</style>
* Javascript - using \<script> *your javascript code here* \</script>
* Liquid - using [regular Liquid syntax](https://shopify.dev/api/liquid/basics)

## Adding content after the form

Use `{{ locksmith_email_form }}` to denote where the form (input and button) itself will go, and then add in content that you want to display before and after it.

```
<p>Subscribe to our mailing list to continue! </p>

{{ locksmith_email_form }}

<p> Content to be displayed after the form </p>
```

This results in the following:

<figure><img src="/files/nmGkTMhDGduyQqQLp9DF" alt=""><figcaption></figcaption></figure>

## Editing the "Continue" and "One moment" text

To edit the text for the button, you'll need to follow Shopify's guide to "Edit default theme content":

{% embed url="<https://help.shopify.com/en/manual/online-store/themes/customizing-themes/language/change-wording>" %}

Once there, you'll find a Locksmith tab in which you can edit the text as needed:

<figure><img src="/files/JbW2OGNAEfSwmdQqSTcU" alt=""><figcaption><p>You may need to press the "..." button to the right, which will give you the option to choose more tabs, if the "Locksmith" tab isn't visible right away.</p></figcaption></figure>

## Translating messages

We have a dedicated guide on adding translated messages here:

{% content-ref url="/pages/aP8lIk1Bb966HCf6shyh" %}
[Adding translations to your Locksmith messages](/tutorials/more/adding-translations-to-your-locksmith-messages)
{% endcontent-ref %}

## Including other form types

If you have multiple key condition types on the same lock, it might be useful to include other form types within the prompt, so that they display on the same page. We have a guide on doing this here:

{% content-ref url="/pages/ThvKsaJtKXtdZ5y5612d" %}
[Showing multiple prompts on the same page](/tutorials/more/showing-multiple-prompts-on-the-same-page)
{% endcontent-ref %}

Please note that this is NOT compatible with overriding/editing the form itself (as detailed in the next section).

## Overriding or editing the form itself

{% hint style="warning" %}
**Note**: This is advanced and requires knowledge of code. If you choose to override the form, the coding and style is up to you, we are not able to create a new form for you or edit the code for you. With that said, you are still free to contact us with any troubleshooting questions that you have.
{% endhint %}

Use the following steps in order to override the form. The screenshots are taken from Chrome, but the steps are similar if using other browsers.

1. Once you've created a Mailchimp or Klaviyo key condition, open up your locked page in your storefront.
2. Right click on the email list signup form to inspect the code.

<figure><img src="/files/rIBRtOLoV6bYhecKzvhe" alt=""><figcaption></figcaption></figure>

3. This should take you to the "Elements" tab. There, find the \<div> element with the "locksmith-email-container" class:

   ```php
   <div class="locksmith-email-container container page-width">
   ```

   \
   You can copy the entire element and all child elements like so:

<figure><img src="/files/2xVEhnHdT3hSEbZ7XiOH" alt=""><figcaption></figcaption></figure>

4. Paste this directly into your "Mailing list signup prompt". You should end up with something like this:

<figure><img src="/files/LmZRScrmP6B2ryIWpOn8" alt=""><figcaption><p>The "key_condition_id" will vary depending on you <em>actual</em> key condition id</p></figcaption></figure>

5. Save that, and open your locked page again on your storefront. If everything worked, your email list signup prompt and form should look exactly like it did before. But now you have the ability to edit it as needed. Please note that you must always include a `<form>` tag with an id of `locksmith_email_form` - otherwise Locksmith will try to include the form itself, and you'll end up with two forms - so don't remove that when editing the code.


# Showing multiple prompts on the same page

How to set up Locksmith to show more than one input form when using more than one condition type on the same page

Many of Locksmith's access conditions require input from your customers, whether that be a login, or just a code entry or a confirm button press. Sometimes you might wish to give your customers flexibility by providing multiple different ways for a customer to gain access. For example, perhaps they can enter a passcode OR subscribe to your mailing list. Setting that up would look something like this:

<figure><img src="/files/yyMzxU0KtELGmzEGIh9z" alt=""><figcaption></figcaption></figure>

By default, **Locksmith only shows one entry method at a time to customers**. In the above example, you'd see something like this:

<figure><img src="/files/cxv0F4wt0rmZ7GzXiPrK" alt=""><figcaption><p>Newsletter prompts are prioritized over passcode prompts according to Locksmith's internal rules</p></figcaption></figure>

## Editing messages to show both forms

To include a specific form for a key condition that you're using, you can mix and match the following liquid variable outputs in your Locksmith messages:

<table><thead><tr><th width="267">Form/condition type</th><th>Liquid code used to include the form</th></tr></thead><tbody><tr><td>passcode</td><td><code>{{ locksmith_passcode_form }}</code></td></tr><tr><td>mailing list signup (i.e. Klaviyo or Mailchimp)</td><td><code>{{ locksmith_email_form }}</code></td></tr><tr><td>confirmation</td><td><code>{{ locksmith_confirmation_form }}</code></td></tr><tr><td>login - for store accounts. If you are not using legacy customer accounts, this is just a button pointing to the sign in page</td><td><code>{{ locksmith_customer_login_form }}</code></td></tr><tr><td>registration - for store accounts. only applicable if you are using the legacy customer account system</td><td><code>{{ locksmith_customer_registration_form }}</code></td></tr></tbody></table>

## Example

Continuing the passcode/klaviyo example from above, add this:

```
Subscribe to our mailing list to continue!

{{ locksmith_email_form }}

Or, enter the passcode:

{{ locksmith_passcode_form }}
```

Which results in this:

<figure><img src="/files/ZdM5FnzsNe7jbwuwQRtg" alt=""><figcaption></figcaption></figure>

## Which message should you edit?

The easiest way to make sure your locked pages display correctly when using multiple prompts is to simply **copy/paste the same exact message to each of your messages**. Technically only one of them will be used - which is based on Locksmith's internal sorting rules. But, for simplicity, use consistent messages:

<figure><img src="/files/19l8JpFTZZwpuB6EvtrV" alt=""><figcaption></figcaption></figure>


# Showing content only to specific Markets

How to use the Locksmith app to restrict content in your different Markets on your Shopify: Online Store sales channel

Locksmith can be used to show different content depending on what Market a customer is visiting.

The first step is to divide up the content in your store. If you already know what products or collections you want to show or hide in different Markets, then you do not need to create extra collections here.

Since the goal for merchants here is typically to just to show a different product offering to different markets, you'll want to create collections that each contain the products that you'd like to display for each market. Keep in mind that you can use [Shopify's automated collection feature](https://help.shopify.com/en/manual/products/collections/automated-collections/auto-create) to make this easier. Once your collections are created, it's simply a matter of adding a lock to them in Locksmith:

![](/files/SRmuvAnRob6ZIV4MWMvi)

{% hint style="info" %}
**Note**: You are not limited to locking only collections or products in this way. You could also lock pages or variants, for example. In this case, you'd just need to create the variants or pages that you want to display for each Market.
{% endhint %}

Once the lock is created, you'll need to create the correct Locksmith "Key". Markets are typically set up by either creating *subdomains* on your store, or by creating *subfolders*. **Depending on which one of those you are using, you'll need to set up Locksmith a bit differently...**

## When using subdomains

This will usually look something like [www.my-store.eu](http://www.my-store.eu), or ca.my-store.com, where the subdomain of the URL represents a different region that you're selling to. In this case, simply use Locksmith's "domain" key condition:

<figure><img src="/files/QjhxGOkeUNFpwZElVeR9" alt=""><figcaption></figcaption></figure>

When setting this up, Locksmith will automatically show you suggestions for which domain to use, based on the domain settings for your store.

## When using locale + country subfolders

This will usually look something like [www.my-store.com/en-us](http://www.my-store.com/en-us) or [www.my-store.com/fr-ca](http://www.my-store.com/fr-ca). In this case, your key conditions will look slightly different. Start by selecting the ["custom Liquid" key condition](/keys/more/custom-liquid-key-condition-basics):

<figure><img src="/files/JL0LAGK3SrM33vaA7MzJ" alt=""><figcaption></figcaption></figure>

Next, you'll add in something like the following as the "Liquid condition", making sure to edit the last part to match the subfolder you are wanting to grant access to:

`{% if`**`request.locale.root_url == "/en-us"`**` `` ``%} `

Note that only the bolded part needs to be entered, as the rest is included automatically.

You'll end up with something like this:

<figure><img src="/files/2z4ddPbX1WvSeEpPhXqi" alt=""><figcaption></figcaption></figure>

If you want to set up a key condition for your primary domain, use "/" as your root\_url. In specifically:\
\
`{% if`**`request.locale.root_url == "/"`**` `` ``%} `

## Using the "localization" object

Similar to the above, you can also use the Liquid localization object in your custom key condition. This is useful if you don't use subfolders. Shopify's documentation on the localization object is here: <https://shopify.dev/docs/api/liquid/objects/localization>.

{% hint style="warning" %}
**Important!** Using this feature doesn't mean you can use any arbitrary country in your condition. It will only work for the countries that you've set up localization options for in your store. If you want to grant access to visitors based on their IP address location, that can be done with our "locations" key condition: <https://www.locksmith.guide/keys/visitor-location-keys>.
{% endhint %}

Your condition will look something like the following - where "CA" is the ISO code for Canada:\
\
`{% if`**`localization.country.iso_code == "CA"`**` `` ``%} `

<figure><img src="/files/hMTzK3FVqUNY9eFVy1y1" alt=""><figcaption></figcaption></figure>

A list of country ISO codes can be found here: <https://shopify.dev/docs/api/storefront/2022-10/enums/countrycode>


# Input lists

How to use Locksmith's Input List feature to work with large numbers of inputs

Locksmith gives you the ability to use input lists for managed sets of [**passcodes**](/keys/passcode-keys)**,** [**secret links**](/keys/secret-link-keys), or [**email addresses**](/keys/customer-account-keys). They're useful when you have a *very large* number of possible inputs.

{% hint style="info" %}
**Note**: Any time you have 1000+ inputs, it is recommended to use input lists over their vanilla counterparts. Input lists can handle millions of entries, so you have a lot of flexibility here.
{% endhint %}

## Step 1: Add your inputs to an external file

Input lists are stored externally! So you'll need to create a file that is accessible via a URL, adding all of the values to it that you would like to use.

The most straightforward way to do it is to simply use Google sheets:\
\
<https://www.google.com/sheets>

**Google Sheets** must be formatted as a document having a single column of input values, one value per row:

<figure><img src="/files/ucpeqo7lr2fAHm4K0x9t" alt=""><figcaption></figcaption></figure>

### Supported file formats

In addition to Google Sheets, sources may be of the following formats:

* TXT (one input value per line)
* CSV (a single column of input values, one value per row)
* JSON (an array of strings)
* Microsoft Excel XLSX (a spreadsheet having a single column of input values, one per row)
* JSON array provided by a Mechanic cache endpoint ([read more about Mechanic here](https://apps.shopify.com/mechanic))

{% hint style="warning" %}
**Important**: The source file must be either unauthenticated OR must be a Google Sheet or Google Doc that has been shared with the following email address: **<input-lists@locksmith-app.iam.gserviceaccount.com>.**\
\
\&#xNAN;*If you send a notification directly to this email address, it may bounce. However, as long as the document is properly shared with that email address, Locksmith will be able to access it.*
{% endhint %}

## Step 2: Locksmith Configuration

Input lists are configured in your Locksmith account settings. To find this area, open the Locksmith app and go to the Settings area (using the left-hand navigation):

<figure><img src="/files/XGWzXSRN3vQWFFSh3lcA" alt=""><figcaption></figcaption></figure>

Input lists are available in the "Extensions" area:

<figure><img src="/files/Ftn3T9jQttqFNec00YRG" alt=""><figcaption></figcaption></figure>

### Options

An input list has four options:

* **Name**
* **Source URL**
* Input values are **case-sensitive** (enable to require an exact case match)
* **Default usage limit per input list item** - allows you to specify a default usage limit for any items that you add to the list. This is a great way to add **unique inputs** - simply enter **1** as the usage limit and each input can only be used once.
* **Partial match** - when this option is enabled, Locksmith will accept submissions that **contain** an input list value, rather than requiring an exact match. This is useful for matching part of an email address ( e.g. the domain of the email address) or other partial string. Partial matching is available for any input list (including when they are used for passcodes, secret links, and email addresses) but for performance reasons, can only be used with input lists that have **fewer than 1000 values**. If you need to grant access to a larger list of values, and then a few partial matches, you can create two separate input lists and two separate keys.

### Syncing <a href="#syncing" id="syncing"></a>

When an input list is synchronized with its source, any new items found in the source file will be added to Locksmith's copy of the list. Any items that are *no longer* found in the source file will be *removed* from Locksmith's copy of the list.

Input lists that are sourced from Google Drive will be automatically synchronized whenever the source file is changed. (When used with Google Sheets, this allows for interesting flexibility: one could use a Google Form that saves data to a Google Sheets file, which then feeds into an input list. Whenever the form is submitted, Locksmith would automatically sync a new value into the input list.)

All other input lists are automatically synchronized on a regular basis (currently at [midnight UTC](https://time.is/UTC), subject to change without notice).

All input lists may be synchronized manually, by using the "Sync input list" button for the respective list.

## Step 3: Use with specific key conditions

Once you've created at least one input list, you may use it when configuring a new key condition in your lock settings, by choosing one of the "Permit if..." options that mentions input lists. When adding keys to you locks, use the corresponding options...

### Email Addresses

When configuring your key condition, select the "Permit if the customer has an email address from an input list…" option to have Locksmith compare customer inputs with items in your input list:<br>

<figure><img src="/files/YOP13akx9AWNIiEdF2oz" alt=""><figcaption></figcaption></figure>

More information on using customer account key conditions here:

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

### Passcodes

When configuring your key condition, select the "Permit if the customer gives a passcode from an input list…" option to have Locksmith compare customer input with items in your input list\ <br>

<figure><img src="/files/cGTykFuDMVwV0gduXndM" alt=""><figcaption></figcaption></figure>

As with Locksmith's other passcode conditions, you may configure this condition to "remember" returning customers who are logged in. If this option is enabled, Locksmith will compare previously-accepted passcodes from the customer's records with *current* items in the selected input list. This means that *removing* previously-used items from the input list will result in the relevant returning customers being "forgotten".

More information on using passcodes here:

{% content-ref url="/pages/QDnvLtkLiYqhX0WaiZJp" %}
[Passcode keys](/keys/passcode-keys)
{% endcontent-ref %}

### Secret links

When configuring your key condition, select the "Permit if the customer arrives using a secret link code from an input list…" option to match the visitor's current URL with items in your input list:

<figure><img src="/files/2vMSRX6yIsZxK3vDXtke" alt=""><figcaption></figcaption></figure>

As with standard secret link keys, Locksmith will be trying to find matching secret link codes in the following parts of the URL:

* The URL's "search" portion. For example, in a URL that looks like "<https://example.com/?foo=bar\\&baz\\&ls=qux>", Locksmith will consider items in your input list having the value "foo=bar\&baz\&ls=qux".
* Any component in the URL's "search" portion. For example, in a URL that looks like "<https://example.com/?foo=bar\\&baz\\&qux>", Locksmith will consider items in your input list having one of these values: "foo=bar", "baz", "ls=qux".
* The "ls" query parameter, if present. For example, in a URL that looks like "<https://example.com/?foo=bar\\&baz\\&ls=qux>", Locksmith will consider items in your input list having the value "qux".

This means that you may form your shared URLs in any of the following ways, using an example secret link code of "foobar" to illustrate:

* <https://example.com/?foobar>
* <https://example.com/?ls=foobar>

Feel free to combine either option with other query parameters, like so:

* <https://example.com/?foobar&utm_source=baz&..>.
* <https://example.com/?ls=foobar&utm_source=baz&..>.

As with Locksmith's other secret link condition, you may configure this condition to "remember" returning customers who are logged in. If this option is enabled, Locksmith will compare previously-accepted secret link codes from the customer's records with *current* items in the selected input list. This means that *removing* previously-used items from the input list will result in the relevant returning customers being "forgotten".

More information on using secret links here:

{% content-ref url="/pages/VGiBbrxUlyxmZVtO2aLl" %}
[Secret link keys](/keys/secret-link-keys)
{% endcontent-ref %}


# Protecting against bots

A strategy to protect your products from bots and unapproved resellers purchasing from your Shopify Online Store

{% hint style="warning" %}
**This is a legacy guide**. This technique may still be useful for some, but for those wishing to add a "Checkout rule" to their store via Locksmith, see our guide here:

[Setting up checkout validation with Locksmith](/tutorials/more/setting-up-checkout-validation-with-locksmith)
{% endhint %}

Many merchants that sell collectors items, limited edition items, or other types of highly exclusive items are plagued by bots purchasing their products, and come to Locksmith for help.

**Without using a** [**checkout rule**](/tutorials/more/setting-up-checkout-validation-with-locksmith)**, Locksmith is NOT able to prevent bots and other unapproved resellers from purchasing from your store**.

This is because direct-to-checkout links, which allow products to be purchased without even visiting the Online Store, exist within the Shopify platform, and it's not possible for apps to get involved with this layer.

{% hint style="info" %}
**Note**: This also applies to merchants wanting to use Locksmith to give away free items to select customers. As soon as bots pick up on the presence of your free items, they may attempt to buy your entire stock, *even if those items are protected by Locksmith*.
{% endhint %}

While Locksmith itself cannot help here, there is a way you can prevent this from happening *without the need for any apps*.

## The solution: discount codes

So the general strategy here is to set your products up so that the *public* price is something pretty high - **a price high enough so that the bots will ignore it**. Then, you'll use [Shopify's Discount feature](https://help.shopify.com/en/manual/discounts) to create a discount to bring the price back down to the original price that you'd like to sell at.

Thankfully, Shopify allows you to create discounts that can *only* be used by specific "customer segments". [More information on creating customer segments here](https://help.shopify.com/en/manual/customers/customer-segmentation/customer-segments).

So, for example, you could create a customer segment that's based on a specific customer tag:

![](/files/i8KGG5M1Nca3GbyyHUDl)

And then give the customer segment a description name:

![](/files/vwAM0j8CXw0fLuu7T5J0)

When setting up the discount code, use the "Customer eligibility" section to select the customer segment that can use this discount:

![](/files/uEeZPjcYPuF0iCN6qfKs)

The result of this is that you now have an avenue to make sure that only the customers you designate have a pathway to purchase that is secured all the way to the completion of the sale.

You can absolutely use this strategy without further involvement with any apps, including Locksmith. The customers will simply use the product pages as normal, and enter the discount codes at checkout.

Again, the price they'll see here will be higher than what the customer is most likely expecting, so make sure you do everything you can to communicate with your customers about using the discount code. You can do this in the product description, in customer mailers, or when they contact you (more on that below).

That's it for the basic setup!

## How Locksmith *can* help

*Optionally*, Locksmith can still help get your product pages to a place that helps direct your non-bot customers to the right place. Locksmith has features that will help hide the price and add-to-cart buttons so that the public facing price doesn't scare customers away that stumble onto your product pages. More information, and set up guide, on hiding the price and add to cart button here:

{% content-ref url="/pages/eHG9k5snoahy4lKbaR7b" %}
[Hiding product prices and/or the add to cart button](/tutorials/hiding-prices)
{% endcontent-ref %}

So basically, when set up correctly, your customers would see something like this when they land on your product pages:

![](/files/qGl7fLCtANT1EPbcLBXv)

{% hint style="info" %}
**Note**: You have flexibility in what you want the link to say, and where it points your customers to.
{% endhint %}

Then, when signed in with an approved account, they will be able to add to cart and purchase.

![](/files/CsjeRISKocMf83iykAPf)

{% hint style="warning" %}
**Remember**: Locksmith alone is not enough to prevent bots from purchasing the products out from under you - you'll need to combine this with the discount method outlined above.
{% endhint %}

For questions or help with setup, contact us via email at **<team@uselocksmith.com>!**


# Earn recurring revenue on your exclusive content using ReCharge

You can use Locksmith alongside a dedicated subscription app to lock content so that the content can only be accessed by active subscribers. This guide covers how to use ReCharge, but it should be noted that any recurring payment service that offers the "auto-tagging" feature would work with Locksmith.

{% hint style="info" %}
**Note**: This guide only covers recurring purchases. if you want to grant access based on a *single purchase,* that is a built-in Locksmith feature, no third party app required. [More info on that here](/tutorials/selling-digital-content-on-shopify).
{% endhint %}

## ReCharge Setup:

If you haven't already, install the ReCharge app and use their instructions to set up a recurring subscription for one of your products:

[Get started with ReCharge here!](https://apps.shopify.com/subscription-payments)

One thing to keep in mind is that even if you aren't offering a subscription to an actual physical product, you can still use ReCharge and just label the subscription product as something like "Exclusive Access" or "Membership".

**Recharge will automatically tag customers with "Active Subscriber"** if they have an active ReCharge subscription, making the setup very simple. Also note that this tag is removed if the customer ends their subscription.

## Locksmith Setup:

The Locksmith side of this is pretty straightforward. Open up the Locksmith app and create a lock by searching for the page, product, collection, etc that you want to limit access to.

Once the lock is created, add the following key:

<figure><img src="/files/IXchozteXQEszuQVGQ22" alt=""><figcaption></figcaption></figure>

That's all it takes! Locksmith will now only grant access to accounts tagged with "Active Subscriber", which will only be added to accounts that have an active subscription via ReCharge.

## Advanced setup for multiple tiers:

### If all of your plans are accessing the same content...

E.g. - you have a monthly, yearly, etc option - no additional setup needed: the same tag will get added to a customer account to matter what plan they have, and customers using all plans will be able to access the content.

### If you have multiple plan tiers to access *different* content, depending on the tier...

E.g. Gold, Silver, Bronze tiers, but the access for each tier is different.

In ReCharge, you'd create a recurring order product for each of your tiers.

In Locksmith, add a lock to the content that is associated with a particular membership level. You will end up with at least one lock for each tier, maybe multiple, depending what content you are locking!

Use the following key:

<figure><img src="/files/PE7whfuYZM5WOolrnh1x" alt=""><figcaption></figcaption></figure>

Make sure to fill out the "Only look at orders in the last..." field with the appropriate subscription length that matches you rReCharge subscription:

<figure><img src="/files/cUTqP7BoQGrdPVq6dZaL" alt=""><figcaption></figcaption></figure>

If there is any content that can be accessed by more than one type of membership level, just add them both as Locksmith keys:

<figure><img src="/files/vegeA5MY9LG9XjepVuHn" alt=""><figcaption></figcaption></figure>

**Feel free to ask questions if you're having any issues with any of that!** We can be contacted via email at <team@uselocksmith.co>&#x6D;**.**

## Related articles:

{% content-ref url="/pages/Rtavrz1uam6HlWPicwww" %}
[Selling digital content on Shopify](/tutorials/selling-digital-content-on-shopify)
{% endcontent-ref %}

{% content-ref url="/pages/hydVEIVbc7QjkXdez4q0" %}
[Use Locksmith and PayWhirl together to grant access based on subscriptions](/tutorials/more/use-locksmith-and-paywhirl-together-to-grant-access-based-on-subscriptions)
{% endcontent-ref %}


# Use Locksmith and PayWhirl together to grant access based on subscriptions

You can use Locksmith alongside a dedicated subscription app to lock content so that the content can only be accessed by active subscribers. This guide covers how to use PayWhirl, but any recurring payment service that offers the "auto-tagging" feature would work with Locksmith.

**Note**: This guide covers recurring subscriptions. If you want to grant access based on a *single purchase,* that is a built-in Locksmith feature, no third party app required. [More info on that here](https://www.locksmith.guide/tutorials/selling-digital-content-on-shopify).

### PayWhirl Setup: <a href="#recharge-setup" id="recharge-setup"></a>

If you haven't already, install the PayWhirl app and use their instructions to set up a recurring subscription for one of your products. Start by creating a product on your store, and then linking it to a subscription through PayWhirl. You can find the full setup instructions here:

{% embed url="<https://docs.paywhirl.com/en/collections/2664862-shopify-subscription-app>" %}

**Important: You'll need to configure PayWhirl to tag customers who subscribe.** To do this, click on the Workflows tab in PayWhirl, and then click on "Create customer tagging":

<figure><img src="/files/oGN7h3ZLy8nu6n8Xl6ug" alt=""><figcaption></figcaption></figure>

Next, click on "Tag active subscribers", and then "Create and activate workflow". Your setup should look something like this on the Workflows screen when you're done:<br>

<figure><img src="/files/MEcuxEFqgkR5S2XdjktH" alt=""><figcaption></figcaption></figure>

### Locksmith Setup: <a href="#locksmith-setup" id="locksmith-setup"></a>

Open up the Locksmith app and create a lock by searching for the page, product, collection, etc that you want to limit access to.

Once the lock is created, add the following key:

<figure><img src="https://www.locksmith.guide/~gitbook/image?url=https%3A%2F%2F277214568-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUeGWHuijBPr8Og1Gta%252Fuploads%252FgNsxsDnSeGgDiaN2ErKn%252FScreen%2520Shot%25202022-11-08%2520at%25209.57.16%2520PM.png%3Falt%3Dmedia%26token%3D58f6f9f9-951f-4400-b234-dd423914721a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=5b72439eb35df1eb339cc57b62b92f0387bb389d283889602e9f12f6a1121487" alt=""><figcaption></figcaption></figure>

Here's a refresher on how to create keys:

{% embed url="<https://www.locksmith.guide/basics/creating-keys>" %}

That's all it takes! Locksmith will now only grant access to accounts tagged with "Active Subscriber", which will be added to accounts that have an active subscription via PayWhirl. Based on the Workflow settings you set up already, the tag will be removed when the customer cancels or is otherwise unsubscribed. As a result, they'll also automatically lose access to the locked content.

### Advanced setup for multiple tiers: <a href="#advanced-setup-for-multiple-tiers" id="advanced-setup-for-multiple-tiers"></a>

#### If all of your plans are accessing the same content... <a href="#if-all-of-your-plans-are-accessing-the-same-content" id="if-all-of-your-plans-are-accessing-the-same-content"></a>

E.g. - you have a monthly, yearly, etc option - no additional setup needed: the same tag will get added to a customer account to matter what plan they have, and customers using all plans will be able to access the content.

#### If you have multiple plan tiers to access *different* content, depending on the tier... <a href="#if-you-have-multiple-plan-tiers-to-access-different-content-depending-on-the-tier" id="if-you-have-multiple-plan-tiers-to-access-different-content-depending-on-the-tier"></a>

E.g. Gold, Silver, Bronze tiers, but the access for each tier is different.

In PayWhirl, you'd create a recurring order product for each of your tiers.

In Locksmith, add a lock to the content that is associated with a particular membership level. You will end up with at least one lock for each tier, maybe multiple, depending what content you are locking!

Use the following key:

<figure><img src="https://www.locksmith.guide/~gitbook/image?url=https%3A%2F%2F277214568-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUeGWHuijBPr8Og1Gta%252Fuploads%252F2nBCdyKIBd0v511jYowZ%252FScreen%2520Shot%25202022-11-08%2520at%25209.58.37%2520PM.png%3Falt%3Dmedia%26token%3Df47a2b7f-0124-4cd0-bce6-262d51519f2e&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7dd6a9fc3da1a133fa7e53bc5bf5643dd30d1090fce639b2853762b9ad108b70" alt=""><figcaption></figcaption></figure>

Make sure to fill out the "Only look at orders in the last..." field with the appropriate subscription length that matches your PayWhirl subscription:

<figure><img src="https://www.locksmith.guide/~gitbook/image?url=https%3A%2F%2F277214568-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUeGWHuijBPr8Og1Gta%252Fuploads%252FSReSPYv5Fs87cqVJMH3B%252FScreen%2520Shot%25202022-11-08%2520at%252010.00.23%2520PM.png%3Falt%3Dmedia%26token%3De53349f0-8b99-4481-8344-da5e328b9b83&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=4842b7ea9c175f59c120ddb6c2cf3c36f5202e766cdb2fcbfb8e5fbcf065b5a8" alt=""><figcaption></figcaption></figure>

If there is any content that can be accessed by more than one type of membership level, just add them both as Locksmith keys:

<figure><img src="https://www.locksmith.guide/~gitbook/image?url=https%3A%2F%2F277214568-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MUeGWHuijBPr8Og1Gta%252Fuploads%252FZaTaMuQ0PswHZSM4XOfq%252FScreen%2520Shot%25202022-11-08%2520at%252010.01.36%2520PM.png%3Falt%3Dmedia%26token%3Db1a3f6a0-7893-4f29-a151-9520988bbea8&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=c2d58dd760ff95e7bdd9005ec96b962f761394b4a3828180e01c064b7ac53b4b" alt=""><figcaption></figcaption></figure>

**Feel free to ask questions if you're having any issues with any of that!** We can be contacted via email at <team@uselocksmith.co>&#x6D;**.**


# Use Locksmith and Seal Subscriptions to grant access based on subscriptions

You can use Locksmith with Seal Subscriptions to control access based on a customer’s subscription status. Seal Subscriptions supports auto-tagging customers depending on whether their subscription is active or inactive. Here’s how it works:

#### How Seal Subscriptions tags customers

* Seal Subscriptions can automatically tag customers when they have an active subscription.
* When a subscription becomes inactive (expired or cancelled), Seal doesn’t remove the active tag. Instead, it applies an additional tag for inactive subscribers.

Reference: <https://www.sealsubscriptions.com/articles/frequently-asked-questions/can-i-tag-customers-with-active-and-inactive-subscriptions-6y>

#### Setting things up in Locksmith

1. Make sure Seal Subscriptions is configured to add both active and inactive tags to your customers.
2. Create a lock on the content you want to restrict (products, collections, pages, etc.). Guide:\
   [Creating locks](/basics/creating-locks)
3. Add a key condition: **Permit if the customer is tagged with...** and enter your active subscription tag. This is a regular (non-inverted) condition.
4. Now turn this into a combo key by adding the second condition *inside the same key*:
   * Click **Edit** on the key you just created.
   * Scroll to **+ Add key condition** and add **Permit if the customer is tagged with \<active subscriber tag>**
   * Enter your inactive subscription tag and (if needed) check [**invert**](/keys/more/inverting-conditions-in-locksmith) so the condition reads **Permit UNLESS the customer is tagged with \<inactive subscriber tag>**
   * Save the lock. You now have a single combo key that requires both conditions at once. See:\
     [Combining key conditions](/keys/more/combining-key-conditions)\
     [Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
5. Result: customers must have the **active** tag, and must **not** have the **inactive** tag, to get access. The keys should look like the following example once setup:<br>

<figure><img src="/files/YIgExhGFBsNPB27BRUpw" alt=""><figcaption></figcaption></figure>

#### Helpful resources

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
{% endcontent-ref %}

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions)
{% endcontent-ref %}

#### Summary

Because Seal Subscriptions doesn’t remove active tags, you’ll need to use both a regular (non-inverted) condition (active tag) and an inverted condition (inactive tag) in Locksmith. This setup ensures that only customers with a current subscription can access your locked content.


# Liquid locking basics

Locksmith has a feature to create "Liquid" locks, which allows you to lock pages in your store that are otherwise not searchable using the basic "Add lock" resource search in Locksmith.

{% hint style="warning" %}
This is an advanced guide that requires knowledge of [Shopify's Liquid language](https://shopify.dev/api/liquid). If you're a developer type, read on! Otherwise, please note that Locksmith support is not able to write advanced custom Liquid locks for you. While we are happy to answer any questions you have along the way, if you need help writing these, you'll need to hire a paid Shopify expert. [Our list of partners is here](https://locksmith.partnerpage.io/). Alternatively, you can check [Shopify's own list of Shopify experts](https://www.shopify.com/partners/directory).
{% endhint %}

Moving on - to begin, click in the "Add a new lock" search field and select "Start a Liquid lock", or type "Liquid" in the search field:

![](/files/lwcHeVqlANvH3Vu0iL9g)

Then click "Start a new lock":

<figure><img src="/files/RWrTRtUEFLASEqww7oKh" alt=""><figcaption></figcaption></figure>

This will bring up the following form:

<figure><img src="/files/Bts9th3WIG1WEULEuRkF" alt="Start a Liquid Lock"><figcaption></figcaption></figure>

## The "Liquid condition"

The "Liquid condition" is the condition that is evaluated to decide if the lock will be engaged on the current page. The Liquid condition simply needs to evaluate to true or false.

All liquid objects in Shopify are fair game here, [more info on Liquid objects here](https://shopify.dev/api/liquid/objects).

**Useful examples**

Any condition that evaluates to true will result in a locked page. So, imagine if you created a lock with this condition:

```
{% if true %}
```

That would result in every single page in your store becoming locked. This isn't advisable, it's just a proof of concept :)

***

One of the most useful variables that you can use is the **canonical\_url** variable. This variable contains the full url of the current page, so it is a good way to lock pages that aren't usually searchable. For example you have an app that lives at *my-store.myshopify.com/apps/bulk-order-form-app*, you could lock it with the following condition:

```
{% if canonical_url contains "apps/bulk-order-form-app" %}
```

***

Another useful variable is the **template** variable. For example, an easy way to lock *only* the home page would be:

```
{% if template == "index" %}
```

If your home page template is called something else, you have the flexibility to lock it by adjusting the condition above.

## The "Liquid prelude"

The "Liquid prelude" will be evaluated *before* the liquid condition, and is where you'll add any code that helps you set up the Liquid condition, and can span multiple lines. For example, you can assign to a specific custom variable, which can then be used the the Liquid condition later.

For example, if you have a large number of pages that you want to lock at once, normally you'd need to do that by creating a separate lock on each page. You could use the Liquid lock feature to lock them all at once. Perhaps something like the following:

In your Liquid **prelude**:

```



 
 
  
  
 
 



```

In your Liquid **condition**:

```
{% if page_is_locked %}
```

This would result in all "Pages" in your store that contain "member" or "secret" in the title becoming locked.

## Related resources

You can also create Liquid keys! While the function of Liquid keys is fundamentally different than what is covered on this page, the concepts while setting them up are very similar:

{% content-ref url="/pages/ve2JX4pz2jetN297ciB6" %}
[Custom Liquid key-condition basics](/keys/more/custom-liquid-key-condition-basics)
{% endcontent-ref %}

{% content-ref url="/pages/sr7kTFCzra9xHwxwqCNd" %}
[Locking multiple pages at once](/tutorials/more/locking-multiple-pages-at-once)
{% endcontent-ref %}


# Restricting checkout from the cart

How to use the Locksmith app to add checkout restrictions on your Shopify Online Store

Locksmith allows you to restrict checkout by using a lock on the cart page in your store. **This is a good choice for merchants who want to allow customers to view all content in their store and browse fully,** only adding in restrictions on the last page before checkout. Or, to simply add extra restrictions for checking out, on top of other locks in the store.

### **Limitations:**

* The method locks down the cart page only. The cart page is always found at the '.../cart' link in your store (e.g. [www.example-store.com/cart](http://www.example-store.com/cart)). Using other types of carts (slider, dropdown, dynamic/ajax, etc.) or adding "Buy Now" links to your store (which point the customer directly to checkout without going through the cart page) will not work with this method.
* Locking the checkout area itself is **not** possible using Locksmith’s standard locking methods. This means that checkout links leading directly to checkout—such as ‘Buy Now’ buttons, upsell links, permalinks, or abandoned cart links—cannot be restricted using this approach. However, you can enforce a single checkout restriction using Locksmith’s checkout validation feature. Learn more here: [Setting up checkout validation with Locksmith](/tutorials/more/setting-up-checkout-validation-with-locksmith)

\
Moving on, this is the checkout page without any locks in effect:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e731ab22c7d3a7e9ae96a46/file-LTWtPLdeVV.png)

You can lock the entire cart page if preferred. This will work just like any other Locksmith lock. However, it is also possible to take it further and lock only the "Check out" button. Once Locksmith is set up, the result will be something like one of these screenshots (depending on your settings):

![](/files/4Tn9CQxfZMcbLWyz4Ga9)

\------

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e7321942c7d3a7e9ae96a84/file-huM7dgYXcb.png)

## Part One: Creating the lock

Use the following steps

1\. Open up the Locksmith app and search and for "cart" and click on it, or select it after clicking into the search bar when it comes up in the search dropdown:

![](/files/XcoTy3r7PJXl7CnCkGP8)

2\. On the next page, under "Keys", you'll add in your conditions. Here are some of the more common conditions used...

**To impose a minimum purchase amount:**

<figure><img src="/files/Qia6iVPRqEbSnubUBzzg" alt=""><figcaption></figcaption></figure>

\
**To make sure only customers that are signed in and have approved accounts can proceed:**

<figure><img src="/files/G3hNG6MlqKmQLowZbJB3" alt=""><figcaption></figcaption></figure>

\
**Customer must enter a passcode to checkout:**

<figure><img src="/files/EFjnno5EViyQfd0emTvS" alt=""><figcaption></figcaption></figure>

\
3\. If you just want to lock the entire cart page, click "Save" to finish. If you want to lock *only* the "Checkout" button, make sure "enable manual locking" is checked under Advanced Settings before saving:

![](/files/L33CMyVWdNraB7AKCITV)

Done with part one!

If you need help with setting up more complicated checkout conditions, Locksmith may be able to help. Just get in touch with us :)

## Part two: Theme changes

{% hint style="success" %}
*New to manual locking?* [*Check out our general introduction*](/keys/more/manual-mode)*.*
{% endhint %}

Some modifications to your shop's theme will need to be done to protect just the checkout button.

{% hint style="info" %}
**Because each theme is a bit different, this feature&#x20;*****does*****&#x20;require manual coding.** If you install a new theme down the road, these changes will need to be re-applied.
{% endhint %}

The rest of this guide gets a bit technical! We can take care of adding the code for you for you, no problem, so if you're interested, get ahold of us.

#### **Rather do it yourself?** Keep reading...

In this portion, you'll update your shop's theme to protect *just* the checkout button(s) on your cart, allowing your visitors to manage their cart but not check out until they meet your criteria.

1. From your Shopify admin area, navigate to "Online Store" -> "Themes". Then, click the three-dots button in the upper-right corner for your theme, and select the "Edit HTML/CSS" option.
2. Open the "cart.liquid" file (under "Templates"). If you have a newer "sectioned" theme, you may actually need to edit the "cart-template.liquid" file (under "Sections")
3. Add the following to the very top of the file:`{% capture var %}{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject: cart %}{% endcapture %}{% if var == 'true' %}{% assign locksmith_access_granted = true %}{% else %}{% assign locksmith_access_granted = false %}{% endif %}`
4. Find the checkout submit button(s), and wrap this code with `{% if locksmith_access_granted %} ... {% endif %}` . You can also add an "else" section to show a message to anyone who's been prevented from checking out.Here's a pretty typical example:

Before:

```
<input type="submit" name="checkout" class="btn" value="{{ 'cart.general.checkout' | t }}">

{% if additional_checkout_buttons %}
  
 <div>
  {{ content_for_additional_checkout_buttons }}
 </div>
{% endif %}
```

After:

```
{% if locksmith_access_granted %}
  <input type="submit" name="checkout" class="btn" value="{{ 'cart.general.checkout' | t }}">

  {% if additional_checkout_buttons %}
    
 <div>
  {{ content_for_additional_checkout_buttons }}
 </div>
  {% endif %}
{% else %}
  <p>Please add at least $50 to your cart to check out.</p>
{% endif %}
```

Save the template, and you're done! :)

## Other considerations:

### Clearing the cart when a customer signs out:

{% hint style="info" %}
**Note:** The script used here isn't an officially supported Locksmith feature. The following is an example of a script that's commonly used to clear a customer's cart when they log out.
{% endhint %}

Some merchants set up their cart restrictions so that they only apply to certain signed-in customers and the exclusive products they have access to. In this case, it might be possible for customers to sign out to bypass these conditions once restricted products have been added to the cart. If that applies to you, consider ensuring that all products are removed from the cart when a customer signs out.

You can achieve this by adding the following JavaScript to your **layout/theme.liquid** file, just before the closing tag:

```
<script>
  $(document).on('click', 'a[href="/account/logout"]', function (e) {
    e.preventDefault();
    $.ajax({ method: 'POST', url: '/cart/clear.js' }).always(function () { window.location = '/account/logout'; });
  });
</script>
```

This will clear the cart when the logout button is pressed, preventing that workaround.

If this script doesn't work in your theme, your theme may not include jQuery libraries. To include those libraries, the following script can be added to an empty line right before the cart clearing script mentioned above.

```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
```

## A note about Abandoned Cart emails

If you have abandoned cart emails enabled on your shop, either through the built-in Shopify feature or an app, those emails may allow the customer to circumvent checkout restrictions.

These emails can send the customer directly to the checkout process without touching the cart page. The customer will be able to check out with whatever amount was in the abandoned cart, whether or not it passes your restrictions.

**Your checkout restrictions will not work 100% of the time if you're sending abandoned cart emails***,* so keep that in mind when you're setting this up. :)


# Confirmation key condition

Ask for a simple confirmation before granting access to content in your Shopify Online Store sales channel.

This is a straightforward key condition that allows access solely based on if the customer confirms the prompt that you set. Something like the following:

<figure><img src="/files/suRclfgtXD0jUgZDJpPm" alt=""><figcaption></figcaption></figure>

To use, simply choose the key condition labelled "Permit if the customer confirms the promp&#x74;*":*

<figure><img src="/files/WZZEUs588D62FQTjsSnz" alt=""><figcaption><p>Choose the condition from the list, or type "confirm" - which will filter the list to only show the confirmation condition.</p></figcaption></figure>

## Set the desired prompt

Common use-cases/examples include:

* Please confirm that you are over the age of 21
* By clicking 'Yes', you agree to our Terms of Service for accessing this page
* Confirm if you have read the prerequisite material to access this advanced module
* Please confirm that you have not experienced any recent health complications that could prevent you from fully engaging with this experience
* etc

Any message that you decide to use can be added directly to the **Messages** area:

<figure><img src="/files/voyYVpdYtxmzRFENftTT" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can also add messages directly to the condition setup if you need unique messages per condition. Or, you can set default messages the **Settings > Messages** area of the Locksmith app, and leave Lock > Messages blank to use it.
{% endhint %}

## Changing the button text

If you need to use something other than "Confirm" as your button text, this is done through your theme.<br>

1. Go to Online Store > Themes > "Edit default theme content". [More info on that, from Shopify, here](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/language/change-wording).
2. Find the Locksmith tab, and edit the button as needed:

<figure><img src="/files/aQbAJNSwkKOv6ZlrI4PY" alt=""><figcaption></figcaption></figure>

## Adding text after the button

If you want to add text that shows up *after* the button, simply use `{{ locksmith_confirmation_form }}` to denote where the form will show up. Then add more text as desired:

<figure><img src="/files/HIFFxkKYnImG48bTajJP" alt=""><figcaption></figcaption></figure>

This results in the following, when Locksmith renders the prompt on button for your visitors:

<figure><img src="/files/fWgGuP9nfELKtKSnRzZP" alt=""><figcaption></figcaption></figure>

## Including other form types

If you have multiple key condition types on the same lock, it might be useful to include other form types within the prompt, so that they display on the same page. We have a guide on doing this here:

{% content-ref url="/pages/ThvKsaJtKXtdZ5y5612d" %}
[Showing multiple prompts on the same page](/tutorials/more/showing-multiple-prompts-on-the-same-page)
{% endcontent-ref %}

## Translations

You'll need to follow the regular workflow for translating anything in your theme. To get started with that, you'll likely want to use [Shopify's free Translate and Adapt app](https://apps.shopify.com/translate-and-adapt), or one of the paid apps from the app store. [More info on this, from Shopify, here](https://help.shopify.com/en/manual/markets/languages/translate-adapt-app).

Once you have a language/locale/translation set up for your theme, you'll see a Locksmith > "Confirmation button text" area which you can edit as needed, for each of your languages. In the Translate and Adapt app, that looks like this:

<figure><img src="/files/dQpdZlUjbq3rlzpsc53F" alt=""><figcaption></figcaption></figure>

To add translatable messages to the input prompt, check out or guide here:

{% content-ref url="/pages/aP8lIk1Bb966HCf6shyh" %}
[Adding translations to your Locksmith messages](/tutorials/more/adding-translations-to-your-locksmith-messages)
{% endcontent-ref %}


# Restricting customers to a specific collection

With Locksmith, it is simple to lock down a specific collection, so that it can only be viewed by a specific set of customers. However, some merchants want to take it one step further and make sure that those customers can *only* access their collection, while the rest of the store is restricted to them.

### Part 1: Create the collection lock

Add a lock to the collection that you want these customers to access. Use the search bar in Locksmith to search for the collection by name:<br>

<figure><img src="/files/PrCEMygPGiPEIuNOkELZ" alt=""><figcaption></figcaption></figure>

Under "Keys", choose how these customers will gain access. You can use whatever method of access you want. The most common way of granting access in this scenario is to use "customer tags" to grant access:

<figure><img src="/files/JZgxs3arW0ZBQmDYmzhq" alt=""><figcaption></figcaption></figure>

Make sure the "Force open other locks" setting is turned on for this lock. Use the following guide to do this: [Using the "Force open other locks" setting](/keys/more/using-the-force-open-other-locks-setting) . **This setting is important.**

<figure><img src="/files/kVXUPm4ubMlSOHI6cMe9" alt=""><figcaption></figcaption></figure>

### Part 2: Create a lock covering the rest of the store

In order to make sure that these customers can't see the rest of your store, you need to actually add a lock to your "entire store":

![](/files/verEhuBwLx6iYx2dkTJG)

For your key condition, you need to use the "invert" option to obtain the opposite of the first key condition:

<figure><img src="/files/mriU5gixtHQVZxiNdzee" alt=""><figcaption><p>The invert option in the context of the rest of the key condition settings.</p></figcaption></figure>

Use the guide here if you need more guidance on how to invert your key condition:

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
{% endcontent-ref %}

{% hint style="info" %}
If this is a private collection, no further action necessary. If the collection is meant to be viewed by all customers, you'll also want to use the ["force open other locks](/keys/more/using-the-force-open-other-locks-setting)" setting on the lock for the entire store.
{% endhint %}


# Passcode-specific redirects

It's possible to use Locksmith's passcode keys to redirect visitors to specific URLs, based on which passcode they enter. Using this technique, a single page (or other locked resource) can act as a kind of switching station, pointing visitors to the content that's appropriate for them.

To accomplish this, set up multiple passcode keys, each one having a distinct passcode value. Then, for each key, use the triple-dot menu on the right to set a redirect URL, sending the visitor to the appropriate destination when they enter that passcode.

A demonstration:

{% embed url="<https://www.loom.com/share/26e5e838ae3646088dbab844f7604421>" %}

{% hint style="warning" %}
If you enter the same URL for the redirect as any of the lock's contents, then when a customer uses that key, the result will be an infinite loop. To prevent this from happening, you'll want to avoid adding redirect links to pages that are covered by the same lock.
{% endhint %}

## Related articles

{% embed url="<https://www.locksmith.guide/tutorials/more/redirecting-using-locksmith>" fullWidth="false" %}

{% embed url="<https://www.locksmith.guide/keys/passcode-keys>" %}


# Grow your subscriber lists with Klaviyo

Locksmith allows you to present your customers with a form to subscribe to a Klaviyo email list, which the customer must enter before they gain access to the locked content:

<div data-full-width="false"><figure><img src="/files/UjKaDHz6D7XuZwFLHGgx" alt=""><figcaption></figcaption></figure></div>

## Setup

To get started, create a new lock or navigate to the lock you'd like to use, then add the key condition labelled "if the customer subscribes to a Klaviyo list".

<figure><img src="/files/CGu15Gilysig0W93pYXa" alt=""><figcaption><p>You can optionally filter the list by typing "klaviyo" as the filter.</p></figcaption></figure>

{% hint style="info" %}
You'll notice that Locksmith also supports *only* checking if a customer is already on a list (as opposed to subscribing them). This is a separate key condition, and it also supports checking segments! [We have a dedicated guide on that here](/tutorials/more/use-a-klaviyo-list-or-segment-as-an-access-control-list).
{% endhint %}

You'll need to create a Klaviyo API key and give it to Locksmith (see below). Once you do that, you'll be presented with your Klaviyo lists, and you'll be able to choose which one to use like so:

<figure><img src="/files/TkRY8xYu3AbzW2svIMdx" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
As noted within the key condition setup, Klaviyo has their own policies regarding double opt in, and it is typically enabled by default. This setting is adjusted in your Klaviyo dashboard - it is not a setting that is controlled by Locksmith.
{% endhint %}

### Klaviyo API Access

The first time you select this, Locksmith will prompt you for a Klaviyo API key:

<figure><img src="/files/5mhHxxmZovzEvs8sgrRF" alt=""><figcaption></figcaption></figure>

In your Klaviyo dashboard, go to Settings > Account > API Keys. You can also use the "from your Klaviyo account" link within Locksmith to go directly there:

<figure><img src="/files/ugAcTd9EGnW8U77S5XmD" alt=""><figcaption></figcaption></figure>

Click the "Create Private API Key" button to create a key for Locksmith. You'll see the new key on the next screen.

The scopes that Locksmith needs *full access* to from the Klaviyo API key are "List", "Profiles", "Segments", and "Subscriptions":

<figure><img src="/files/hLtPf0o3pE0xePcnOppb" alt=""><figcaption></figcaption></figure>

Copy the API key:

<figure><img src="/files/KIB9R0tAw2gj9BFJVvzT" alt=""><figcaption></figcaption></figure>

Then, head back to Locksmith, where you'll be able to paste in the key. Click "Continue", and Locksmith will present you with a list of Klaviyo lists, to which your new subscribers will be saved.

Once your Locksmith configuration is to your liking, hit the "Save" button. From here on out, new visitors to your locked resource will be required to subscribe before proceeding.

{% hint style="info" %}
**Note**: any customers who are already in your list will be seamlessly granted access when they enter their email address, and will not be added as a duplicate.
{% endhint %}

## Related articles:

{% content-ref url="/pages/9OqKmRBcX77ody3p6kr5" %}
[Customizing the email list signup form](/tutorials/more/customizing-the-email-list-signup-form)
{% endcontent-ref %}

{% content-ref url="/pages/77iwUv68N0neEBD4ZfM9" %}
[Use a Klaviyo list or segment as an access control list](/tutorials/more/use-a-klaviyo-list-or-segment-as-an-access-control-list)
{% endcontent-ref %}

{% content-ref url="/pages/eG56o6Uu6VtxcgDbdhwU" %}
[Newsletter keys](/keys/more/newsletter-keys)
{% endcontent-ref %}


# Use a Klaviyo list or segment as an access control list

Locksmith allows you to use an already-existing Klaviyo list or segment to determine who gets access to your locked content.

The "Klaviyo member" key condition in Locksmith can check your Klaviyo lists or segments directly, to see if the current visitor should have access, and will grant or deny access accordingly.

To set this up, choose the key condition labelled "if the customer is a member of a Klaviyo list or segment":

<figure><img src="/files/UWr1Xw92gydfobcp1Xo8" alt=""><figcaption><p>Optional: Use the filter box and type "klaviyo" for quick access.</p></figcaption></figure>

{% hint style="info" %}
Please note that this particular key condition does NOT subscribe new members, but you'll notice in the screenshot above that Locksmith *also* has a key condition for subscribing new members. [More information on that here](/tutorials/more/klaviyo).
{% endhint %}

## API Key access

The first time you access one of our Klaviyo key conditions, you'll need to set up Locksmith's API access to your Klaviyo account. This is covered in detail in our guide here:

[Grow your subscriber lists with Klaviyo](/tutorials/more/klaviyo#klaviyo-api-access)

However, one IMPORTANT detail is, if you are using segments, you need to make sure that your API Key also grants permissions for segments, in addition to the other requirements. So - just to be clear - if you are using segments, you should have an API key that grants "Full access" to:

* Lists
* Profiles
* Segments
* Subscriptions

<figure><img src="/files/hLtPf0o3pE0xePcnOppb" alt=""><figcaption></figcaption></figure>

## Setup

Take note of these settings:

<div align="left"><figure><img src="/files/6yVMDK5piLQErREiNdty" alt=""><figcaption></figcaption></figure></div>

### List or segment

You can choose between a list or a segment. They function the same in practice, in that Locksmith asks Klaviyo directly whether or not the supplied email address is on the list or segment

### "Only check signed-in customers" setting

This setting changes the behavior of this key condition significantly!

If left off (the default), Locksmith will prompt the visitor to enter their email address. The email address is the ONLY thing the customer needs to enter in this case, there is no requirement to sign in. This is what that would look like in your storefront:

<div align="left"><figure><img src="/files/eAdP5OLe2qxee9dUTl4A" alt=""><figcaption><p>This is the default input prompt message displayed to customers, but - like all of our default message prompt - can be customized as needed.</p></figcaption></figure></div>

If turned ON, customers will be required to sign in. Then, once signed in, Locksmith will either grant or deny access depending on if the customer is found in the configured list or segment. Here is an example of Locksmith's sign in page:

<div align="left" data-full-width="false"><figure><img src="/files/NJn53gS6TQHxhzBBtacb" alt=""><figcaption><p>The login button in this case brings the customer to the customer sign in page for your store. If you are using Shopify's Legacy customer account system, the customer will instead be presented with the entire customer login form right on the page.</p></figcaption></figure></div>

{% hint style="info" %}
**Tip**: Have multiple Klaviyo lists that you want to check? You can add separate keys to represent each list you'd like to check. To do this, after creating your first key and closing the configuration popup, click the "+ Add another key" button, and you can do it all over again, selecting a different Klaviyo list.
{% endhint %}


# Use Mailchimp to collect customer emails

Mailchimp is a great way to stay in touch with your customers (and it's free!).

Connecting it to your Locksmith account lets you grow your mailing list subscription base, by making sure your visitors' email addresses are on record.

{% hint style="info" %}
Mailchimp has their own policies regarding double opt in, and it is typically enabled by default. This setting is adjusted in your Mailchimp dashboard - it is not a setting that is controlled by Locksmith.
{% endhint %}

To try it out, use these steps:

1. If you haven't yet, create your free Mailchimp account at [mailchimp.com](http://mailchimp.com/), and create at least one mailing list - this list is where Locksmith will load in your visitors' email addresses.
2. [Create a lock](/basics/creating-locks)
3. On the lock page, under "Keys" choose the "Mailchimp" key condition from the list:

![](/files/y7HewVppqP6c6xVjwIzD)

4\. In that key, click on "Connect Mailchimp" and sign into your mailchimp account. You'll be prompted to close that window when done.

5\. Choose your Mailchimp list, click off the pop-up, and then click Save.

Visitors who try to access your locked content will encounter a prompt to subscribe to your mailing list, and the email addresses they submit will be loaded into your Mailchimp account.

### Tips

* For a brand-new mailing list, it can take a few minutes for new email addresses to appear in your Mailchimp account.
* Mailchimp will not show subscribers in your admin panel if you have any required fields besides "Email Address". Check on this by opening your list in Mailchimp, then heading to "Settings" -> "List fields and \*|MERGE|\* tags".
* To make it easy to see your subscribers that arrive through Locksmith, create a "Locksmith" segment for your list. Do this by opening your list in Mailchimp, then heading to "Manage subscribers" -> "Segments". Click "Create Segment", and set up your segment like so:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859404286364bc9436ea/5e2785946ae6a.png)

Hit the "Preview" button, then on the next screen click "Save as segment".


# Hiding out-of-stock products

The best way to hide out-of-stock products is to create a automated collection *containing* these products, which is then protected with Locksmith.

*For more automation options around out-of-stock products,* [*see Mechanic's "out of stock" task library*](https://usemechanic.com/tasks/out%20of%20stock)*.*

### 1. Create an "out-of-stock" collection

In the "Collections" area of the Shopify admin, create a new collection. Under "Collection type", select the "Automated" option, and configure its conditions such that products match an inventory stock level of less than 1. Save the collection. The result: a collection that *only* contains products that have been sold out.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f0875842c7d3a10cbaa5a33/file-x1vszFO64Q.png)

### 2. Lock the collection

Open up Locksmith, and use the "New lock" form on its homepage to search for your new collection, using the collection title that you specified earlier.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f0876c12c7d3a10cbaa5a55/file-2K3Clfssna.png)

Click on the matching collection, and follow the steps to save its new lock.

On the next screen, update the lock's settings so that "Hide this collection and its products" is enabled.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f08771604286306f8068020/file-mqhvLzaCZW.png)

Save your settings. You're done! The result: this collection, and its products (representing all out-of-stock products in your store) are now fully hidden from visitors.


# How to use a private browsing session

When testing Locksmith configurations, it's frequently useful to open a private browsing session, thus guaranteeing that neither Locksmith nor Shopify will remember any of your previous activity, giving you a clean slate to test with.

{% hint style="warning" %}
**Important:** If you're using a URL with the `shopifypreview.com` domain to test, Locksmith changes won't appear there.

The Shopify theme editor's built-in preview bypasses Locksmith entirely. Locks, keys, and any manual locking code can look like they are not in place.

If you're testing your published theme, open the live storefront URL in a new private browsing window.

If you're testing an unpublished theme, use the preview URL that includes `?fts=0&preview_theme_id=` followed by your theme ID, as described in [Testing Locksmith on unpublished themes](https://www.locksmith.guide/tutorials/more/testing-locksmith-on-unpublished-themes).
{% endhint %}

All major web browsers support private browsing. Here's how to start a session, in each browser:

* Google Chrome: File → New Incognito Window (Ctrl+Shift+N, or Command+Shift+N)
* Safari: File → New Private Window (Command+Shift+N)
* Firefox: File → New Private Window (Ctrl+Shift+P, or Command+Shift+P)
* Microsoft Edge: File → New InPrivate Window (Ctrl+Shift+N, or Command+Shift+N)

For more information, from the sources, on how to use "private session" (sometimes called an incognito window), use the following links:

* [Chrome (desktop & mobile)](https://support.google.com/chrome/answer/95464)
* [Safari on Mac](https://support.apple.com/guide/safari/browse-in-private-ibrw1069/mac)
* [Safari on iOS](https://support.apple.com/en-us/HT203036)
* [Firefox (desktop)](https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history)
* [Firefox (mobile)](https://support.mozilla.org/en-US/kb/private-browsing-firefox-android)
* [Edge (desktop & mobile)](https://support.microsoft.com/en-us/microsoft-edge/browse-inprivate-in-microsoft-edge-cd2c9a48-0bc4-b98e-5e46-ac40c84e27e2)


# Granting access to variants by visitor input

Locksmith's variant locking feature results in automatic hiding of variants that the visitor doesn't have access to. If you're using keys that are based on things that don't require customer input (say, "permit if the customer is signed in"), then revealing those variants is automatic: if the customer qualifies, the variants appear.

If you're using keys that require visitor input, like passcodes or email addresses, then an intermediate step needs to be added to the customer experience, allowing them to actually *enter* their information. This doesn't happen automatically, and without it, the visitor won't have a way of accessing the hidden variants.

## Setup

### 1. Create a dedicated "sign in" page

In the Shopify admin area, head to the "Online Store" section, and open up your "Pages" list. Create a page that's just for customers who are shopping the particular variant(s) that you want to help them unlock. Add menu links to this page, if necessary and where appropriate.

### 2. Lock the page

Back in Locksmith, search for the page, and create a lock for it.

### 3. Add a passcode key to the page lock, using the same passcode as your variant lock

Here's where it comes together: by adding a passcode key that uses *the same* passcode as your variants, the customer's successful passcode entry *here* will result in the variant locks automatically opening, because they'll register the presence of the same passcode.

A bonus, if you're using multiple variant locks: Because locks can have multiple keys, there's an opportunity here for you to add multiple passcode keys here, one for each of the different variant locks you've got. This is a useful strategy if you're preparing variants for separate audiences - this allows you to have a single "sign in" page, where everyone can gain access to their respective variants.

### 4. Optional: configure the key to redirect to your product

If you like, use the key's advanced settings to add an automatic redirect, routing the customer to the right product page when they enter the right passcode. You can find this setting by clicking the triple-dot icon, to the right of the key condition.

As noted in step 3, this *also* works with multiple passcode keys. Simply add the right redirect to each passcode key, and the customers will be routed to the right place after entering their passcode.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f8a4847cff47e001a58f678/file-1ODFjAHu83.png)


# Offering different variants by postal code

In this tutorial, we'll talk about configuring a Shopify store to...

* Prompt the visitor to enter their postal code upon arrival
* Only display variants that have their "Postal code" option set to equal the postal code that the visitor entered

To do this, we'll use a series of variant locks, and one shop lock. We'll also use passcode key conditions, leveraging the ability to use a single passcode entry to activate many passcode keys at once.

### Demo store

We've set up a store that contains a couple of sample products, with a handful of supported postal codes.

[View demo store](https://locksmith-demo-postal-code-variants.myshopify.com/) (password: locksmith)

### Instructions

#### 1. Configure your product variants

For each of your products, add an option labeled "Postal code". Add one variant for each postal code that you want to support.

In the demo store linked above, here's how the variants are displayed in Shopify, for one of the sample product:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875a97c9e77c0016217dc2/file-Emom5NTJnc.png)

#### 2. Lock each variant option

Open the Locksmith app. Using Locksmith's search box, locate each variant option, one at a time:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875afb52faff0016aeff5d/file-k2wckdQsWW.png)

Select the matching item, and continue to save the lock.

On the next screen, add a passcode key, setting the passcode to the same value as the postal code:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875b8746e0fb001798d091/file-PaiQiFP0P9.gif)

Save the lock.

Repeat for each of your postal codes, resulting in one lock per postal code variant option.

#### 3. Create a lock for the entire online storefront

Back on the home screen of Locksmith, use the "Add lock" form to create a lock that covers the entire online store.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875c3dcff47e001a58e791/file-AZ8KcONBXO.gif)

On the next screen, add a key that permits if the visitor enters one of many passcodes. Configure the passcode list to contain each of the postal codes that you support.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875c684cedfd0017dd1cbb/file-EcVyTp3SId.gif)

#### 4. Test! :)

You're done! When visitors arrive at your online store, they'll be prompted to enter their postal code. If it's one of the codes on your list, Locksmith will let them in, and will now only show them variants that match the postal code they entered.

Your final Locksmith locks list should look something like this:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f875d4b46e0fb001798d09c/file-T7lHKJc0yH.png)

To try out the customer side of this, see the demo store linked at the beginning of this article.


# Locking products by tag

Locksmith won't lock by tag using the Locksmith search bar. The good news is that you can make this happen with a [smart collection in Shopify](https://help.shopify.com/en/manual/products/collections/smart-collections).

1\. In your Shopify Admin, click on *Products* then *Collections*

*2.* In the upper right, click Create Collection

3\. Name your collection something relevant, and then scroll down and click on the "Smart" option for the collection.

4\. In the conditions area, choose "Product Tag... is equal to" and then add your product tag into that field:

![](/files/b7sTacCSzKLLgKLBEw5G)

5\. Click Save.

Once that's done, search for your new collection by name in the Locksmith search bar, and lock it that way. You'll likely want to enable the "hide from search and lists" option on that collection lock.

Any time you tag a new product with that tag, it'll automatically be in that collection and therefore locked by Locksmith. :)

#### "What happens in the other collections that these products are in?"

Once you create your collection lock, you'll be presented with these options:

![](/files/C2Bn3esGa4HX2ncGdmh7)

The highlighted "Hide from lists" option here controls whether or not the tagged (and therefore locked) products will appear elsewhere. With the option enabled, Locksmith will automatically hide these products (unless the customer is already qualified for access). In that scenario, the customer *will* be able to see the products in your other collections – they won't be prompted for access until they click through to an individual product. With the option *disabled*, the products will remain visible in your other collections. (Note that the customer will still be prompted for access when they click through to a product, even in this scenario.)


# Locking multiple pages at once

{% hint style="success" %}
**The simplest option first:** if you just want to protect a specific, known set of pages, you don't need any code. Create a lock on one page, then use the **Protected resources** section of the lock editor to **add the other pages** to the same lock. See [Creating locks → Protecting multiple resources with one lock](/basics/creating-locks#protecting-multiple-resources-with-one-lock).

The Liquid approaches below are still useful when you want pages to be locked by a *rule* — e.g. every page whose title contains a word, every page using a certain template, or every page carrying a metafield — so that pages added in the future are locked automatically without editing the lock.
{% endhint %}

Because Shopify doesn't provide any way to group pages (in the way that collections work for products), we need to get down to the code level in order to lock pages by a rule, or to protect a large or changing set of pages automatically.

To get started, you'll need to begin a "Liquid lock:

{% content-ref url="/pages/kDZqJC3FEIXwGvqQNR5J" %}
[Liquid locking basics](/tutorials/more/liquid-locking-basics)
{% endcontent-ref %}

## Lock all pages containing a certain word:

To lock all pages containing a certain word in the title, fill out the Liquid lock form like so:

![](/files/ukriDLaSjfHbXkZmmCFl)

Example code for "Liquid condition" from above image:

```
page and page.title contains "MEMBERS"
```

Submit the form to create your lock, then proceed by configuring keys as appropriate.

## Lock all pages that use a certain custom template:

To lock all pages that use a certain custom template, use this:

![](/files/vtaBr05wsrhELPfHCBEk)

Example code for "Liquid condition" from above image:

```
page and page.template_suffix == "preview"
```

Submit the form to create your lock, then proceed by configuring keys as appropriate.

## Lock a list of pages by page handle:

To lock a list of pages based on page handles using one lock:

<figure><img src="/files/CQyxFHfg8RjP7p2elm5q" alt=""><figcaption></figcaption></figure>

To list pages handles that you would like to lock, you can do that by listing each handle in the "Liquid prelude" field where the "page\_handles" variable is defined (see image below).

<figure><img src="/files/KlbihEN41tVUsJCQSpXa" alt=""><figcaption></figcaption></figure>

You can replace "first-handle,second-handle,third-handle" with your own handles and list additional handles by adding a comma "," between each handle with no spaces.

**Liquid condition:**

Example code for the "Liquid condition" from above image:

```
page_is_locked
```

**Liquid prelude:**

Example code for the "Liquid prelude" from above image:

```
{% assign page_is_locked = false %}
{% assign page_handles = "first-handle,second-handle,third-handle" | split: "," %}
{% if scope == "page" and page_handles contains page.handle %}
  {% assign page_is_locked = true %}
{% endif %}
```

Submit the form to create your lock, then proceed by configuring keys as appropriate.

## Lock pages using a metafield

If your pages don't share a common word in the title, don't use a shared custom template, and you'd rather not maintain a long list of page handles, you can use a [**page metafield**](https://help.shopify.com/en/manual/custom-data/metafields) to control which pages are locked. This approach is especially useful when you have a large number of pages built with different templates or page builders.

**The idea:** create a custom metafield on your pages, and then create a single Liquid lock that checks whether that metafield has a value. Any page where the metafield is populated will be locked automatically.

#### Step 1: Create a page metafield definition in Shopify

1. In your Shopify admin, go to **Settings > Custom data > Pages**.
2. Click **Add definition**.
3. Give it a name (for example, `locksmith_locked`) and set the type to **Single line text**.
4. Save the definition.

#### Step 2: Set the metafield value on pages you want to lock

1. Open each page you want to lock in the Shopify admin.
2. Scroll down to the **Metafields** section at the bottom of the page editor.
3. Enter any value in your new metafield — it can be anything, such as `locked`, `true`, or a tag name. The important thing is that it's not blank.
4. Save the page.

{% hint style="info" %}
**Tip:** Shopify's built-in bulk editor does *not* currently support pages, so metafield values need to be set on each page individually through the Shopify admin. If you have a large number of pages to update, a metafield management app from the Shopify App Store or the Shopify API can help speed this up — though both options fall outside the scope of Locksmith support and may require a developer.
{% endhint %}

#### Step 3: Create the Liquid lock

Follow the steps in our [Liquid locking basics](https://www.locksmith.guide/tutorials/more/liquid-locking-basics) guide to begin creating a Liquid lock, and fill in the fields as follows:

**Liquid condition:**

```
page and page.metafields.custom.locksmith_locked != blank
```

<figure><img src="/files/bPiES61dElI3YFUACWe6" alt=""><figcaption></figcaption></figure>

\
No Liquid prelude is needed for this approach.

Submit the form to create your lock, then proceed by configuring keys as appropriate.

#### How it works

This lock checks two things: that the current page is a page (not a product, collection, etc.), and that the page has a non-blank value in the `custom.locksmith_locked` metafield. If both are true, the page is locked.

To lock a new page in the future, you just set the metafield value on that page — no need to edit the lock itself. To unlock a page, clear the metafield value.

#### Optional: Use the metafield value as part of your key logic

You can take this a step further by putting a **customer tag name** in the metafield value (for example, setting the metafield to `vip` on one group of pages and `members` on another). This opens up the possibility of using the metafield value in more advanced Liquid key conditions, allowing different groups of pages to require different access levels — all within a single lock. This kind of setup falls into advanced Liquid territory and may require a developer to implement.

## Additional notes:

If you'd like to use something other than the title or template to activate this lock, take a look at [Shopify's Liquid documentation for pages](https://docs.shopify.com/themes/liquid/objects/page) - you can adapt your custom lock for any of the page attributes listed there.

## Related articles

{% content-ref url="/pages/kDZqJC3FEIXwGvqQNR5J" %}
[Liquid locking basics](/tutorials/more/liquid-locking-basics)
{% endcontent-ref %}


# Making a product accessible exclusively from the direct product link

This can be useful for merchants that don't need a product to be "secure", but still want to keep customers from finding the product by accident.

Locksmith also has a *secret* link feature, which is more heavily used and different than what this guide describes. The secret link feature is more secure. If you are looking for that, simply use the key condition labelled "Permit if customer arrives from the secret link" when setting up your key. If not, read on...\
\
Use the following steps:

1. Create a lock on the product in question - to do so, open Locksmith app and search for a product by name.
2. On the next page, under Keys, select the "(custom Liquid)" condition
3. Paste `template == "product"` into the "Liquid condition" box
4. Make sure the "hide this product from search results and other lists" option is checked!

<figure><img src="/files/lDzqFouTgBATRB58jZ89" alt=""><figcaption></figcaption></figure>

You're done :)

{% hint style="info" %}
**Note**: This technique can be used with other types of resources such as Pages, Collections, Articles, Blogs, etc. You'd just substitute the correct template name in your Liquid condition.
{% endhint %}

If this technique isn't working, it's possible that your theme uses a non-standard template name (other than "product"). To fix this, just update "product" in the lock to whatever your theme uses.

#### If you would like more information on Liquid key conditions, checkout the guide linked below.

{% content-ref url="/pages/ve2JX4pz2jetN297ciB6" %}
[Custom Liquid key-condition basics](/keys/more/custom-liquid-key-condition-basics)
{% endcontent-ref %}

## Something else not covered here?

Let us know by emailing us at: **<team@uselocksmith.com>**


# Creating private team areas

Locksmith can be used to create separate areas of your store for different teams, clubs, vendors, organizations, or other groups. These areas are intended to be private, only for the eyes of those members. This guide also applies even if there is only a single customer that should gain access to each area.

To summarize, you will create a landing page that you can link all of your customers to, and then use Locksmith to lock down and redirect customers to their own content. The rest of the guide explains, in greater detail, how to do all of this.

{% hint style="warning" %}
**The setup for this can become involved**, particularly if you have a large number of groups that you want to set this up for. Before you go all in with setting this up, it might be best to follow the steps in this guide for just one or two groups, that way you can more quickly get a feel for how this will work for your store.
{% endhint %}

## Step 1: Create the content for each group

For each group, create the collection of products that applies to them. Or, if you prefer that your customers are redirected to a single product, or some other page, you can use those instead.

## Step 2: Create the landing page

This can just be a regular Shopify Page, more info on that here:\
\
<https://help.shopify.com/en/manual/online-store/themes/theme-structure/pages>

Call it whatever makes sense for you. You don't have to actually add any content to the page, since customers will be immediately redirected away from this page.

**Optional: Add a link to this page to your navigation menu**. This is how customers will find their content. Label the link whatever applies to your store, such as "Shop", or "Your collection", or "Member area", etc. If you do not add a link to your navigation menu, you will need to have another method of making sure your customers find, or are sent, the link to your landing page.

## Step 3: Decide how you want to grant access

While it is possible to use almost any of Locksmith's key condition types for this ([complete list here](https://www.locksmith.guide/basics/creating-keys)), there are two common types for determining access:

* Customer tags ([more info here](https://www.locksmith.guide/keys/customer-account-keys))
* Passcodes ([more info here](https://www.locksmith.guide/keys/passcode-keys))

## Step 4: Add the lock and keys to your landing page

1. [Create a Locksmith lock](https://www.locksmith.guide/basics/creating-locks) directly on your landing page.
2. For each of your customer groups, add a matching key that grants access *to this landing page* (we'll create the individual collection locks in the next step). This key should define how you want customers to ultimately gain access to their collection - **so whatever you chose in step 3.**
3. For each of the keys that you create, use Locksmith's redirect feature to redirect customer to the actual collection that you are granting access to. You can set up a redirect directly within the key settings, when creating a key. Simple use the input labelled "Redirect URL". [More info on redirecting with Locksmith here](https://www.locksmith.guide/tutorials/more/redirecting-using-locksmith#redirecting-customers-after-theyve-gained-access).

## Step 5: Add the locks and keys to each of your collections

For each of your collections, add a lock to it and add a key that defines how you want customers to gain access. **This key should match whatever key you used in Step 4.** Except, of course, leave out the redirect on this one.

***

Once you follow those steps, you will end up with a landing page that redirects customers to their own content. The redirect will happen after the customer has gained access via signing in or giving the passcode (or whatever access method you've chosen).

Feel free to contact Locksmith support at **<team@uselocksmith.com>** for any questions regarding this.


# Importing customers in bulk

{% hint style="info" %}
Just a quick note: **Locksmith does not create a separate database of customers**. Any customers that you import here are imported as regular Shopify customers and will appear in your Shopify [Customers area](https://help.shopify.com/en/manual/customers/manage-customers). Our bulk import is simply an additional tool with a couple extra options to create/import customers.
{% endhint %}

To get started using Locksmith's Customers area, use the "Customers" button, found in the footer navigation on any page of the app:

<figure><img src="/files/OGjlFrOSFVNtlpoMCLO7" alt=""><figcaption></figcaption></figure>

There are two options for importing your customers: using a plain list of email addresses, or by loading in a CSV file that you create with your spreadsheet application.

## Importing using email addresses

The only thing you'll need: a list of emails to be used, one per line(or separated by a space).

You'll also see options to:

* add one or more **customer tags** to each customer that's created (useful for pre-approving wholesale accounts, for example)
* set an **account password** (which would allow your customers to sign in immediately, using that password).

If you'd like to customize which tags or what password is used *per customer*, try using a CSV instead - read on!

## Importing using a CSV

For the most flexibility, set up your customer records in your spreadsheet application (like Excel, Google Sheets), and load it into Locksmith for a bulk import:

### Supported column names

*All columns are optional, unless noted.*

* Email (required!)
* First name
* Last name
* Accepts marketing (can be "true" or "false")
* Note
* Tags (comma-delimited)
* Password
* etc...

Since this information is just forwarded to your Shopify store, you'll be using the same format that Shopify uses. For more complete information on CSV files for Shopify customers (and what other columns are available), [check out this page](https://help.shopify.com/en/manual/customers/import-export-customers).

## Results

Locksmith will give you a preview of the customers to be imported:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859a2c7d3a7e9ae68e67/5e27859a2876c.png)

And after you click the "Start Import" button at the bottom of the page, you'll see the results:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859a04286364bc9436f4/5e27859a995e5.png)

In addition to skipping any invalid e-mails, you'll notice that Locksmith will also automatically skip any emails that already have a customer account, and it'll let you know which ones it skipped.

**For questions, get ahold of us via email at <team@uselocksmith.com>**


# Disabling Locksmith for certain theme files

How to tell Locksmith to completely ignore specific files in your theme

Locksmith does its work by adding its code to your theme's files. Sometimes you may want to keep Locksmith from modifying a file in particular, whether it's for a customization, or some other reason.

To support this, Locksmith has a "Liquid assets to ignore" option. Configure it like so:

1. From within the Locksmith application, click "Settings".
2. Scroll to the bottom of the screen to the "Advanced" section.
3. For each Liquid asset you'd like to have Locksmith ignore, add its filename to the "Liquid asset blacklist" box.

That will look like this:

![](/files/Kh7TMFhCWwsdIumJS426)

{% hint style="info" %}
**Note**: Use full file names. (e.g. "sections/collection-list.liquid" or "templates/gift\_card.liquid"), and enter them **one per line**.
{% endhint %}

**Please note:** If you need to use the ignore list because Locksmith is causing unexpected problems with your theme, please let us know! Feel free to use the ignore list for any purpose, but do get in touch at <team@uselocksmith.com> if there's a bug we can help resolve. :)


# Adding translations to your Locksmith messages

This guide shows you how to use the translation filter built into Liquid to simplify translating your Locksmith messages

## Step 1 - Edit your Locksmith message

Start by adding something like the following to one of your Locksmith messages. [More info on Locksmith messages here](/tutorials/more/customizing-messages). You can use whatever keys you like, as long as it's prefixed with **locksmith:**

```
{{ "locksmith.foo.bar" | t }}
```

Make sure to include the quotes. In the app that looks like this:

<figure><img src="/files/6sMeVsy9BZbbTCUoaSZG" alt=""><figcaption><p>Any Liquid or HTML code will still be rendered as normal, so add as much of that as you need.</p></figcaption></figure>

**Saving a lock with any messages that contain the above formatting will trigger a Locksmith update** which will automatically edit (all of) the locale files in your theme so that they include a new editable and translatable attribute. This is an example of what that might look like from within the locale files in your theme:

<figure><img src="/files/7smR6Muq3EnEc90MK9yD" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can add this to any of Locksmith's messages, including the access denied content, guest message content, passcode prompt, etc.
{% endhint %}

## Step 2 - Adding the translations to your theme and locales

#### Default locale theme content

You can immediately open Online Store > Themes > "Edit default theme content" to edit what is shown there for your default language. If you're not sure how to edit the default content in your theme, check out [Shopify's guide on that here](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/language/change-wording).

When editing the default theme content, you'll now see a Locksmith tab, with a section that corresponds to what you added to the section above:

<figure><img src="/files/8dkFZsL4cdvfjqv6EyZk" alt=""><figcaption><p>You might also see a "Forms" area in there. This is something automatically added by Locksmith, if you have certain condition types, in order to support translating the buttons for their forms.</p></figcaption></figure>

#### Translations

You'll need to install the free [Translate and Adapt](https://apps.shopify.com/translate-and-adapt) app from Shopify, or one of the other 3rd party alternatives. [More info on how to use the Translate and Adapt app here](https://help.shopify.com/en/manual/markets/languages/translate-adapt-app).

If you've added the Translate and Adapt app to your store, you'll see the link to it from within the "Theme content" area. While you can open the app from your apps list, you can also open directly from there:

<figure><img src="/files/vWgNeuF3mPLbGSLYJzBX" alt=""><figcaption></figcaption></figure>

Once inside the "Translate and Adapt" app, **scroll down to find the Theme > "default theme content" area and press on it**.

Then, similarly to above, you'll see a Locksmith section that you are free to edit as much as you need.

**Do this for all of your store languages.**

<figure><img src="/files/wcm1j3Nht4jbB4cKEJNi" alt=""><figcaption></figcaption></figure>

## Important caveat

The messages added with the above method are managed by Locksmith. If you delete the declaration in your messages (the `{{ "locksmith.foo.bar" | t }}` part), the corresponding messages will be deleted from (all of) your locale files.

If you want a persistent message, that isn't directly connected to, managed by, or deleted by Locksmith. You'll need to go with a more manual approach. Additionally, there are apps out there that can manage this kind of thing automatically.\
\
Again, the difference with this approach to the above, is that Locksmith will not automatically edit your locale files, it will all need to be done on your end.

To start, head into the language "locale" file you'd like to update in your theme, and then add a new entry at the bottom. You might see one "locksmith" entry already - **do not add it to that one**. Just create a new one. Use whatever label schema works for you (as long as the first label isn't "locksmith"). It can contain the word locksmith in it, just can't be an exact match. For example:

<figure><img src="/files/UNiuHZpyOAVewbocMUp7" alt=""><figcaption></figcaption></figure>

**Add this same entry into all desired locales files**, and update the "Enter Passcode" to the specific language.\
\
Next, in your passcode prompt message, use the translate filter on that variable. Here's an example:<br>

<figure><img src="/files/GMZwk4LS0MQ2nSSmycF2" alt=""><figcaption><p>Any html or styling will need to be around that, like the &#x3C;p>&#x3C;/p> in the above example.</p></figcaption></figure>

<br>


# Redirecting using Locksmith

How to use the Locksmith app's redirecting features to make sure your customers arrive on the intended page

Out of the box, when a Locksmith lock is activated on a specific page, Locksmith will block acess to the *main content* of the page (i.e. everything in between the header and footer). The main content will then be replaced by Locksmith's access denied content, which might be a sign-in page, a passcode prompt, or simply a message letting the customer know that they don't have access (depending on what keys and settings you are using).

Then, of course, once a customer gains access, they will be shown the content of the page normally.

While that is the default behavior, you also have the ability to send customers to a different page **before** or **after** they gain access to the content. So in this way, there are **two types of redirecting** - redirecting customers right away once they arrive on the locked page, or redirecting customer once they gain access.

## Redirecting customers immediately when they arrive on a locked page - *before* they can gain access

To redirect customers this way, you'll simply use a regular Javascript redirect script, and enter it into the "Messages" area in Locksmith. More information on the messages area here:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

This is an example of a simple redirect script:

```
<script>
  window.location = 'https://www.example.org/my-example-page-url';
</script>
```

The only thing you'll need to change is the exact URL. Use the full URL whenever possible (as opposed to partial URLs).

In Locksmith, this will look something like the following:

![](/files/jnc2MRipp8ZUlRU633JW)

{% hint style="success" %}
**Tip!** Redirect scripts can be used on any type of key condition, including customer account keys, passcodes, secret links, etc.
{% endhint %}

Also keep in mind that in the case of customer account keys, you have the option to define different messages(or behavior, in this case) based on whether or not the customer is signed in when they arrive on the page. So, you could redirect customers that were signed in (but still didn't have access), for example. This would look like the following:

![](/files/Fkf5VQQR5HIgmmMg50Bv)

### Redirecting customers to a login form and returning them after signing in

{% hint style="warning" %}
**Important notes:** By default, Locksmith will present the theme's login form in place of locked resources for key conditions that require a customer to sign into a store account. Once signed in, Locksmith will also return customers to the resource they were trying to access.

This redirect is only necessary for certain issues or requirements from the store's login form.\
\
When using this redirect, Locksmith won't be able to display the lock's access message content along with the login form to which customers are redirected.
{% endhint %}

Sometimes, a theme's login form will include features that Locksmith is unable to present when replacing locked resources with Locksmith's access denied content. This redirect is a good way to ensure customers see the correct login form.

{% hint style="info" %}
Note: If your login form isn't loading correctly when presented by Locksmith, please let us know by emailing us at <team@uselocksmith.com>.
{% endhint %}

The following code provides an example of a JavaScript redirect that automatically redirects customers to the default login form in a Shopify store. This script includes a variable that captures the customer's current URL and sets it as the return URL after signing in.\
\
This script can be pasted into the "Guest messages content" area in Locksmith.

```
<script>
    var current_url = encodeURIComponent(window.location.pathname);
    window.location.replace("/account/login?return_url=" + current_url);
</script>
```

<figure><img src="/files/0KN7ZJlmyiRTVaJ7krTw" alt="Login Redirect &#x26; Return Script"><figcaption></figcaption></figure>

## Redirecting customers *after* they've gained access

Locksmith also has the ability to redirect customers once they've arrived to a page that they have access to. This could be useful if you wanted to show different pages to different customers once they've gained access. **Passcodes** is an area that this is frequently used for.

So - for example: three customer groups that each need to see a different collection. If I have a landing page that I put a Locksmith lock on, we can use the redirect feature to send each customer to a different collection, *depending on which passcode they've entered*.

The redirect-after-access feature is found in the key settings, accessed with the edit link to the right of each key:

![](/files/OlPLu5lZWq4kgopP6uy7)

The Redirect URL field is in the Key options section, at the bottom of the keys settings card:

<figure><img src="/files/bvorYRslxCygQfVvwCQf" alt=""><figcaption></figcaption></figure>

Since this is a key setting, you can set a different redirect for each key. Notice in this example that each key is redirecting to a different collection URL:

![](/files/xmw79iPlEpvZh52n13SO)

{% hint style="warning" %}
If you enter the same URL for the redirect as any of the lock's contents, then when a customer uses that key, the result will be an infinite loop. To prevent this from happening, you'll want to avoid adding redirect links to pages that are covered by the same lock.
{% endhint %}

## Redirecting customers from the product page to the parent collection page *before* access is granted:

{% hint style="info" %}
This redirect is useful for merchants who would like to ensure customers land on the collection page, in case a customer first arrives directly via a product URL.
{% endhint %}

To redirect customers in this way, you can use some Liquid code to check if a customer is on a product page and then include a regular JavaScript redirect script within that Liquid. This code can be entered into the "Guest message content" field or "Passcode prompt" area on the collection lock's settings page. More information on the messages area here:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

The following code provides an example of some Liquid and a JavaScript redirect that automatically redirects customers to a collection page from a product page in a Shopify store. The Liquid code checks for the default product template to prevent the script from running on the collection page. This script includes the URL that can be modified to redirect customers to the collection page for the locked collection.

This script can be pasted into the "Guest message content" field or "Passcode prompt" field on the respective collection lock's settings page.

<pre><code>

  &#x3C;script>
    window.location = 'https://example-store.myshopify.com/collections/example-collection';
<strong>  &#x3C;/script>
</strong>

</code></pre>

{% hint style="warning" %}
**Notes:**

* This should only be added to the "Guest message content" field or "Passcode prompt" field on a collection lock's settings page, and not to message fields on the app's settings page. Otherwise, the script will be run for all collection locks.
* The JavaScript redirect's URL will need to be set to match the collection URL for the collection that the lock has been set up to protect.
* The default product template has been used in this example. If your products use a custom template, you will need to adjust the Liquid to check for that custom template, or for custom and default product templates.
  {% endhint %}

## Related articles

{% content-ref url="/pages/EBPF0ev9QHVuwHDr328s" %}
[Passcode-specific redirects](/tutorials/more/passcode-specific-redirects)
{% endcontent-ref %}

{% content-ref url="/pages/X7LG072DD6bqFsb9J4S6" %}
[Customizing Locksmith’s "Access denied content" messages, and redirecting customers](/tutorials/more/customising-locksmiths-access-denied-content-messages-and-redirecting-customers)
{% endcontent-ref %}


# Locking variants

Manage pricing and other options by creating multiple variants, and use Locksmith to manage access.

In addition to managing access to your products and collections, Locksmith can protect individual variants *within* your product listings.

*New to product variants? Learn more here:* [*help.shopify.com/manual/products/variants*](https://help.shopify.com/manual/products/variants)

**This is a powerful feature! It can allow you to tune your product listings in a way that previously required elaborate coding, or deep manual integration with other apps.**

With variant locking, you can:

* ... set up wholesale pricing on your existing products without creating duplicate products, then ensure that only your wholesalers can view those prices.
* ... reserve a certain amount of stock for a particular customer.
* ... allocate your inventory by distribution center, and restrict access regionally.
* ... add bulk quantities for your trade customers, only allowing pre-approved customers to access it.

**Note: This feature may conflict with other apps. See the&#x20;*****Incompatibilities*****&#x20;section below for more.**

## Creating a variant lock

Start by ensuring you've got at least one product variant set up in your catalog. (Learn how to set these up [for new products](https://help.shopify.com/manual/products/variants#creating-variants-for-a-new-product), and [for existing products](https://help.shopify.com/manual/products/variants#creating-additional-variants-of-an-existing-product).)

Then, open Locksmith, and search for the name of your variant:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859104286364bc9436df/5e278590ee4e7.png)

**Note:** if you don't see your variant in the search results, try opening up the "Help" page in Locksmith and pressing the\
Update Locksmith button there, and try your search again. This is sometimes necessary if you've very recently created your variant.

Next, select the variant and click Save. You may then add your keys.

That's it! :)

## Limiting the scope of a variant lock

It's possible to limit the scope of products the variant is hidden on using the product tag key condition. To learn more, please visit:

{% content-ref url="/pages/luKDNR4NuA438YIb1Mud" %}
[Limiting the scope of variant locks using the product tag key condition](/keys/more/limiting-the-scope-of-variant-locks-using-the-product-tag-key-condition)
{% endcontent-ref %}

## Using passcodes with variant locks

Passcode keys don’t work by default when placed directly on a variant lock. This is because variants don’t have their own pages, and Locksmith only shows the passcode prompt by replacing full page content.

If you’d like customers to use a passcode to unlock specific variants, you’ll need to pair the variant lock with a separate landing page:

1. Create a new page in your Shopify admin (this can be a simple landing page).
2. Add a lock to that page using the passcode key you want.
3. Apply the same passcode key to your variant lock.
4. Direct customers to the landing page, where they’ll be prompted to enter the passcode. Once entered, they’ll have access to the locked variants.

## Variant locks in multi-language stores

If your store uses multiple languages, it’s important to understand how Shopify translations can affect variant locking.

Locksmith’s variant locks match variant option values exactly. This means the lock checks the underlying option value string (for example, “480 packs” or “Large”), not just the variant’s position or how it appears visually on the page.

In multi-language stores, Shopify allows you to translate variant option values per language. For exmaple, you'll get something like this:\
\
**Large** becomes **Groot**, **Grand**, **Grande*****,*** etc.

Although these variants appear equivalent to shoppers, they are rendered as different strings in your Online Storefront. Because of this, all of the translations need to be entered into Locksmith so that Locksmith knows when to look for when hiding variants. Without this, it may appear as though a variant lock works in one language but not another.

### **How to handle translated variants**

There are a couple supported ways to handle variant locking in multi-language stores, depending on how your translations are managed.

#### **If your store uses Shopify Translate & Adapt (or another translation app)**

When you create a variant lock, Locksmith automatically fetches translated option names and values from Shopify. Translations appear in a separate **Translations** section below the main lock settings, already filled in — no manual entry required (as long as translation permissions are approved). A single variant lock can then correctly match the variant across all of your store’s supported languages.

**Approving translation permissions**

If this is your first variant lock on a multi-language store, Shopify may first prompt you to approve additional permissions for Locksmith. This is a standard Shopify permissions screen — approve it to allow Locksmith to read your store’s translations. Until that permission is granted, Locksmith won't try to auto-fill translations.

Once permissions are approved, any new variant lock you create will have the **Translations** section pre-filled automatically.

**Updating translations**

If you update variant translations in Shopify after a lock already exists, open the lock and use the button at the top of the **Translations** section:

* **Auto-fill from Shopify** — shown when no translations are saved yet; fetches and fills all fields.
* **Refresh translations from Shopify** — shown when translations are already saved; overwrites all fields with the latest data from Shopify.

After using either button, make sure to save the lock to persist the updated translations.

{% hint style="info" %}
If multiple products have conflicting translations for the same option name or value, Locksmith will use the first one it finds. If you need to use a different translation, you will need to manually edit the fields in the **Translations** section of the lock.
{% endhint %}

#### **If your store uses duplicated variants per language**

Some merchants choose to create separate variants for their translations (for example, one variant per language with different option value strings). If this is you, you will need to create *separate* variant locks for each translated option value, using the same key conditions. This allows variant labels to remain translated while ensuring the correct variants are locked in every language.

## Compatibility with other apps and features

Because this feature allows you to filter out variants from view, it's likely that it will conflict with any other apps that *also* operate in this way.\
\
For **products** that are locked with Locksmith, we add a metafield to prevent them from being included on the Shop app sales channel. However, this automatic protection only applies at the **product** level. When **variants** are locked, Locksmith doesn’t add the metafield automatically, which means variant visibility on the Shop app needs to be managed manually by merchants.\
\
To learn more about this, see the page here:

{% content-ref url="/pages/3ecPShTRhRo9FJqGnmP5" %}
[Compatibility with other apps and Shopify features](/basics/compatibility)
{% endcontent-ref %}

Variant locking is *not* compatible with variants being displayed by other third-party apps, including page builder apps. To learn more about this, see the page here:

{% content-ref url="/pages/IAdsDTVgV9DPm6d3rbZy" %}
[Locksmith is not working with my page builder app](/faqs/locksmith-is-not-working-with-my-page-builder-app)
{% endcontent-ref %}

{% hint style="danger" %}
Variant locks are **not** compatible with Locksmith's [manual locking](/tutorials/more/manual-mode) feature.
{% endhint %}


# Limiting the scope of variant locks using the product tag key condition

By default, Locksmith's [variant locks](/tutorials/more/locking-variants) apply to all matching option/value combinations. For example, you'll typically see something like this:<br>

<figure><img src="/files/c6di7SBHZLj5f6dCKpyN" alt=""><figcaption></figcaption></figure>

Once a variant lock is created, you can limit which products it applies to by using the key condition labelled "If the product is tagged with":

<figure><img src="/files/l6OPng7ifi63v0YdRQWl" alt=""><figcaption><p>Type "product" in the popover filter, as shown above, to more easily find the correct key condition</p></figcaption></figure>

You'll use any existing product tags to denote which products you want the variant lock to apply to, or create new product tags if needed.

If you want the lock to **apply to variants on one product tag only**, and leave all other products untouched, for example, you'll use an inverted key condition like so:

<figure><img src="/files/1f7wV0t8yzzsv9dkFNPE" alt=""><figcaption></figcaption></figure>

Then, **as a separate key,** add in your conditions for access to the product. So if you want to allow access to the variant with a sign in, that will look like this:

<figure><img src="/files/8Q4WUgPsGs93AwdGRrUv" alt=""><figcaption></figcaption></figure>

The result of this is that all matching variants will automatically be unlocked if the product is NOT tagged with "Snowboard". In other words, **the variant lock will only apply to products tagged with "Snowboard"**.


# Handling JavaScript DOM errors caused by variant locks

Locksmith enforces variant locks at the Liquid level, which can result in a different set of DOM elements being present than the theme expects. For example, a list of product images might be filtered down to omit images belonging to protected variants; this could result in a DOM error when the theme tries to address an image that Locksmith has prevented from appearing.

{% hint style="info" %}
Find JavaScript errors by opening your [web browser's developer tools](/tutorials/more/how-to-access-your-browsers-dev-tools), and watching the message console as you load and navigate your online store.
{% endhint %}

<figure><img src="/files/of8neP8Z91EusUVMIzcD" alt=""><figcaption><p>An example error</p></figcaption></figure>

## Finding a solution

Solving this kind of problem usually involves some trial and error, all centered around making the theme's JavaScript more tolerant of elements being unexpectedly missing.

1. Start by locating the specific line of JavaScript that's raising the error.
   * All error messages come with a filename. Match this filename to the relevant JavaScript asset in your Online Store theme.
   * Look for line numbers at the end of the filename: `theme.js:73` could mean that the error came from line 73 from that file.
2. Determine how that line of JavaScript is attempting to reference a DOM element on the page.
   * For example, the line `group.querySelector('option[value="'+ value +'"]').disabled = true;` is attempting to address an `<option>` element based on a product's option values. If Locksmith has filtered out that variant option, this DOM element might not exist.
3. Modify the relevant JavaScript to insulate it against the possibility of that DOM element being missing.
   * Using the example from above, we could separate the `querySelector` call from the attribute update.
     * `assign optionElement = group.querySelector('option[value="'+ value +'"]')`
     * `if (optionElement) { optionElement.disabled = true; }`
   * Or, we could wrap the entire thing in a try/catch block, logging the error if one was raised.
     * `try { group.querySelector('option[value="'+ value +'"]').disabled = true; } catch (error) { console.error(error); }`


# Locking the customer registration form

{% hint style="danger" %}
**Locking the default registration page with Locksmith will&#x20;*****only*****&#x20;work with Legacy Customer Accounts.**\
\
**The New Customer Account system creates an account as soon as the customer uses the login form, and so registration&#x20;*****cannot*****&#x20;be locked.**\
\
**In that case, we recommend approving customers with account tags instead, after they create an account.**
{% endhint %}

To try this out, open up Locksmith, and start typing "registration", like so:

![](/files/rXa4Kts2T2isArsf0Avb)

Click on the "Customer Registration" result and then click "Save." Locksmith will create a lock that covers your shop's registration page. From there, feel free to add whatever keys you like!

{% hint style="warning" %}
**Hint:** Key conditions based on things like customer tags won't ever allow access because a customer needs to create an account and sign in before they access! If you don't want any customers to register on their own, you can simply leave this lock with no keys. Otherwise, you'll want to use non-customer-account based key conditions such as [passcodes](/keys/passcode-keys) or [secret links](/keys/secret-link-keys).
{% endhint %}


# Locking the search results page in your store

To get started, search for "search" from within Locksmith, like so:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e27859f2c7d3a7e9ae68e75/5e27859f78e77.png)

... and click on the "Search" search result. (So much searching!)

That's it! :)

## Protecting search forms, using Liquid code

Out of the box, this lock *only* protects the /search url of your shop (as in <https://myexampleshop.com/search>).

To hide the search boxes that your theme may include elsewhere in your shop, open up the Liquid file that contains the search form in question, and locate the actual search form. Wrap it with Liquid that looks like this:

```
{% include 'locksmith-variables', locksmith_scope: 'search' %}

{% if locksmith_access_granted %}  
  <!-- your search form here! -->
{% endif %}
```

As you can see, this *does* require manual coding. If you need a hand with this, let us know! :)


# How to clear cache for a single website

{% hint style="info" %}
This guide is geared towards merchants on Shopify using the Locksmith app. If you are arriving from elsewhere, you may still find it useful - simply down scroll to the section for the browser you are using.
{% endhint %}

## Why this is useful

If you are using Locksmith's passcode, secret link, newsletter, or location key-condition types on your Shopify store, Locksmith remembers access of specific visitors via browser cache. Once the lock is open, the locked content will be accessible and will begin to appear in searches and collection view (if applicable) for the rest of the visitor's browser session.

If you want to re-test what a new user would, you will need to use a browser with clean cache. Keep in mind that you may find it easier to simply open up an **incognito window,** or use a **different browser or device**. However, those steps can be tedious if you would like to test multiple times in quick succession.

{% hint style="warning" %}
**Important:** If you're using a URL with the `shopifypreview.com` domain to test, Locksmith changes won't appear there.

The Shopify theme editor's built-in preview bypasses Locksmith entirely. Locks, keys, and any manual locking code can look like they are not in place.

If you're testing your published theme, open the live storefront URL in a new private browsing window.

If you're testing an unpublished theme, use the preview URL that includes `?fts=0&preview_theme_id=` followed by your theme ID, as described in [Testing Locksmith on unpublished themes](https://www.locksmith.guide/tutorials/more/testing-locksmith-on-unpublished-themes).
{% endhint %}

Following the steps in this guide will help you clear the cache for a single website, **without needing to clear the cache for all websites**. GIFs included!

## Browser-specific steps

### Chrome

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e641c9204286364bc966164/file-2HsomwevFh.gif)

1\. Right click, choose "Inspect"

2\. In the Dev Tools menu that shows up, find the "Application" tab

3\. In the Application tab, make sure that "Storage" is selected in the left menu.

4\. Click, "Clear site data", and you're done!

### Firefox

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e641da22c7d3a7e9ae8d827/file-Sr47LG4xWE.gif)

1\. Directly to the left of the URL bar, click on the lock icon.

2\. Choose "Clear Cookies and Site Data" and the very bottom of the drop down

3\. Make sure you choose your site only, and click Remove.

4\. You're done!

### Safari

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5e641fc82c7d3a7e9ae8d82c/file-pe35Od54lZ.gif)

1\. Go to Safari > Settings > Privacy

2\. Search for your website.

3\. Click on your website, and click "Remove"

4\. You're done.

### Internet Explorer

1. Go to your website (that you want to delete cookies and cache for)
2. Launch Developer Tools ( or press F12)
3. Go to the Network tab
4. Click the Clear browser cache button, or press Ctrl + R.


# Manual mode

Restricting access to only specific parts of a page in your Shopify Online Store

Out of the box, Locksmith automatically protects all content between the header and footer, for everything covered by your locks.

Sometimes this can be too aggressive - you might want to allow visitors to preview your products without being able to see pricing, for example. Or, you might want to protect *just* the checkout button in your cart.

**Locksmith comes with an advanced manual mode that allows for this sort of thing.** It disables Locksmith's full-page protection, stepping aside so that some custom code in your theme can take responsibility for hiding part of your content.

Two important notes:

* If a particular piece of content has multiple locks in play (for example, if the customer is viewing a product that is a part of several locked collections), manual locks will *only* work if *all* applicable locks have manual mode enabled.
* Remote keys require a special initialization step, when working with manual mode. For more on this, jump to the [interactions with remote keys section](#interactions-with-server-keys), later in this article.

## Purpose-specific guides

Use these if you already know that you're using manual locking for one of the following:

* [Hiding product prices and/or the add to cart button](/tutorials/hiding-prices)
* [How to hide theme sections, blocks, and snippets](/tutorials/more/how-to-hide-theme-sections-blocks-and-snippets)
* [Restricting checkout from the cart](/tutorials/more/restricting-checkout-from-the-cart)

## General guide

*Because each theme is a bit different, manual locking does require manual coding. If you install a new theme down the road, these changes will need to be re-applied.*

### Step 1: Enable manual mode

{% hint style="info" %}
**Note**: *Before* proceeding, it's important to understand that enabling manual mode will disable full-page locking for any content covered by this lock. Only proceed if you are okay with your content being open to the public for short time while you add in the code in the next step. If you are not okay with this, consider doing these steps in opposite order. The only downside is that you won't be able to see the code changes as you make them.
{% endhint %}

Moving on, the steps are as follows

1. Open up the Locksmith lock that you want to enable manual locking for.
2. Click on "Advanced" in the lock Settings section and tick the checkbox for "Enable manual locking". Then, hit save. Screenshot below\...

![](/files/K1BdceuvIvP7HET3DtYq)

That's it! Locksmith will hold off on its full-page protection with this enabled, and allow your custom code to enforce protection.

### Step 2: Updating your theme for manual locking

{% hint style="info" %}
**Note**: This part gets a little technical. If you are developer type that wants to take this on, proceed! Otherwise, the Locksmith team can help you add in the coding for most manual locks - within reason!
{% endhint %}

Manual locking leverages Liquid variables to empower you to render content however you'd like, based on Locksmith's permissions.

Locksmith's variables are loaded via the `locksmith-variables` snippet. It can be included two ways, depending on context:

#### Using {% render %}

This usage supports "exporting" a single variable at a time, by informing the snippet of the object you're interested in (e.g. a specific product), capturing the rendered result, and performing any post-processing of the captured value necessary. For booleans and arrays, post-processing *is* necessary: the render tag necessarily results in a string. Boolean values are represented as their string equivalents, and arrays are represented as comma-delimited values.

The variable names that may be exported match Locksmith's standard list of variables; for variable names and definitions, [see Locksmith variables](/developer-tools/locksmith-variables).

To access any supported variable, use this approach:

```
{% capture var %}{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject: product %}{% endcapture %}
{% if var == 'true' %}
  {% assign locksmith_access_granted = true %}
{% else %}
  {% assign locksmith_access_granted = false %}
{% endif %}
```

For variants, one additional argument is required for the render tag: `subject_parent`, defining the product that contains the variant you're checking in on.

```
{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject_parent: product, subject: variant %}
```

Feel free to adjust this code to taste. Only the capture and render tags need to be used exactly as written; process the rendered value string in whatever way you need to. Use the support button in the corner if you've got any questions. :)

#### Using {% include %}

The include tag has been [deprecated](https://help.shopify.com/en/themes/liquid/tags/deprecated-tags#include) by Shopify. Locksmith still uses this variable itself, in situations where overriding variables is important. You shouldn't need to use this on a regular basis, but we document it here for completeness.

1. `{% include 'locksmith-variables' %}` – In this mode, Locksmith will autodetect the applicable locks for the current url, and set up its access variables accordingly.
2. `{% include 'locksmith-variables', locksmith_subject: foobar %}` – In this mode, you specify the exact object that Locksmith should base its access decisions upon. Use this if you need to load up Locksmith's variables based on the cart, or a certain product, or some other Liquid variable, regardless of what url the user is on

For the code following this tag, all of Locksmith's standard variables are now automatically available, their names being prefixed with "locksmith\_". For example, you may now use "locksmith\_locked", "locksmith\_access\_granted", and "locksmith\_manual\_lock". The *values* differ only in that arrays of integer IDs (e.g. "locksmith\_lock\_ids", "locksmith\_opened\_lock\_ids", and "locksmith\_key\_ids") are exported as arrays of numeric strings.

For (unprefixed) variable names and definitions, see [Locksmith variables](https://docs.uselocksmith.com/article/474-locksmith-variables).

After loading the Locksmith variables, wrap the code you'd like to conditionally hide like this:

```
{% if locksmith_access_granted %}
  You've got access!
{% endif %}
```

### Interactions with remote keys <a href="#interactions-with-server-keys" id="interactions-with-server-keys"></a>

Some keys that you can configure in Locksmith require contacting our servers, remotely, in order to determine if access should be granted. Remote keys include:

* [Passcode keys](/keys/passcode-keys)
* [Secret link keys](/keys/secret-link-keys)
* [Newsletter keys](/keys/more/newsletter-keys)
* [Location keys](/keys/visitor-location-keys)

{% hint style="info" %}
Locksmith used to refer to these as "server keys" (in contrast to "native keys").

These days, we refer to them as "remote keys" (in contrast to "local keys").
{% endhint %}

In most usages, remote keys don't require any theme configuration. Locksmith will render a loading screen, with a spinner animation; once it's finished initializing, it'll reload the page automatically, and your storefront's normal content will be displayed.

When using manual mode, Locksmith will show your storefront content immediately by design. Manual mode leaves you with the responsibility of updating your theme's code to show or hide content based on Locksmith's decisions. Without remote keys, this is a simple boolean: either access is granted, or denied. When combined with remote keys, we add a third state: either access is granted, or denied, *or* Locksmith hasn't finished initializing and the page should be refreshed.

To explain by example: in cases like[ price hiding](/tutorials/hiding-prices), this means that there are three possibilities for the content you should display: either you should display the price (and add-to-cart form), or you should hide it, *or* you should display a "please wait" message, coupled with some JavaScript that reloads the page when Locksmith has finished initializing in the background. This is necessary when using location-based, IP address, and secret links keys.

To accomplish this, adapt this code for your own purposes:

```
{% if locksmith_access_granted %}
  <!-- the original add-to-cart button code -->
{% elsif locksmith_initialized %}
  <p>No access for you!</p>
{% else %}
  <p>Please wait&hellip;</p>
  <script>
    Locksmith.on('initialize', function () { window.location.reload(); });
  </script>
{% endif %}
```

The code above assumes that you've already exported the `locksmith_access_granted` and `locksmith_initialized` variables. Use one of these options to export those variables, making sure to do so *before* making any content decisions:

```
{% capture var %}{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject: product %}{% endcapture %}
{% if var == 'true' %}
  {% assign locksmith_access_granted = true %}
{% else %}
  {% assign locksmith_access_granted = false %}
{% endif %}

{% capture var %}{% render 'locksmith-variables', variable: 'initialized', scope: 'subject', subject: product %}{% endcapture %}
{% if var == 'true' %}
  {% assign locksmith_initialized = true %}
{% else %}
  {% assign locksmith_initialized = false %}
{% endif %}
```

```
{% include 'locksmith-variables' %}
```

{% hint style="danger" %}
Manual locking is ***not*** compatible with [variant locks](/tutorials/more/locking-variants).
{% endhint %}


# Grant access for a limited time when using passcodes or secret links

How to use Locksmith's 'timeout' feature to limit access time

This feature is available only when using "[passcode](/keys/passcode-keys)" or "[secret link](/keys/secret-link-keys)" key conditions. In specific, the following key conditions types:\
\
\&#xNAN;*Permit if the customer...*

* gives the passcode
* gives one of many passcodes
* gives a passcode from an input list
* arrives via a secret link
* arrives using a secret link from an input list

The setup is pretty straightforward. You'll see the corresponding option, when setting up one of the above key condition types, and can adjust the time period like so:

<figure><img src="/files/IW1pEn7246us8SrFrPlz" alt=""><figcaption></figcaption></figure>

## Caveats

#### 1. Using this setting with the "Remember for signed-in customers"

Since most folks using the timeout setting are wanting to heavily limit their customers' access period, we typically recommend that anyone using the timeout setting makes sure to turn the "Remember for signed-in customers" setting OFF. While the two settings can technically be used together, doing this can provide you the most consistent results.

That being said, if, for any reason, you have set a longer access period (months, years), it may actually make more sense to keep the "Remember for signed-in customers" setting turned on. This will help Locksmith maintain access (via customer metafields) for the full period of time, as long as the customer is signed in.

#### 2. Access time is evaluated at time of page load

As stated under the option itself, Locksmith won't refresh the page for the visitors, so visitors' access period will only time out when they load or refresh a page.

#### 3. The setting won't apply retroactively

When adding this setting to an already-existing key condition, it will only be applied to new visitors. As in, it will not apply retroactively.

If you *do* want to reset access for all visitors, the easiest way to do this is to delete your key condition( press the "Remove" button on the condition) and recreate it with a different passcode or secret link.

#### 4. Every time a visitor uses the same passcode or secret link, the timeout timer for that particular passcode/link is reset

In other words, the timer is always based on the *most recent* Locksmith submission/validation. If a customer resubmits a passcode or re-uses a secret link, the timer starts from then, even if that code/link was already used.

To prevent this kind of thing, you can set up your codes/links so that they have limited uses (or even one use only). Check out the corresponding guides for more information on how to do that:

* [Secret links](/keys/secret-link-keys)
* [Passcodes](/keys/secret-link-keys)

#### 5. When using the timeout feature, do not use the same passcodes or secret links as you are using in your key conditions that do not time out

Using the same passcodes or secret links for key conditions that time out, as those that *do not* time out will result in none of your key conditions timing out as expected.

#### 6. On rare occasions, page caching may prevent visitors access from timing out

It is possible for pages in your online store to be cached based on Shopify features and Theme settings. This may prevent the page from timing out exactly when expected. Because of this, the setting should be considered to be simply an extra tool in your toolbox, and not depended on to be exact and precise.

####


# Testing Locksmith on unpublished themes

By default, Locksmith will only automatically install itself to and update itself on the currently published theme, and does *not* automatically install itself to unpublished themes. However, there is a way to test Locksmith on unpublished themes.

### **To test Locksmith on an unpublished theme:**

1. Head to the in-app "Themes" page.
2. Click the "**Install**" button for the theme you'd like to test Locksmith on:

<figure><img src="/files/UrkbqHG02oBPojR9Ws4l" alt=""><figcaption></figcaption></figure>

4. To preview the lock configuration you just installed, click the **three-dot menu** (…) next to the theme name, and select **Preview**:

<figure><img src="/files/RtUJmBJSJwYvoD71y30Q" alt=""><figcaption></figcaption></figure>

When testing your locks on unpublished or the currently published theme, we recommend using a brand new private browsing session each time:\
[How to use a private browsing session](/tutorials/more/how-to-use-a-private-browsing-session)

{% hint style="warning" %}
**Important:** If you're using a URL with the `shopifypreview.com` domain to test, Locksmith changes won't be reflected there. The Shopify theme editor's built-in preview bypasses Locksmith entirely, so locks, keys, and any manual locking code will appear as if they aren't in place.\
\
For accurate testing, always use the preview URL that includes `?fts=0&preview_theme_id=` followed by your theme ID in the URL parameters — as described in this guide.
{% endhint %}

{% hint style="info" %}
Please note: when making changes to your locks and Locksmith settings, Locksmith will only update those on the currently published theme.\
\
To update the unpublished theme after making changes in-app, just click the "Install" button for that theme next to the theme name again, as outlined above.
{% endhint %}

### To remove Locksmith from an unpublished theme:

1. Head to the in-app "Themes" page.
2. Click the "**Uninstall**" button for the theme you'd like to remove Locksmith from:

<figure><img src="/files/uzNmZJsELvHLmIrOzD5J" alt=""><figcaption></figcaption></figure>

### Setting a secondary theme:

Locksmith supports setting a **Secondary theme**, which receives automatic updates along with your published theme when changes are made in Locksmith.

1. In the **Unpublished themes** section, locate the theme you want to set as a secondary theme.
2. Click the **three-dot menu** (…) next to the theme name.
3. Select **Set as secondary theme**:

<figure><img src="/files/pF2ARHvuMtlZTuE8inZi" alt=""><figcaption></figcaption></figure>

This theme will now receive all future updates made in Locksmith, in addition to the published theme.


# Locking blog posts

Locksmith can search for and lock an *entire* blog, but doesn't search for individual blog posts/articles by default. If you type in "news" (or the title of your blog), you should be able to lock the whole blog, but that'll include every article in there by default.

To lock a *specific* blog post/article, try tagging it in your "Blog posts" page in the Shopify admin area, and then search for that tag in Locksmith. When you search for the tag, it will display as "articles tagged with...":

<figure><img src="/files/NhDSWd53qDiKl9JeUB6F" alt=""><figcaption></figcaption></figure>

For more about how to add tags to blog posts, please visit Shopify's guide, below:\
\
[Add tags to a blog post<br>](https://help.shopify.com/en/manual/online-store/blogs/writing-blogs#add-tags-to-a-blog-post)

{% hint style="info" %}
After adding tags to your blog posts, if the tag doesn't show up right away when searching for it in-app, click on the "Update Locksmith" button on the *Help* page in the app. It should sync up in a minute or so.
{% endhint %}

{% hint style="danger" %}
Locksmith ***cannot*** block RSS feeds from locked blogs.
{% endhint %}


# How to access your browser's dev tools

For any browser right click on an element on a page and select "Inspect", then select the relevant tab in the DevTools panel (Ctrl + Shift + I or Command + Option + I)

#### Open the DevTools into the Console panel <a href="#howtoopenwebconsoleondifferentbrowsers-openthedevtools" id="howtoopenwebconsoleondifferentbrowsers-openthedevtools"></a>

* Google Chrome: Ctrl + Shift + J or Command + Option + J
* Safari: Command + Option + C
* Firefox: Ctrl + Shift + K, or Command + Shift + K
* Microsoft Edge: Ctrl + Shift + J, or Command + Shift + J

#### Open the DevTools into the Elements panel <a href="#howtoopenwebconsoleondifferentbrowsers-openthedevtools" id="howtoopenwebconsoleondifferentbrowsers-openthedevtools"></a>

* Google Chrome: Ctrl + Shift + C or Command + Option + C
* Safari: Command + Option + I
* Firefox: Ctrl + Shift + C, or Command + Shift + C
* Microsoft Edge: Ctrl + Shift + C, or Command + Shift + C

For more information from the sources, use the following links:

* [Chrome](https://developer.chrome.com/docs/devtools/open/)
* [Safari](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/KeyboardShortcuts/KeyboardShortcuts.html)
* [Firefox](https://firefox-source-docs.mozilla.org/devtools-user/keyboard_shortcuts/index.html)
* [Edge](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/overview)


# Restricting the cart for mixed products and combinations of products

{% hint style="warning" %}
This is an incomplete guide! In an effort to share the information we have as soon as possible, this guide has been started and published here in what we consider to be an incomplete state. If something is missing, please let us know by emailing us at <team@uselocksmith.com>.
{% endhint %}

Locksmith can be used to restrict checkout from the cart page by creating a lock for the cart. This lock can be used to hide the whole cart page, or to only lock the checkout buttons on the cart page. Locksmith has a few cart specific key conditions that can be used to check specific attributes of a customers' cart. This guide will primarily focus on the use of the “has a certain product in their cart” key condition.

## Preventing access to the checkout from the cart

Our guide on setting up a cart lock is linked below. That guide covers both locking the whole cart page and locking the checkout button.

{% content-ref url="/pages/wSNNDHj0K0DSuMVwmXXS" %}
[Restricting checkout from the cart](/tutorials/more/restricting-checkout-from-the-cart)
{% endcontent-ref %}

Locking the checkout button can be a better option here. This will allow customers to still be able to edit the products in the cart, even when the checkout button is locked.

## Managing cart access based on products in the cart

There are three general ways of restricting access to the checkout via your Shopify cart based on mixed products or combinations of products. Keep in mind, this isn’t an exhaustive list.

### Preventing checkout with mixed products from two different groups of products. Eg. Wholesale and Retail

The "Look for products matching…" field on the "has a certain product in their cart" key condition can be used to check for a product title, or product tags. For example, "tag:wholesale will check for any products with the "wholesale" tag.

You will need to create three separate keys for your cart lock. Our guide on adding keys is here for reference: [Creating keys](https://www.locksmith.guide/basics/creating-keys)

#### 1. You’ll need a key that grants access if a customer *does* have products tagged with the "wholesale" products tag (for example) in the cart, but only if the customer doesn't have any products tagged with "retail" in the cart.

* Create a key and then select the "has a certain product in their cart" key condition and add “tag:wholesale” to the "Look for products matching…" field on the condition.
* Then [*combine*](/keys/more/combining-key-conditions) a second "has a certain product in their cart" key condition with the first, add “tag:retail” to the "Look for products matching…" field on the condition, and then [*invert*](/keys/more/inverting-conditions-in-locksmith) the condition.\
  \
  [Combining Key Conditions<br>](/keys/more/combining-key-conditions)[Inverting conditions in Locksmith\ <br>](/keys/more/inverting-conditions-in-locksmith)You should have a key that looks like the following image.<br>

  <figure><img src="/files/glNxdlY8btV649axh6PK" alt=""><figcaption><p>Image 1. Key with key condition combination to allow access for wholesale products with no retail.</p></figcaption></figure>

#### 2. The second key will use a set of conditions that are the inverse of the fist key, to grant access to customers who don't have any products tagged with "wholesale" in the cart but do have products tagged with "Retail" in the cart.

* Create a new key by clicking the “+Add key” button and then select the "has a certain product in their cart" key condition and add “tag:retail” to the "Look for products matching…" field on this condition.
* Then combine a second "has a certain product in their cart" key condition with the first, add “tag:wholesale” to the "Look for products matching…" field on the condition, and then invert this condition.\
  \
  You should have a key that looks like the following image.<br>

  <figure><img src="/files/LQVb50EieQTnrTzfWOLx" alt=""><figcaption><p>Image 2. Key with key condition combination to allow access for retail products with no wholesale.</p></figcaption></figure>

#### 3. *This third key is only required, if you have another set of products, other than wholesale and retail, that can be purchased with anything product.*

The third key can be used to grant access for when there are no products with the "wholesale" or "retail" tags in the cart. This will require the combination of two inverted "has a certain product in their cart" key conditions, one of each product tag.

You should have a key that looks like the following image.

<figure><img src="/files/wOIU1opkjxahuMRK3BXT" alt=""><figcaption><p>Image 3. Key with key condition combination to allow access when no wholesale or retail products are in the cart.</p></figcaption></figure>

### Limitations:

* The method locks down the cart page only. The cart page is always found at the '.../cart' link in your store (e.g. [www.example-store.com/cart](http://www.example-store.com/cart)). Using other types of carts (slider, dropdown, dynamic/ajax, etc.) or adding "Buy Now" links to your store (which point the customer directly to checkout without going through the cart page) will not work with this method.
* Locking the checkout area itself is not possible using Locksmith. So any check out links that lead straight to checkout including "Buy Now" button, upsell links, or abandoned cart links can't be used with this method. Please see [Setting up checkout validation with Locksmith](/tutorials/more/setting-up-checkout-validation-with-locksmith)

### Something else not covered here?

Let us know by emailing us at **<team@uselocksmith.com>**


# Locking products by vendor

Locksmith can search for and lock products based on the product vendor. A lock can be created for all products from a specific vendor by searching for the name of that vendor in the search bar on the Locksmith app's homepage.

<figure><img src="/files/HiU3WWnynhlRvxXkBNuk" alt=""><figcaption><p>Image 1. Example of a vendor search where the vendor name is "Locksmith".</p></figcaption></figure>

Shopify's product vendors are part of the organization section on a products information page. More on that in the Shopify's guide below:

<figure><img src="/files/NGbilrNrkF7N3iRoQgZk" alt=""><figcaption></figcaption></figure>

[Shopify Product details - Organization](https://help.shopify.com/en/manual/products/details#product-organization)

## Vendor locks vs Collection locks

### Similarities:

* Vendor locks work in a similar way to collection locks: where a single lock can be used to hide and manage access to multiple products.
* Vendor locks and collection locks both have a "Hide this vendor/collection and their products" option. That can be used to tell the lock to filter locked products from the store's native search and collection lists.

{% content-ref url="/pages/zROi6atqaMjwYTVodQVb" %}
[Can Locksmith hide content from my in-store search?](/faqs/can-locksmith-hide-content-from-my-in-store-search)
{% endcontent-ref %}

### Differences:

* Collection locks have a "Hide any links to this collection and its products" option that vendor locks do not. This option can be used to hide menu navigation links for locked products in a collection from the stores native header and footer menus.
* Collections can be used to present a specific group of products in one place. When the collection is locked Locksmith will present an access message and content relevant to the locks key conditions.\
  \
  This is useful if you would like to present a central location to send customers to that contains restricted products they should have access to.

## Creating a collection that for vendors

This section covers using your Shopify admin to create a custom automated collection that includes products based on product's vendor

1. In your Shopify Admin, navigate to Products > Collections
2. In the upper right, click Create Collection
3. Name your collection something relevant, and then scroll down and click on the Automated option for the collection.
4. In the conditions area, choose "Product Vendor... is equal to" and then add your product Vendor into that field:

<figure><img src="/files/iCPJsbrOeQc52LytATXC" alt=""><figcaption></figcaption></figure>

5. Click Save.

Once your collection has been set up, search for your new collection's title in the search bar on the Locksmith homepage, and create your lock. You'll likely want to enable the "hide from search and lists" option on that lock.

Any time you add that vendor to a product, it'll automatically be included in that collection and therefore locked by Locksmith. :)

## Related articles

{% content-ref url="/pages/M9JRoxsNMqxR7taTbDTe" %}
[Creating locks](/basics/creating-locks)
{% endcontent-ref %}

{% content-ref url="/pages/R62VYgCUL8a2ModXFqyS" %}
[Locking products by tag](/tutorials/more/locking-products-by-tag)
{% endcontent-ref %}

## Something else not covered here?

Let us know by emailing us at: **<team@uselocksmith.com>**


# How do I hide my Shopify store's header and footer

The Locksmith can be used to lock most resources in your store, preventing their content from appearing between the header and footer of the site. However, Locksmith doesn't have a built in way to lock or hide the header and footer in your theme.

It's worth noting that some locks have an option that can be used to conditionally hide specific menu navigation links for locked resources. More on that in our guide below:

{% content-ref url="/pages/uqE9ZBbUYRJY3htwWHO2" %}
[Hiding navigation links for locked resources](/tutorials/more/hiding-navigation-links-for-locked-resources)
{% endcontent-ref %}

## Custom options

{% hint style="info" %}
In many cases, some Liquid code can be used to hide the store's header or footer section. However, this customisation isn't something that we can set up or maintain for you.
{% endhint %}

The intent here is to illustrate that conditionally hiding the site's header and footer can be set up with some custom Liquid.

In general, this can be straightforward to set up, if you have a little experience with Liquid and editing your theme's code. Alternatively, a developer or theme designer should be able to help with this.

### Examples of the header section being conditionally hidden

The header and footer section groups are typically located in the theme.liquid layout file in Shopify 2.0 themes. A Liquid condition can be set up to show or hide these sections based on a Liquid attribute, such as a customer being signed into a store account, or a customer viewing products from a specific collection.

{% hint style="info" %}
In the example below the Dawn theme has been used and the header section is titled "`header-group".`
{% endhint %}

#### Hiding the header unless a customer is signed in

```
{% if customer %}
    {% sections 'header-group' %}
{% endif %}
```

#### Hiding the header unless a customer's account has a specific customer tag

```
{% if customer.tags contains "example-tag" %}
    {% sections 'header-group' %}
{% endif %}
```

#### Hiding the header using some of Locksmith's manual code

Locksmith has "manual code" that can sometimes be used to hide the store's header and footer. The code used in this example will interact with all locks in your store. You may need to consider using some additional Liquid to limit this section hiding to specific locked resources if needed.

The following code can be added to the top of the theme.liquid layout file to include Locksmith's variables that will support the function of Locksmith's manual code:

```
{% capture var %}{% render 'locksmith-variables', variable: 'access_granted', scope: 'subject', subject: product %}{% endcapture %}{% if var == 'true' %}{% assign locksmith_access_granted = true %}{% else %}{% assign locksmith_access_granted = false %}{% endif %}
```

The `{% sections 'header-group' %}` can be wrapped in Locksmith's manual code to show the header, if the resource that's currently being viewed isn't locked:

```
{% if locksmith_access_granted %}
    {% sections 'header-group' %}
{% endif %}  
```

We have some more information on Locksmith's manual code in the guide here:

{% content-ref url="/pages/O2n014EIzM9d23tvyj3K" %}
[Manual mode](/tutorials/more/manual-mode)
{% endcontent-ref %}

## Locksmith's automated section hiding

Locksmith has a new experimental feature that can automatically hide sections, blocks, and snippets in Shopify 2.0 themes.

You can find our guide to using this feature at the link below:

{% content-ref url="/pages/biRomPQvYS6BF2ty0Q6y" %}
[How to hide theme sections, blocks, and snippets](/tutorials/more/how-to-hide-theme-sections-blocks-and-snippets)
{% endcontent-ref %}

In some themes, this can be used to hide the header and footer sections. To set this up:

1. Navigate to the Theme tab in Locksmith, and click the Edit theme hiding profile button for the theme you’d like to configure.<br>

   <figure><img src="/files/3j5MRHiPHJ7OdcBKbW9C" alt=""><figcaption></figcaption></figure>
2. Click the Add new definition button at the bottom of the page. In the Name of section, block, or snippet field, search for header.
3. From the dropdown results, select the theme’s section file for the header, then click Add.
4. Repeat steps 2 and 3 for the footer.
5. In the Liquid variable field for each definition, enter "item".
6. When you’re done, click the Save button at the top of the page.

{% hint style="info" %}
**Note:** This may not work for all themes, and will only hide the header and footer when a user is viewing a locked resource. This makes it best suited for store-wide locks that cover the entire storefront.
{% endhint %}

## Need something custom set up for your store?

There's a Shopify directory here if you're looking to hire someone to help with something like this: <https://www.shopify.com/partners/directory>

## Something else not covered here?

Let us know by emailing us at: **<team@uselocksmith.com>**


# Hiding navigation links for locked resources

Use the Locksmith app to hide navigation links in your Shopify Online Store channel

Locksmith allows you to hide *navigation links that point to locked resources* - only showing them to visitors with access to your locks. This is turned on via the settings on your lock page:

<figure><img src="/files/bSUvbj8AGhQXsXjcDmSf" alt=""><figcaption></figcaption></figure>

You'll find this option on locks for the following resource types:

* Product
* Collection
* Page
* Blog
* Liquid locks

## Limitations

* Using **third party apps** to create your navigation will likely prevent Locksmith from being able to correctly hide your navigation links.
* Locksmith is generally not able to hide navigation menu links that are a part of a **mega menu**, whether via third party apps or a theme setting. These generally rely on AJAX/Javascript, which Locksmith cannot filter.
* Locksmith is not able to hide empty navigation links that don't point to any resource.
* This setting can only be turned on via your lock settings. This means that links pointing outside of your Online Store cannot be hidden through Locksmith.
* This setting cannot hide filtering options in your theme's filter menu, as filter items are displayed differently from product grids and navigation menus.

## Having issues with links not getting hidden?

The way you add in the links when creating your navigation menus may affect Locksmith's ability to remove links in your menus.

Specifically, it's important that you search for and select the resource directly and that you do NOT simply paste/type in the link. Selecting the resource directly means that there is a liquid resource associated with it, and Locksmith can more consistently detect the correct lock status that way.\
\
From the **Online Store > Navigation** area in your Shopify admin, It should look something like this when setting up:

<figure><img src="/files/2FhBBaIkzueIpH7FLuBR" alt=""><figcaption></figcaption></figure>

## Related articles

{% content-ref url="/pages/M9JRoxsNMqxR7taTbDTe" %}
[Creating locks](/basics/creating-locks)
{% endcontent-ref %}

{% content-ref url="/pages/HaTxrmU6t5AWPMJCcwqM" %}
[How do I hide my Shopify store's header and footer](/tutorials/more/how-do-i-hide-my-shopify-stores-header-and-footer)
{% endcontent-ref %}


# Hiding products and other content from lists in your online store

How to set up Locksmith locks to hide from collections, in-store searches, and any other lists and grids in your Shopify Online Store

Locksmith allows you to hide *locked* content from lists across your store. This includes hiding products from collections and search result pages - only showing them to visitors that have gained access to the appropriate lock(s). This is turned on in your lock settings on your lock page:

<figure><img src="/files/NmzdN615E46AOXPVJABu" alt=""><figcaption></figcaption></figure>

## Hide products from the following:

* Searches
* Collections
* Related products
* Featured products
* And more! Any time your theme is showing a list of products, this feature likely has the ability to filter locked products from it - *as long as the list is not displayed by a third party app.*

## Other resource types

Although less commonly needed, you can also turn this feature on for page, blog, and article locks. In these cases, if your theme has a way to display "all pages", or "all blogs", for example, Locksmith can remove these from from those types of displays as well.

## Limitations

* Using **third party apps** that take over the display of your collections or searches will likely prevent Locksmith from hiding products correctly. Most filtering/search/display apps are **not compatible** with hiding products via Locksmith.
* Hiding a large number of products this way can introduce **blank spaces** to your collections. [More information and workarounds here](/faqs/faq-i-see-blank-spaces-in-my-collections-and-or-searches-when-locking).
* While this setting is capable of hiding products from the search results *page*, it cannot always remove products from search results that are fetched dynamically (i.e. shows results as you type).
* This setting cannot hide filtering options in your theme's filter menu (shown on collection pages), as filter items are displayed differently from product grids and navigation menus.

For more specific information regarding how locksmith works with your in-store search, including some troubleshooting steps, see our guide here:

{% content-ref url="/pages/zROi6atqaMjwYTVodQVb" %}
[Can Locksmith hide content from my in-store search?](/faqs/can-locksmith-hide-content-from-my-in-store-search)
{% endcontent-ref %}


# Restricting a product so that it can only be purchased by new customers

In this guide, we'll show you how to set up a product so that it can only be purchased by customers who haven't yet made a purchase. This is great for samples and first time free products.

{% hint style="info" %}
**Note:** This functionality requires the customer to have or create an account for access. There's more on that below.
{% endhint %}

You'll start by locking your product. You can search for it by name in the Locksmith search bar to create that lock.

{% content-ref url="/pages/M9JRoxsNMqxR7taTbDTe" %}
[Creating locks](/basics/creating-locks)
{% endcontent-ref %}

Next, you'll need to set a key with two different conditions:

* **Permit if the customer is signed in, and**
* **permit&#x20;*****unless*****&#x20;the customer has purchased "\*"**

For Locksmith to determine whether a customer has made a previous purchase, you must require customers be signed in to access this product. This is done by adding an "**is signed in**" key condition to your key.

The second condition checks the customer's order history to see if they've made any purchases at all. For this, combine the "**has purchased...**" key condition with the "is signed in" key condition. Adding an asterisk to the "Look for products matching..." field tells Locksmith to check for any purchase in the customers history. Finally, ensure you enable the "invert" option on this condition to block customers who have made a purchase before.

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions)
{% endcontent-ref %}

Here's what that should look like:\ <br>

<figure><img src="/files/jX2DjNGW0evmvE41OMAP" alt=""><figcaption></figcaption></figure>

When the full key is created, your key should look like this:

<figure><img src="/files/u3MG1zHsFA3xX62XOnPg" alt=""><figcaption></figcaption></figure>

When this is all set, the customer will be prompted to log in when they try to access the product. If they already have a purchase in their history, they'll see the Access Denied message.

You can edit the access messages on the Locksimth app's settings page, or editi the access messages for specific locks on the lock's settings page. Our guide on edditing access messages is linked below.

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

## Related articles:

{% content-ref url="/pages/A0WwFznqJob71sDH7rUK" %}
["Has purchased..." key](/keys/more/has-purchased)
{% endcontent-ref %}

{% content-ref url="/pages/Rtavrz1uam6HlWPicwww" %}
[Selling digital content on Shopify](/tutorials/selling-digital-content-on-shopify)
{% endcontent-ref %}


# Automatically managing the seo.hidden metafield using Locksmith

How to set up your Locksmith locks to automatically manage the seo.hidden metafield for any content covered by them.

Shopify provides merchants with the **seo.hidden** metafield that, when added to your resources, does the following:

* Removes it from sitemaps
* Prevents search engines from indexing (via the "noindex, nofollow" metatag)
* Removes it from the customer-facing search within your Online Store (with some exceptions, depending on theme or apps used and how they treat the "seo.hidden" metafield)

More complete information about the seo.hidden metafield, directly from Shopify, [can be found here](https://shopify.dev/docs/apps/marketing/seo#step-2-hide-a-resource-from-search-engines-and-sitemaps).

Locksmith will automatically **add** this metafield if you turn on the 'Hide from sitemaps' in your lock settings (found under Advanced):

<div align="center"><figure><img src="/files/aOqTHN3ducPWME4zFi1s" alt=""><figcaption><p>The exact label will be slightly different depending on your resource type.</p></figcaption></figure></div>

Locksmith will **remove** this metafield if you:

* Disable the lock
* Delete the lock
* Disable the "Hide from sitemaps" setting
* Press the **Disable Locksmith** button from the Settings tab
* Press the **Remove Locksmith** button from the Help tab
* On collection locks, disabling "Protect products in this collection" will remove the metafield from the products inside the collection.

{% hint style="danger" %}
**Important**: Locksmith cannot perform any metafield operations if you remove the app from your store. So it is very important to perform one of the above - *before deleting the app from your store.*
{% endhint %}

#### This setting is available for locks on the following resource types:

* Products
* Collections
* Blogs
* Pages

## Caveats

* This setting can be convenient to remove locked products from all storefront searches, but just keep in mind that **products covered by this setting won't show up in storefront search at all, even for customers that have access**. If this is an issue for you, stick to [hiding from product grids ](https://www.locksmith.guide/tutorials/more/hiding-products-from-product-grids)whenever possible.
* Products in more that one locked collection: if you have the "Hide from sitemaps" setting turned on for more than one collection lock, products will retain the metafield as long as at least one locked collection with this setting turned on remains.

## Alternative setting: Add the "noindex" meta tag to any pages protected by this lock

{% hint style="info" %}
In addition to Shopify meta-*fields*, which is a Shopify concept for adding additional information to your resources, this section talks about meta-*tags*, which are an HTML concept. For example:

```html
<meta name="robots" content="noindex">
```

{% endhint %}

The add-noindex-metatag setting for Locksmith locks adds a "noindex"[ robots metatag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag?csw=1) to the page during rendering, which signals to search engines that you don't want that particular page indexed. This setting is turned on by default since the vast majority of merchants want their locked pages kept out of search engines.

Keep in mind that turning this setting OFF does not result in your locked content being indexed or available. It simply results in the locked version of the page (i.e. "This content is protected....) being available for indexing.

**This setting overlaps with the hide-from-sitemaps setting**. This setting does not add any metafields to your Shopify resources, but since the seo.hidden metafield already results in the "noindex" meta-tag being added to the resource page by Shopify, **the add-noindex-metatag setting is automatically toggled on when you turn on the hide-from-sitemaps setting.**

{% hint style="info" %}
Note: If you duplicate a product that is locked with the "Hide from Sitemaps" option enabled, that SEO:hidden metafield ***will*** be on that new product, and you'll need to remove it manually.\
\
To avoid this, disable the "Hide from Sitemaps" option before duplicating products. Then, re-enable after.
{% endhint %}

## Related

{% content-ref url="/pages/UM2j5kcD3lAniUmsgpg3" %}
[How does Locksmith affect search engines and SEO?](/faqs/more/how-does-locksmith-affect-search-engines-and-seo)
{% endcontent-ref %}


# Locking the home page

How to create a lock that covers the home page of your Online Store sales channel in Shopify

## Option 1 - locking your entire store

Locksmith gives you the ability to lock your entire store, which you can select when creating a new lock:

<figure><img src="/files/QVgvPFmXyd8zbXE95RZK" alt=""><figcaption></figcaption></figure>

Once the lock for your entire store is created, you'll see an option labelled *"*&#x41;llow access to the home page"**. It is unchecked by default** - **leave it that way to ensure that the home page is locked.**

<figure><img src="/files/HXY1WV2UXNA63YP6xtCj" alt=""><figcaption></figcaption></figure>

## Option 2 - create a lock that ONLY covers the home page

This can be done using a simple custom lock. Choose "Start a Liquid lock" from the list when creating a new lock:

<figure><img src="/files/cNhOXTlnktxri9I1rbrQ" alt=""><figcaption></figcaption></figure>

For the "Liquid condition", use `template == "index"`

<figure><img src="/files/HiON8EdAW3UOxSFSb4LL" alt=""><figcaption></figcaption></figure>

Press "Create lock" to finish the lock creation. Make sure to add your keys on the following page like normal.


# Setting up checkout validation with Locksmith

Protect against bots, cart permalink exploits, and other unauthorized orders by requiring specific customer tags to purchase products with specific product tags.

{% hint style="info" %}
Checkout validation is great for preventing unauthorized purchases — stopping bots, restricting high-demand products to approved customers, or enforcing wholesale/access rules at the point of sale.
{% endhint %}

## How it works

Unlike Locksmith's locks and keys system — which controls access to storefront pages and content — checkout validation runs directly in checkout. This means it catches attempts to bypass storefront restrictions entirely, including direct-to-checkout links and cart permalink exploits. A tagged product cannot be purchased unless the customer has one of the required tags, regardless of how the cart was assembled.

Because checkout needs to remain fast and efficient, Locksmith's checkout validation is limited to tag-based rules and cannot evaluate your full suite of key conditions. For more complex access control, use Locksmith's locks and keys on the storefront side in addition to checkout validation. Checkout validations are just a way to add a layer of extra checkout protection and, outside of specific circumstances, are often unneeded.

Each rule targets up to two product tags and up to two customer tags. A product matches if it has **either** product tag; a customer passes if they have **either** customer tag. You can create up to 25 rules per store.

## Prerequisites

* **Locksmith** installed on your store
* Products tagged appropriately in Shopify
* Customer tags set up for the customers you want to allow

## Step 1: Enable checkout validations in Locksmith

1. Open the **Locksmith** app from your Shopify admin.
2. Click **Settings** in the navigation.
3. Scroll down to the **Checkout validations** section.
4. Check **Enable checkout validations**.
5. Click **Save**.

After saving, Locksmith will prompt you to approve the **write\_validations** permission. This is required for Locksmith to create and manage checkout rules in Shopify.

{% hint style="warning" %}
Any existing Locksmith checkout validation rules (created via an older version of Locksmith) will be automatically removed when you grant this permission. You will need to recreate them here in the Locksmith settings UI. Checkout rules created by other apps or directly in the Shopify admin are not affected.
{% endhint %}

## Step 2: Add a validation rule

Once the permission is approved and you return to the Settings page:

1. Under **Checkout validations**, click **Add checkout validation**.
2. Fill in the rule:
   * **Product tags** — the tag (or tags, comma-separated) on products that require validation. For example: `wholesale-only` or `restricted, members-only`.
   * **Customer tags** — the tag (or tags, comma-separated) a customer must have to be allowed through. For example: `wholesale` or `approved, vip`.
   * **Error message** *(optional)* — the message shown to blocked customers. You can use `{{product_title}}` to include the product name. Leave blank to use the default message.
3. Make sure **Active** is checked.
4. Click **Done**.
5. Click **Save** at the top of the page.

{% hint style="info" %}
Each field supports up to **two** comma-separated tags. If you enter more, only the first two will be used.
{% endhint %}

## Step 3: Test your rule

Use a private browsing session (without the customer tag) to verify the rule blocks checkout, and a second test with an account that has the tag to confirm it passes through.

[How to use a private browsing session](/tutorials/more/how-to-use-a-private-browsing-session)

## Managing rules

* Rules can be toggled on or off individually using the **Active** checkbox without deleting them.
* Click **Edit** on any rule to update tags or the error message.
* Click **Delete** to remove a rule entirely.
* You can have up to **25 rules** active at once (a Shopify platform limit across all apps).


# Restricting access to payment methods with Locksmith

Control which payment methods are available at checkout based on customer tags, using Shopify's native payment customization functions.

Locksmith's payment customization feature lets you control payment method visibility at checkout based on customer tags. Each rule can work in one of two ways:

* **Show only to tagged customers** — the payment method is hidden from everyone *except* customers with the specified tag (e.g. show "Net 30 / Invoice" only to customers tagged `wholesale`)
* **Hide from tagged customers** — the payment method is hidden *from* customers with the specified tag, and visible to everyone else (e.g. hide "Cash on Delivery" from customers tagged `blocked`)

## How it works

Locksmith maintains a Shopify Function running natively in Shopify's checkout. When a customer reaches checkout, Shopify evaluates their tags against your configured rules and removes any payment methods they don't have access to — before the page renders. The customer never sees the hidden options.

## Prerequisites

* Locksmith installed on your Shopify store
* Customers tagged appropriately in Shopify (e.g. `wholesale`, `vip`, `net30`)
* The payment method names you want to restrict, as they appear at checkout

## Step 1: Open Locksmith Settings

Navigate to your Locksmith app and click **Settings** in the navigation.

Scroll down to the **Shopify Functions** section, where you'll find the **Payment Customization** card.

## Step 2: Enable the feature and grant permissions

Check **Enable this payment customization**.

Since this feature requires an additional Shopify permission (`write_payment_customizations`), Locksmith will need to request it. Click **Save** and then approve the permission request that follows. You'll be redirected back to Locksmith once access is granted.

Once access is approved, return to **Settings → Shopify Functions** to configure your rules.

## Step 3: Configure your rules

1. Click **Add payment method**
2. Enter the **payment method name** as it appears at checkout (e.g. `Cash on Delivery (COD)`, `Bank Deposit`, `Net 30`)
3. Enter one or more **customer tags** (comma-separated)
4. Choose the **Access** behavior for this rule:
   * **Show only to tagged customers** — hides the payment method from customers who don't have the tag
   * **Hide from tagged customers** — hides the payment method from customers who do have the tag
5. Repeat for additional payment methods (up to 3 rules)

{% hint style="info" %}
Payment method names are matched against what Shopify displays at checkout. If you're not sure of the name, check your Shopify **Settings → Payments** page.
{% endhint %}

**Case-insensitive matching** is enabled by default, so `Bank Deposit` and `bank deposit` are treated the same. You can turn this off if needed.

## Step 4: Save

Click **Save**. Locksmith will create the payment customization in Shopify immediately. You can verify it was created by checking **Settings → Payments → Payment customizations** in your Shopify admin.

## What customers experience

**"Show only to tagged customers" mode:**

* Customers **with** the tag: see the payment method at checkout as normal
* Customers **without** the tag: the payment method doesn't appear

**"Hide from tagged customers" mode:**

* Customers **with** the tag: the payment method doesn't appear
* Customers **without** the tag: see the payment method at checkout as normal

In both cases there's no error or explanation shown — the payment method is simply not offered to customers who shouldn't see it.

This works at the checkout level, so it applies regardless of how a customer reaches checkout.


# How to hide theme sections, blocks, and snippets

Create a theme hiding profile to lock specific parts of your Shopify themes according to your Locksmith lock conditions

By default, when you create a lock on a resource in your Shopify store, Locksmith prevents access to the direct URL for that resource only. For most locks, you can also toggle hiding for:

* Navigation menu links. [More information here](https://www.locksmith.guide/tutorials/more/hiding-navigation-links-for-locked-resources).
* Search results. [More information here](https://www.locksmith.guide/faqs/can-locksmith-hide-content-from-my-in-store-search).
* For products: product and collection grids/lists. [More information here](https://www.locksmith.guide/tutorials/more/hiding-products-from-product-grids).

If you are wanting to hiding anything beyond the above, or just want more granular control over what is hidden, you can use our "theme hiding profile" feature.

{% hint style="success" %}
The lock setting to **"Enable manual locking"** (which disables full page protection for locks) is useful for most applications of Locksmith’s theme hiding rules. You can find this option under your lock's **Advanced Settings**.
{% endhint %}

## 1. Accessing theme hiding profiles

Because each theme is different, hiding profiles are added **per theme**. So, this feature is accessed via the Themes tab. Once there, press the "Edit theme hiding profile" button.

<figure><img src="/files/IdvhurGJeGjdyRiavERd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can also edit hiding profiles for unpublished themes by using the ellipses ("...") button next to each unpublished theme shown.
{% endhint %}

## 2. Adding a hiding definition

A hiding definition hides a section, block, or snippet in your theme. One of the most common use-cases for this is to hide prices and/or add-to-cart buttons. To add hiding definitions for this use-case, use these steps:

1. Press the "Add new definition" button
2. Leave the "Selection method" at the default (Add by name)
3. In the "Name..." box, type in "price". Locksmith will show you all of sections, blocks, or snippets that have price in the name:

<figure><img src="/files/Ht67gqMCWDY2fIQJtMWZ" alt=""><figcaption></figcaption></figure>

4. Add each of the desired definitions. You'll need to repeat the search for each one.
5. Repeat the above 4 steps for every type that you want to hide. E.g. "quantity", "buy", etc. If you are hiding price and buy buttons, you will likely end up with something like this:

<figure><img src="/files/e2NLMP9F73v4x3IF3B0X" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If your theme is one of the free themes made by Shopify from the Shopify theme store, **and you are wanting to use this feature for price hiding or buy buttons hiding**, try the "theme hiding presets". Instead of choosing "Add by name" under "Selection method", choose "Add from theme presets", then choose either "Price" or "Buy buttons" and press "Add presets". You'll need to add add both presets if you are hiding both prices and buy buttons! Please note that presets will only match newer versions of these themes. **Note**: Because it is built in a way that doesn't use sections/blocks for price/cart buttons, the "Trade" theme is an exception (you won't find presets for it).
{% endhint %}

## 3. What to use for "Liquid variable"

"Liquid variable" is how you specify which Liquid object in the theme Locksmith should base the hiding on. Most use-cases for this feature are geared towards products and *most of the time*, theme developers simply use `product`. However, there are some exceptions. A "card product" file might assign to a variable called `card_product`, or a "featured product" file might use `featured_product`.\
\
If you are not locking a product, you'll want to use the applicable variable (`collection`, `cart`, `blog`, `shop`, etc).

Ultimately, what you put here depends on what is used in the theme, and if you want to ensure that this is right, **it will be necessary to open up your theme code editor to check what is used there**.

## 4. How "Replace" works

If the "Replace" checkbox is toggled on, instead of just hiding the content, Locksmith will replace it with the access denied message or access prompt. These messages can be customized in your locks. [More information about customizing messages here](https://www.locksmith.guide/tutorials/more/customizing-messages).

### Login to purchase button

For conditions requiring a customer login, the following is used as the default replacement to render a "Login to purchase" button that links to the login page. If you wish to customize the appearance of the button, you can copy/paste this code to your "Guest message content" and edit it as needed. It differs slightly depending on if you're using legacy customer accounts or standard.

**Standard customer accounts:**

{% code overflow="wrap" %}

```html
<p><a href="/customer_authentication/login?locale={{ request.locale.iso_code }}&return_to={{ request.path | url_encode }}" class="btn button button--full-width button--secondary">Log in to purchase</a></p>
```

{% endcode %}

**Legacy customer accounts:**

{% code overflow="wrap" %}

```html
<p><a href="/account/login?return_url={{ request.path }}" class="btn button button button--full-width button--secondary">Log in to purchase</a></p>
```

{% endcode %}

### Passcode button

If you are using a passcode key and need to render a passcode prompt button, use the following code (the button classes may need to be edited):

{% code overflow="wrap" %}

```html
<p><button class="locksmith-manual-trigger btn button">Enter passcode to purchase</button></p>
```

{% endcode %}

## 5. Save and test!

Once you've added all of your hiding definitions, save your hiding profile. Locksmith will perform an installation to the theme. Once the installation finishes, make sure to verify that everything is working as expected on the frontend of your store!\
\
Make sure you have the setting checked to "Enable manual locking" before testing:<br>

<figure><img src="/files/L33CMyVWdNraB7AKCITV" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can head back to the themes tab to check the status of a specific installation, whether it be for a published theme or not.
{% endhint %}

## How is this different from Locksmith's standard "manual locking"

Hiding profiles are intended to work alongside - or in many cases as a replacement for manually adding code for [manual locking](/tutorials/more/manual-mode). Hiding profiles function in almost the exact same way on the backend. Some differences are:

* Hiding profiles are easier to setup.
* Hiding profiles don't need manual removal from your theme, they remove themselves when Locksmith is disabled/uninstalled.
* Hiding profiles rely on the modularity of Online Store 2.0 themes, so adding code manually will still be necessary for legacy or highly customized themes.
* If the hiding target is not contained within a section, block, or snippet, manual locking will still be necessary.<br>

{% hint style="warning" %}
**Note**: While this method does hide elements like prices visually, it may still be possible for someone viewing the source (or interacting with the browser console) to see the price. This is because of the presence of things like Google Analytics and other tools, which reproduce the price in the source - but not visually on the page - for their own usage. **These are out of control of the Locksmith app.**
{% endhint %}

{% hint style="danger" %}
**Also note:** Locksmith's manual locking feature generally can ***not*** hide elements or sections that are being managed or displayed by other third-party apps, including page builder apps. Manual locking is only compatible with full-page locks, and is ***not*** compatible with variant locks.
{% endhint %}


# Creating weekly schedules

You can use Locksmith to make sure content in your Online Store channel is only available on specific days and hours.

## Creating the lock

You can add this to any lock type including your entire store, or a lock on a specific product, collection, page, etc. To create a lock on your entire store, for example, choose that from the list:

<figure><img src="/files/C1wM3uI1oJaXhuaHO6KQ" alt=""><figcaption></figcaption></figure>

## Adding the schedule

On the lock page, after creating a key, choose the 'weekly schedule' key condition. You can start to type "weekly" or "schedule" to narrow down the list quickly:

<figure><img src="/files/71Ylv70FjGjlkAacKCYn" alt=""><figcaption></figcaption></figure>

From there, setting up the schedule should be intuitive. You'll see a section for each day, and you'll be able to add as many time periods for each day as you need, in case your opening hours are not sequential.

{% hint style="info" %}
This condition *always* uses the time zone setting for your store. There is not a way to edit this in Locksmith. If you want to change which time zone is used, you'll need to [change the time zone for your store](https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/setup-business-settings#set-or-change-your-store-time-zone).
{% endhint %}

## Special dates

If you have different hours on specific dates, you can add those as well in the "Special dates" section.

<figure><img src="/files/8qLOkGRLD3xJoN3GgkJJ" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Adding no time periods to a day of the week or a special date means the schedule is set to close on that day.
{% endhint %}


# Using date and time key conditions

Learn how to use Locksmith's "before" and "after" date and time key conditions, including when to combine them within a single key versus adding them as separate keys.

Locksmith includes two key conditions for controlling access by date and time.

* **Is visiting before a certain date and time**\
  Grants access if the current time is *before* your chosen date.
* **Is visiting after a certain date and time**\
  Grants access if the current time is *after* your chosen date.

These are best for *one-off* moments. Think launches, limited sales, or short blackout periods.

If you need a recurring weekly schedule, use a weekly schedule key. See [Creating weekly schedules](/tutorials/more/creating-weekly-schedules).

## How each condition works

### "Permit if the customer is visiting **after** a certain date and time"

This grants access once the date and time has passed. Before that moment, access is denied.

**Example use case**

You're launching a collection on March 15 at 9:00 AM. Add a key that permits access *after* that time:<br>

<figure><img src="/files/SP3otj6QxFrjPmslpi6I" alt=""><figcaption></figcaption></figure>

Before 9:00 AM, visitors see your lock's denial message. After 9:00 AM, the collection opens automatically.

### "Permit if the customer is visiting **before** a certain date and time"

This grants access until the date and time arrives. After that moment, access is denied.

**Example use case**

You're running early access that ends March 20 at midnight. Add a key that permits access *before* that time:

<figure><img src="/files/9mvRyGUhax83O97F2GW8" alt=""><figcaption></figcaption></figure>

Visitors can access until the deadline. Afterwards, the lock closes automatically.

## Combining date and time conditions

This is where **AND vs OR** matters. For deeper background, see [Combining key conditions](/keys/more/combining-key-conditions). You can also read the [overview explanation](https://www.locksmith.guide/basics/overview#chaining-combining-conditions-together-or-versus-and).

Here’s the rule:

* Conditions inside the **same key** use **AND** logic.
* Separate **keys** on the same lock use **OR** logic.

### Use AND to grant access *during* a time window

If you want access only between two dates, use **one key**. Add both conditions to that single key.

**Example**

Open access from March 10 at 9:00 AM. Close it March 17 at 9:00 AM.

Set up one key:

* Permit if it's **after** March 10 at 9:00 AM
* **AND** permit if it's **before** March 17 at 9:00 AM

<figure><img src="/files/mxvApYLscZSfEs7VY3Dr" alt=""><figcaption></figcaption></figure>

Access is denied before March 10. Access is denied after March 17.

### Use OR to grant access *outside* a time window

If you want to block access during a period, use **two keys**. No single moment can be both before a start and after an end.

**Example**

Block access during restocking. Restocking runs March 10 at 9:00 AM to March 17 at 9:00 AM.

Set up two keys:

* **Key 1:** Permit if it's **before** March 10 at 9:00 AM
* **Key 2:** **OR**, Permit if it's **after** March 17 at 9:00 AM

<figure><img src="/files/XSCZpZvP27qG65ByZPMr" alt=""><figcaption></figcaption></figure>

Before March 10, Key 1 grants access. After March 17, Key 2 grants access. During the window, neither key passes.

## Impossible combined time conditions to avoid

{% hint style="warning" %}
**Watch out for impossible conditions.**

If you have time keys combined with "AND", and your "after" time is later than your "before" time, the key never opens. No moment can satisfy both at once.
{% endhint %}

This will never work in a single combined key:

* Permit if it's after March 17
* **And** permit if it's before March 10

If you're trying to allow access outside a window, use two keys instead. See the **OR** example above.

## Quick reference

* Open access **after** a single date\
  One key: "after \[date]"
* Open access **until** a single date\
  One key: "before \[date]"
* Open access **during** a window\
  One key: "after \[start]" AND "before \[end]"
* Block access **during** a window\
  Two keys: "before \[start]" OR "after \[end]"
* Recurring weekly hours\
  Use a [weekly schedule](/tutorials/more/creating-weekly-schedules) key instead

## A note on time zones

Date and time keys use your store time zone. Set it in Shopify under **Settings > General**.

If you need help changing it, see Shopify’s guide: <https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/setup-business-settings#set-or-change-your-store-time-zone>

## Related articles

{% content-ref url="/pages/BbEIkISi5XdTtEe4SKt1" %}
[Creating keys](/basics/creating-keys)
{% endcontent-ref %}

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions)
{% endcontent-ref %}

{% content-ref url="/pages/uiI8pILDTkHLl0vARExA" %}
[Creating weekly schedules](/tutorials/more/creating-weekly-schedules)
{% endcontent-ref %}


# About key conditions

In Locksmith, customer access is always granted using *keys* – simple statements that describe the conditions for access.

For example, one might have a key that says "Permit if the customer is signed in". In this example, the *key condition* is "if the customer is signed in".

A full list of key conditions can be found in our guide here:

{% content-ref url="/pages/BbEIkISi5XdTtEe4SKt1" %}
[Creating keys](/basics/creating-keys)
{% endcontent-ref %}

Read on in this section to find out more information about how to set up many of our most popular key condition types.


# Customer account keys

Many of Locksmith's key conditions use the customer account system that comes by default with all Shopify stores to check for specific customer attributes before granting access. These are detailed below.

{% hint style="info" %}
**Note**: Locksmith does **not** create a separate account system or customer database! In order to use customer accounts with Locksmith, you'll first need to [make sure that customer accounts are activated in your store](https://help.shopify.com/en/manual/customers/customer-accounts#set-your-customer-account-preferences).
{% endhint %}

When these key conditions are used, **Locksmith will ask that a customer signs in first**, whenever a customer tries to access the locked content in your store. Locksmith does so by automatically displaying the login template from your theme:

![](/files/VQwivnx6b2jpZMbm3Baj)

Some of the options available to you include checking **if the customer**...

* **is signed in**\
  This condition requires all customers to log in. Once they're logged in, they'll be granted access to the locked resource.
* **is tagged with…**\
  This condition *first* requires all visitors to log in with a customer account. Once the customer has logged into their account, they'll be granted access *if* their customer account has the tag you've chosen in Locksmith. (When inverted: ***unless*****&#x20;the customer is tagged with..., or is&#x20;*****not*****&#x20;signed in**)
* **has placed at least x orders**\
  This condition requires the visitor to be logged in with their customer account. If their lifetime order count is at least the number that you specify, they'll be granted access.
* **has purchased…**\
  This condition requires the visitor to be logged in with their customer account, prompting them to log in if they aren't already. If their last 50 orders contain a certain product (identified by SKU, title, or by product tag), they'll be granted access.
* **the customer's email contains…**\
  This condition requires the visitor to be logged in with their customer account. If their email address matches some text that you specify (say, "@mycompany.com"), they'll be granted access.
* **has one of many email addresses**\
  This condition requires the visitor to be logged in with their customer account. If their email address is on the list that you specify, they'll be granted access. Simply to set up, but not recommend if you have a large number of email addresses. See below for an alternate option.
* **has an email from an input list**\
  This condition requires the visitor to be logged in with their customer account. If their email address is on the list that you specify, they'll be granted access. This key condition is different than the above, in that it leverages [Locksmith's input list feature](/tutorials/more/input-lists), which lets you use a very large number of of email addresses. While not hard to set up, it does require a few more steps than the one-of-many-email-addresses key condition above.

## Creating keys

The guide linked below covers adding a key to a lock and selecting a key condition:

{% content-ref url="/pages/BbEIkISi5XdTtEe4SKt1" %}
[Creating keys](/basics/creating-keys)
{% endcontent-ref %}

## Inverting key conditions

Don't forget that all key conditions can be inverted! Which just means that Locksmith will check for *the opposite of* the original condition. More info on that here:

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
{% endcontent-ref %}

## Liquid key conditions

If the list above does not include the exact customer attribute that you are wanting to check, you have the flexibility to use [any Liquid attribute that Shopify makes available on the customer object](https://shopify.dev/api/liquid/objects#customer). This is done by using a "custom Liquid" key condition.

Most notably, **this would allow you to use customer metafields** in order to grant access. More complete information on custom liquid key conditions - including setup guide - here:

{% content-ref url="/pages/ve2JX4pz2jetN297ciB6" %}
[Custom Liquid key-condition basics](/keys/more/custom-liquid-key-condition-basics)
{% endcontent-ref %}

## More information related to customer accounts

Here are a few more links to guides that you might find useful as you set up Locksmith to work with your customer account system:

{% content-ref url="/pages/JLN0jWFrcYvt6efxhMT0" %}
[Approving customer registrations](/tutorials/approving-customer-registrations)
{% endcontent-ref %}

{% content-ref url="/pages/xbxhHadjI7Iip4aWc2rq" %}
[Customizing the customer login page](/tutorials/more/customizing-the-customer-login-page)
{% endcontent-ref %}

{% content-ref url="/pages/aGfqo2XVdHpo4Z5mXBsa" %}
[Customizing the registration form](/tutorials/more/customizing-the-registration-form)
{% endcontent-ref %}

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

As always, please feel free to reach out to us directly via email at **<team@uselocksmith.com>** if you have any questions!


# Passcode keys

Passcode keys are a simple way to grant access to content **without** needing to require sign in or registration. They work completely independent of the Shopify customer account system.

After you use the Locksmith search bar to create a lock on the product or collection that you want to lock, choose one of the passcode conditions from the conditions list under "Keys":

<figure><img src="/files/9T9HTJdmOF6KeQVXwrly" alt=""><figcaption><p>Typing in "passcode" into the input will filter the list to only show passcode key condition types.</p></figcaption></figure>

**Single passcode**: Use when only one passcode is needed.

**Many passcodes**: Allows you to enter many passcodes at one. Enter your passcodes one per line. This is a quick way to set up multiple passcodes at once. However, the input-list is more performant with large quantities(more than a thousand or so), *particularly if using single-use passcodes,* so in these cases, it is recommended that you default to an input list.

**Input list**: Allows you to add your passcodes to a google sheet or other file that is stored online outside of Locksmith. Capacity for many hundreds of thousands of passcodes. [More information on input lists here](/tutorials/more/input-lists). When setting up an input list, you can specify a usage limit that will apply to all passcodes inside the input list.

Once the key is created, and the lock is saved, your customers will now be prompted to enter the passcode when they visit the locked page:

![](/files/1wTBdoxx6D7z8ZUKgbRE)

{% hint style="info" %}

#### Important info about testing passcode keys

When you give the correct passcode at the passcode prompt form, Locksmith will remember you by saving a session cookie in your browser. That means that when you come back to view the shop, you'll likely still have access, making it seem like the lock isn't working.

So, when testing passcode keys, *be sure to use a new* [*private browser window*](/tutorials/more/how-to-use-a-private-browsing-session) *each time*. That shows you what a new visitor will see.
{% endhint %}

### General Passcode Key Notes

* Passcode keys allow you to require a password for access without requiring the customer to log into an account. They are completely separate from the customer account system.
* Passcode keys will increase loading time just a bit, on the first page load.
* The passcode key is what we call a "remote key" which saves info in your cart attributes. That info gets passed through as a note on your orders. You can remove that following [the steps here](/faqs/more/why-is-locksmith-adding-information-to-my-orders).
* Passcode entry is applied across your entire store, so if you set multiple locks with the same passcode, entering the passcode at any of those locked pages will also allow the customer to access the other locked resources--all without requiring another passcode entry. This also works to reveal navigation links pointing to those locked resources, when the "hide links" option is enabled on a lock.

#### Case sensitivity

Passcodes are **case-sensitive by default** — so `mypass` and `MyPass` are treated as different passcodes. You can disable this by unchecking the **Case sensitive** option on the key condition, which will make matching case-insensitive.

{% hint style="info" %}
The **Input list** key condition does not have a case sensitivity option on the condition itself. Case sensitivity for input lists is configured on the input list, in your Locksmith settings.
{% endhint %}

#### Whitespace handling

Leading and trailing whitespace is automatically stripped from what the customer types before it's compared to your passcode, so an accidental leading or trailing space won't cause a failed entry. However, whitespace **within** a passcode must match exactly — if your passcode is `hello world` (one space), `hello world` (two spaces) will not work.

####

### Passcode key options

**Passcode uses left**

Found in the single passcode key. Use this option only if you want the passcode to have a usage limit. The number will decrease by one each time the passcode is entered. When the number hits zero, the passcode will no longer work.

**Case sensitive**

Available on single and many passcodes. Enabled by default — uncheck to allow case-insensitive matching (e.g. so `mypass` and `MYPASS` both work). For input lists, this setting lives on the input list itself.

**Hide the user's input as they type**

Available on all passcode key types. When enabled, the passcode field behaves like a standard password input, masking the characters as the customer types. Note: this option is automatically disabled when "Show passcodes as dropdown" is turned on.

**Show passcodes as dropdown**

Found in the "many passcodes" key only. Instead of a free-text input, customers choose their passcode from a dropdown menu. Limited to 100 passcodes.

{% hint style="danger" %}
This option reveals all valid passcodes to anyone who visits the locked page. Use it only when that's intentional.
{% endhint %}

**Allow only one use per passcode**

Found in the "many passcodes" key only. When the customer gives a passcode from the list, it gets removed from the list and can't be used again (unless you re-add it). **Note:** If you want to add a usage limit to a passcode-from-input-list key condition, that is done on the input list itself. [More information on input lists here](/tutorials/more/input-lists).

**Remember for signed in customers**

This option will remember a customer who was signed in when they entered the passcode, and never ask them again when they're signed in.

**Customer auto tag**

If the customer is logged into their account when they give the passcode, they'll get tagged with the tag you enter here.

**Custom input prompt**

An optional message shown to the customer when asking for their passcode. Supports HTML and Liquid. If you only need one message across all your passcode locks, it's simpler to set it at the lock level in the Messages area instead.

**Automatic timeout**

Grant access for a limited period of time after the passcode is entered. [More information here](/tutorials/more/grant-access-for-a-limited-time-when-using-passcodes-or-secret-links).

### Passcodes and manual locking

Passcode keys are compatible with manual locking! This means that you can hide only selected parts of the page, instead of the whole page. For example, [when hiding prices](/tutorials/hiding-prices).

If you have a manual passcode lock set up, the customer will not get prompted for a passcode automatically. So in this case it's necessary to add a button to trigger the passcode prompt. Use the following code to add a button to your page:

```
<a href="" class="btn button locksmith-manual-trigger">Enter passcode to access</a><br>
```

The classes may need editing to match your theme.

When the customer clicks that button, they'll be presented with the passcode prompt as normal. If they enter the correct passcode and submit, the page will reload but this time showing your locked content.

{% hint style="danger" %}
Passcode keys are ***not*** compatible with variant locks by default. Please see: <https://www.locksmith.guide/tutorials/more/locking-variants#using-passcodes-with-variant-locks>
{% endhint %}

## Related articles

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

{% content-ref url="/pages/EetOspcpGCRq9p3wY9Fi" %}
[Customizing the passcode form](/tutorials/more/customizing-the-passcode-form)
{% endcontent-ref %}

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}


# Secret link keys

{% hint style="info" %}
**Note:** Some marketing and email services (such as Klaviyo or Mailchimp) may automatically add tracking information to the end of a URL to monitor clicks or other metrics. This code will also need to be separated from the secret link's extension code using an ampersand (&). See the [Secret link formatting section](#secret-link-formatting) of this guide for more information.
{% endhint %}

{% hint style="warning" %}
**Testing:** We strongly recommend testing your secret links in the same manner they will be sent to customers before launching a marketing campaign or exclusive sale. This ensures that customers receive a functioning link.\
See our guide that covers testing troubleshooting tips below:\
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endhint %}

In Locksmith, a "secret link" is a Shopify URL that contains a "secret code" on the end of it, like this:

<https://example.com/products/example?ls=FoO-rNBaTquJgqh1tbXjEQ>

When a locked resource has a secret link key, only visitors who arrive via that link will be able to view the resource. This makes secret links useful for secret sales, or for offering specific products that are only available via certain ad campaigns.

## Setup

To configure a secret link, start by creating a lock (If you need more information on creating a lock, [start with our guide here](/basics/creating-locks)).

Then, in the lock settings, follow the prompts to create a secret link key:

![This image shows you how to quickly create a single secret link.](/files/LgyQlf07NWhJnS4WwBZV)

### **Secret link types**

#### **Regular secret links**

This will generate a single secret link for you that can immediately copy and use. You can also enter a custom secret link code if preferred. The setup is very straightforward (shown in the screenshot above).

#### **Secret links from an input list**

It is also possible to use secret links in conjunction with our input list feature. Input lists allow you to store a list of links in a google sheet or other outside file source. This is great for merchants that want to easily create a large list of unique secret links that can be used. [Go here for information on setting up input lists](/tutorials/more/input-lists). To use the input list version, select it instead of the regular secret link key condition type.

Input lists also allow you to create **usage limits on your secret links** (usage limits are not possible for the single secret link option). So, for example, you could create a large list of secret links that could each only be used one(the input list guide, link just above, gives more information on setting this up). Or, you could simply add in a single secret link with a large usage limit.

To use the input list version of the secret link key, select it from the key dropdown:

![](/files/k7IWxHUGnu7k1h3LDuUz)

## How secret links work

Secret links consist of two parts:

* The secret link *code* (top box): This is the "secret" part of the link, which you can change to whatever you like.
* The full secret link (bottom box): This is the link you send your customers, or whoever should see the locked content. It's the regular URL for your locked content, with the secret link code appended to it. Click the copy button to copy to your clipboard.

Want your link code to be something different? You can simply change that, and it will update the full link:

![](/files/vW6bhNa39UiKUDSgikV7)

### Secret link formatting

It's important to note that the secret link code *must* be an exact match in order to work. If the customer accidentally adds a character to the end of that link, they won't get access.

Having said that, there is some flexibility on how the URL is constructed. The secret link code can be presented in several, valid ways, illustrated here:

* <https://example.com/?ls=MYSUPERSECRETLINK>
* <https://example.com/?another\\_parameter=ABC123\\&ls=MYSUPERSECRETLINK>
* <https://example.com/?ls=MYSUPERSECRETLINK\\&another\\_parameter=ABC123&>...
* <https://example.com/products/my-product?variant=32213744255111¤ty=USD\\&ls=MYSUPERSECRETLINK>

{% hint style="success" %}
Please note that the secret link must use URL-friendly characters in order to be evaluated correctly.

**Acceptable characters are:**

* Alphanumeric: 0-9a-zA-Z
* Special characters: $-\_.+!\*'()
  {% endhint %}

## Usage notes

### Returning visitors

Once a visitor arrives via a secret link, Locksmith will remember their access for a while. If you're testing, this can make it look like the key is no longer working. Try using a new private browsing session to test for that.

The secret link key condition also has a "Grant access for a limited time" option that can revoke a customer's access after a set amount of time passes from initial use. Details on using this option are here: [Grant access for a limited time when using passcodes or secret links](/tutorials/more/grant-access-for-a-limited-time-when-using-passcodes-or-secret-links)

{% hint style="info" %}
Note: removing a secret link from a lock, or changing a secret link's extension code will revoke access for any customers who used the original secret link.
{% endhint %}

### Re-using secret link codes

If you've got several secret link keys, across different locks, any keys that re-use the same secret code will *all* be activated when *one* link is used. This way, you can unlock several pieces of content across your store, using only a single secret link.

### Using a vendor's referral link as a secret code

If you're using a referral service (or any other service that generates a URL with a specific code at the end), you can use the referral URL's "query string" as the secret code for your key.

For example, if you're using a referral URL that looks like <https://example.com/?rfsn=abc123>, you may set your secret link code to "rfsn=abc123", and your Locksmith key will just work:

<figure><img src="/files/6JiVqhV4wcrys0lqmKmO" alt=""><figcaption><p>Example: adding a referral link URL's querystring to the Secret Link key</p></figcaption></figure>

### Restricting where locked content is revealed

If your lock has been configured for resource hiding, the successful use of a secret link will reveal the hidden resource across your online store. If you'd like to make sure that your locked product (for example) can *only ever* be viewed on its product page, and never via store search or collection listings, add a second condition to your key which limits the key's usage to *only* the product page.

To do this, use the "and..." link next to your existing key, and select the "(custom Liquid)" option. Fill in the Liquid condition with *request.page\_type == "product"*, as shown below.

![](/files/VyZgUnMk7KuMndO7TGX3)

The result: your secret link key will continue to work normally, but the access afforded by the key will *only* work when the visitor is literally on a product page. This means that the key will *not* kick in when the visitor is (for example) looking at search results, which means that the product will remain hidden in those places.

## Some things to be mindful of when sending customers secret links

* If "ls=" hasn't been included at the beginning of the secret link code. A secret link code can still work without this, but if a customer is visiting your store for the first time, Shopify may be unsure of what the code at the end of the URL is doing and could redirect customers to the homepage before the lock is opened.\
  \
  This might make it appear as though the secret link isn't working. However, a second attempt usually succeeds. Including "ls=" at the beginning of the secret link code should prevent this issue.<br>
* If you're sending out a marketing email or similar communication, make sure to test the email first. Sometimes the wrong or incomplete secret link can be added, or the marketing email can unexpectedly modify or add additional information to the URL.<br>
* If additional information is being added to the URL, ensure that it is separated from the secret link code using an ampersand (&). This allows Locksmith to differentiate the secret link code from other information. See the [Secret link formatting section](#secret-link-formatting) of this guide for more information.

### Related pages:

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}


# Visitor location keys

How to restrict access to the content in your Shopify Online Store based on the location of the IP visitor's IP address

Locksmith can help you restrict access by *automatically* detecting the location of the **IP address** of a visitor. The location condition supports many type of locations including:

* **Regions** (eg: North America, Asia, Antarctica)
* **Countries** (eg: Australia, Germany, Nauru)
* **Provinces/States** (eg: Texas, Nova Scotia, Sikkim)
* **Cities** (eg: Montreal, Chicago, Tokyo)
* **Towns** (eg: Český Krumlov, Santa Maddalena)

{% hint style="warning" %}
**Important**: Locksmith uses the word "location" in the generic sense. This "location key" feature from Locksmith does NOT correspond to the[ inventory management scheme that Shopify also calls "Locations"](https://help.shopify.com/en/manual/locations). Consider using [Shopify's "Markets" feature](https://help.shopify.com/en/manual/markets/managing-markets), if you need to restrict purchasing based on inventory location.
{% endhint %}

{% hint style="info" %}
**Also note**: If your store *is* using the "[Shopify Markets](https://help.shopify.com/en/manual/markets)" feature, and you are looking for a way to automatically show content based on which "market" the customer is visiting from, we have [a dedicated guide to doing this here](https://www.locksmith.guide/tutorials/more/shopify-markets).
{% endhint %}

## Giving access to locations

Once you've created your lock, choose the Location key:

<figure><img src="/files/TcRtFGNBegmzO2f9CaI6" alt=""><figcaption></figcaption></figure>

Next, in the key configuration box, search for the location:

<figure><img src="/files/vRJodDHqOlXmdeohkcX6" alt=""><figcaption></figcaption></figure>

Click the name of the area to add it to the key. Feel free to add additional locations:

<figure><img src="/files/JjCGllZsubGML20AuttK" alt=""><figcaption></figcaption></figure>

\
Save the key, and you're all set. Those locations will be given access to your locked content, but everyone else around the world won't.

## Hiding FROM locations

\
To make sure some locations *don't* see your locked content, you'll use the same method.

Add your location(s) to the key like normal, but this time click the "invert" box in the lower left of the key box:

<figure><img src="/files/JBMA2DvOOYQMpXl74ZMs" alt=""><figcaption></figcaption></figure>

The result here is that customers around the world can get access to your locked content, all except for those in that location.

## SEO Limitations

It is important to know that content protected under these key types will not be indexed properly, when used normally. This will strongly effect your SEO for any pages that are covered by these locks. This is because of Google's rules against cloaking. That is to say - we are not allowed to show different content to a search engine vs a regular visitor, as per Google regulations.

If you are using Location or IP address keys, and you still want your content to be indexed, you still have options!

If you have specific products that are not available in certain countries: You'll need to use manual locking to hide only the add-to-cart button. [More info on that here](/tutorials/hiding-prices).

If you have different versions for different countries: You can create separate versions of your products using variants, and setting up Locksmith to hide the variants depending on who is visiting. [More info on that here](/tutorials/more/locking-variants).

## Shipping Address Limitations

Locksmith can only protect the frontend of your Online Store, and cannot extend its protections to Checkout. So, this does not prevent customers who have IP addresses located in an allowed location from choosing a specific shipping address that is in a blocked location at checkout. Locksmith is not able to control shipping destinations during checkout. For this, [check out Shopify's Shipping Profiles feature](https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/shipping-profiles).

### Testing the location key:

When testing, the browser may cache your access and continue showing you the same version of that page. So, to test the location key you'll want to:

1\. Connect to a VPN for a specific location.

2\. Open up a **new** private browsing session (sometimes called 'incognito mode').

3\. Visit the locked collection/page/product etc. using the private browsing session.

4\. Close **all** of your private browsing windows when you're done testing a single location.

5\. Repeat the steps 1-4 for each new location.

You'll want to make sure you use a **brand new private browsing session** *each time* you test a location, as Locksmith uses the same mechanism as the browser and Shopify to remember previously stored access.

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}

{% content-ref url="/pages/YlgXzL9Q7dWf6b1zdX3N" %}
[How to use a private browsing session](/tutorials/more/how-to-use-a-private-browsing-session)
{% endcontent-ref %}


# More about keys...

Check the following or simply use the search bar in the header to quickly find the topic that you're looking for!


# Inverting conditions in Locksmith

There are many instances in which it is useful for a key to grant access if the *opposite* of your key condition is true.

Locksmith makes it easy to invert keys. To do so, simply click the box next to "invert" when you're editing the key:

<figure><img src="/files/CsoPSw2MHqs9LBGXRxQg" alt=""><figcaption></figcaption></figure>

Notice that when this is done, the wording will update, inverting the key condition logic:

<figure><img src="/files/igGMnvCAVqEpWxIuZoom" alt=""><figcaption></figcaption></figure>

Make sure to "Save" the lock, and you're done!

As always, **feel free to contact us via email** at <team@uselocksmith.com>.<br>

{% hint style="info" %}
**A note on inverted customer account keys**

When you invert a [customer account key condition](/keys/customer-account-keys) — such as "is tagged with," "has purchased," or "email contains" — the inverted key will also grant access to visitors who are **not** signed in, since they technically meet the inverted condition — they have no customer account details (tags, email, purchase history, etc.) associated with them.

If you want to require sign-in, combine the inverted condition with an "is signed in" condition inside the same key:

[Combining key conditions](/keys/more/combining-key-conditions)
{% endhint %}


# Combining key conditions

At times, you'll want to permit visitors to access a resource if *several* conditions are met. This can be a method of increasing security: you might, for example, require visitors to arrive at your sale collection via a secret link, *but then* you'll want them to *also* provide their personal passcode.

All of Locksmith's key conditions can be combined with all other key conditions. (For the full list, see [Types of key conditions](https://docs.uselocksmith.com/article/492-types-of-key-conditions).) This is powerful! It means you can start to chain pieces of authorization logic together, to achieve really specific results.

## Setup

To configure a combination key, begin by creating a standard key using whatever your first condition ought to be. Then, use the "Edit" link (shown next to the condition description). Scroll down to "+ Add key condition". Locksmith will prompt you to add a second condition, which you then configure in exactly the same way as the first.

Note that you'll see another "+ Add key condition" link, appearing in the key settings of your second condition. Yes, you may continue chaining conditions as needed – there are no limits here. :)

Using the example from earlier, in which a secret link condition is combined with a passcode condition, here's a demonstration:

<figure><img src="/files/yAhxcu2I8sqQas42G9uc" alt=""><figcaption></figcaption></figure>


# "Has purchased..." key

Granting access to content in your store only after the appropriate purchase has been made

Locksmith allows you to check for a purchase of a specific product and *only* grant access to your locked content if an applicable purchase has been made.

{% hint style="warning" %}
This key condition can only account for a customer's latest 50 orders (and in some cases only the latest 25). Learn more about this in the [Limitations](#limitations) section.
{% endhint %}

{% hint style="info" %}
This key condition relies on [Shopify's customer account system](https://help.shopify.com/en/manual/customers/customer-accounts), the same that's used throughout Shopify for all Shopify stores. Customer accounts need to be enabled for your store in order for this key condition to function correctly.

Additionally, when this key condition is used, Locksmith will automatically prompt guests to sign in to their customer account when they visit a locked page.

[Learn more about customer account keys](/keys/customer-account-keys)
{% endhint %}

## Setup

Once you [create a lock](/basics/creating-locks) that covers the content that you want to require a purchase for, click the "+ Add key" button. In the condition selector that appears, select "if the customer has purchased...".

<div data-full-width="false"><figure><img src="/files/f84mDvXP0gotrN3yPy82" alt=""><figcaption></figcaption></figure></div>

Locksmith will examine the customer's order history for products matching what you enter.

{% hint style="warning" %}
**Important**: Whether you choose to enter the SKU, title (shown above), variant ID, or product tag, **they are all case sensitive**!
{% endhint %}

<figure><img src="/files/DVax9JlklLrTuTVbICbX" alt=""><figcaption></figcaption></figure>

## Options

#### Maximum quantity purchased

Sets a maximum allowed purchase amount. When used, Locksmith will only grant access if the customer has not yet purchased *this many* units of the product

#### Only look at orders in the last...

Allows to you specify how far back, in days, you would like Locksmith to check for the purchase of the specified product. E.g. you may want to only allow access for 30 days after purchase.

{% hint style="warning" %}
**Leaving this field blank is not the same as entering 0.**

A **blank** field means there is no time limit — Locksmith will check the customer's order history regardless of how long ago the purchase was made. Leave this field blank if access should last indefinitely.

Entering **0** tells Locksmith to look back zero days, which means **no order will ever qualify, and the key will never grant access**. Because a key configured this way looks valid and produces no error, it can be difficult to spot when troubleshooting a lock that isn't opening.
{% endhint %}

#### Ignore cancelled orders

When ON - Cancelled orders will not fulfill the requirements for access. Default: ON.

#### Ignore unfulfilled or partially fulfilled orders

When ON - Unfulfilled orders will not fulfill the requirements for access. Default: OFF, most merchants will want to leave it this way.

#### Ignore orders that are not fully paid

When ON - Only orders with a payment status of "Paid" will fulfill the requirements for this lock. Default: ON.

{% hint style="danger" %}
**Caution**: This setting often causes issues for merchants *who are testing out their locks*. Consider turning this setting OFF while testing, but back ON for general use.
{% endhint %}

## Inverting this key condition

Like all key conditions, this one can be inverted. This is useful to verify that a customer has NOT yet purchased a specific product:

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith)
{% endcontent-ref %}

On its own, the inverted "***unless*** the customer has purchased..." key will grant access to anyone who has not purchased the product, including non-signed in customers. To require customers sign in, you'll want to *combine* the "***unless*** the customer has purchased..." key with the "is signed in" key:

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions)
{% endcontent-ref %}

## Limitations

This key condition can only account for the 50 most recent orders for the current customer. In some cases, it can only account for the most recent 25 orders instead.

The stricter 25-order limit comes into play when a customer navigates to a URL that includes a page number, e.g. a URL with "?page=2" in it. This is because a page number in the URL limits Locksmith's ability to ask Shopify for the maximum number of orders possible (i.e. 50), leaving Locksmith to work with the default number of orders (i.e. 25).

{% hint style="info" %}
To work around this limit, consider setting up your Shopify store to auto-tag customers according to their order history. These customer tags can then be used in new Locksmith keys which grant access based on those tags.

Locksmith doesn't have customer auto-tagging built in, so merchants generally accomplish this by involving a second app.

* [Shopify Flow](https://apps.shopify.com/flow) has options for auto-tagging, and is available for free for all stores.
* [Mechanic](https://apps.shopify.com/mechanic) (also made by Lightward) has [a variety of tasks](https://tasks.mechanic.dev/?q=tag%20customer) that can be used for this purpose. Like Locksmith, Mechanic is also available under Lightward's [Pay What Feels Good](https://lightward.com/pricing) pricing policy.
  {% endhint %}

## Related articles

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

{% content-ref url="/pages/Rtavrz1uam6HlWPicwww" %}
[Selling digital content on Shopify](/tutorials/selling-digital-content-on-shopify)
{% endcontent-ref %}


# Using the "Force open other locks" setting

How to deal with multiple overlapping locks preventing customers from accessing the content inside them

This setting is useful if you have multiple Locksmith locks that cover overlapping content (e.g. collection locks with some of the same products), and want to make sure that each lock grants full access to the content it covers, without other locks preventing access.

To turn on the "Force open other locks" setting, go to **each applicable (overlapping) lock** and follow these steps:

It is found directly under your keys in the section labelled "**Key options**":

<figure><img src="/files/BcI4YlkT8FzBcWgi1hPO" alt=""><figcaption></figcaption></figure>

You'll also notice that the the key shows a message telling you which keys are forcing open other locks.<br>

<figure><img src="/files/QU7YdkcdmjK9KcIR2YW8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: Since this is a key-specific setting, if you have multiple keys, make sure it is turned on for each key. Each key has its own key icon, so that's a quick way to tell if you have multiple keys.
{% endhint %}


# Custom Liquid key-condition basics

How to create customer liquid key conditions in Locksmith

Locksmith allows you to create a custom key conditions that use Liquid to determine whether or not the current visitor has access. This gives you a few more options than what comes with Locksmith's out-of-the-box key conditions.

Before continuing on, you may want to [check out Shopify's Liquid reference](https://shopify.dev/api/liquid), as that will give you a good idea of the kinds of things you can use when creating Liquid key conditions. Keep in mind that while Liquid key conditions can add more versatility, they are still limited to the scope of what's already available inside of Shopify's Liquid engine for the Online Store channel.

{% hint style="info" %}
This is an advanced guide that requires knowledge of [Shopify's Liquid language](https://shopify.dev/api/liquid). If you're a developer type, read on! Otherwise, please note that Locksmith support is not able to write advanced custom Liquid keys for you. While we are happy to answer any questions you have along the way, if you need help writing these, you'll need to hire a paid Shopify expert. [Our list of partners is here](https://locksmith.partnerpage.io/). Alternatively, you can check [Shopify's own list of Shopify experts](https://www.shopify.com/partners/directory).
{% endhint %}

To create a Liquid key condition, start by selecting it from the key condition list. You'll be presented with the key condition area for Liquid key conditions:

<figure><img src="/files/01laNr7CknsLH7s2f4Ic" alt=""><figcaption></figcaption></figure>

## The "Liquid condition"

This is where you'll write the primary condition, using Liquid. The condition simply needs to evaluate to true or false.

For example, consider if you simply wrote the following:

`{% if`**`false`**`%}`

This would result in this particular key never opening, since it's always false. This is not necessarily advisable(it would be the equivalent of adding no keys at all), but it's a proof of concept.

So, here are some examples of useful conditions.

#### **To check for a metafield**

`{% if customer.metafields.namespace.key == "matching-value" %}`

{% hint style="info" %}
The metafield must be public in order for it to be accessed this way. [More information on Shopify meta-fields here](https://shopify.dev/api/liquid/objects#metafield).
{% endhint %}

#### To check if the customer has at least 5 items in the cart currently

`{% if cart.item_count > 4 %}`

#### To check if the customer has spent at least $50 in the past

`{% if customer.total_spent > 5000 %}`

#### To check if the current page is a using the "collection" template

`{% if template == "collection" %}`

{% hint style="info" %}
For most themes, this should match any collection pages unless you've created custom templates. You can use this strategy for other resource types as well (products, pages, etc).
{% endhint %}

#### To check for a specific sub-string inside of the current URL

`{% if canonical_url contains "/special-product-handle" %}`

{% hint style="info" %}
The **canonical\_url** global Liquid object is accessible anywhere in the theme and always contains the entire URL of the current page, but does NOT contain any URL parameters. [More information from Shopify on it here](https://shopify.dev/api/liquid/objects#canonical_url).
{% endhint %}

#### To check for some attribute of the request object

`{% if request.page_type == "index" %}`

{% hint style="info" %}
As seen here, another Liquid global object of note is the **request** object, and it can very useful in this context. [Check out Shopify's documentation on it here](https://shopify.dev/api/liquid/objects#request).
{% endhint %}

## The "Liquid prelude"

This is a place for you to write any code that that you may need to set up the Liquid condition. It does *not* need to evaluate to true or false, but it does need to use valid Liquid syntax.

Basically, you can assign to any custom variable in the prelude, and then use that variable in the condition to ultimately decide whether or not the customer qualifies to use this key.

For example, your prelude could look something like this:

```




```

So now, in the "Liquid condition", you would have access to the `purchase_allowed` variable, so it would simply look like this:

`{% if purchase_allowed %}`

So that would give you even more flexibility to write different Liquid conditions that can be used to set up your locks and keys.

## Other resources

Relatedly, you can also use Liquid to create Locks! More information on that here:

{% content-ref url="/pages/kDZqJC3FEIXwGvqQNR5J" %}
[Liquid locking basics](/tutorials/more/liquid-locking-basics)
{% endcontent-ref %}

As always, feel free to check in with us via email at **<team@uselocksmith.com>**, if you have any questions about any of this!


# Manual mode

In some cases, you may want your keys to unlock certain parts of the page - like keeping the product price or add-to-cart hidden, until a customer qualifies for one of your keys.

This sort of behavior can be achieved with some custom code, and the "manual mode" setting for the relevant locks. Click the link below to learn more.

{% content-ref url="/pages/O2n014EIzM9d23tvyj3K" %}
[Manual mode](/tutorials/more/manual-mode)
{% endcontent-ref %}


# Excluding content from locks

How to use Locksmith's "always permit" key condition to make sure your some of your content doesn't become locked

This is useful if you have a lock on a collection, but want specific products still available. Or if you have a lock on your "entire store", but want specific pages always accessible.

*It's a quick setup*: you'll actually create a **lock** directly on the content that you want to be unlocked. This can be anything such an entire collection, a product, page, blog, etc.

Once you've added the lock, use the key condition labelled "always permit":

<figure><img src="/files/AJ6tcgoox6orRthK5k8a" alt=""><figcaption></figcaption></figure>

Save the lock, and you're done.

The "lock" that you've just created becomes a sort of anti-lock, so the product, collection, etc that you've placed it one will now always be available.

You may need to create multiple locks like this if you have multiple areas of your store that you would like to remain accessible.

## Related feature: the force open other locks setting

The force open other locks setting is useful if you have multiple locks with overlapping content. This usually means locked collections with some of the same products. If this is you, check out our guide here:

{% content-ref url="/pages/0c8BffnjAyaptBUb4Z8f" %}
[Using the "Force open other locks" setting](/keys/more/using-the-force-open-other-locks-setting)
{% endcontent-ref %}


# IP address keys

Locksmith supports permitting visitors based on their IP address.

## Setup

Start by opening the settings for a lock you've created. Then, follow the steps shown to add a key that permits "if the customer has a certain IP address", as shown below:

![](/files/neHoZ8M8Q3reNiuWSaSg)

![](/files/HQZFUJyWzOnSCxGgR92Q)

This key can be configured with a series of IP addresses, one given per line. It can also be configured with CIDR definitions, allowing you to specify entire subnet ranges.

## Notes

This key condition can be inverted, resulting in a condition that permits *unless* the visitor has a certain IP address. When used with a lock on your entire online store, this is a useful way to block certain visitors.

To accomplish this, invert the key condition, as shown below by clicking on the checkbox next to "invert". (To learn more about inverting conditions, see [Inverting keys in Locksmith](/keys/more/inverting-conditions-in-locksmith).)

![](/files/8hOP1QHkv9FJbCfPYZLn)

Because of the way IP address detection works, a IP address key on your entire store will show *everyone* a spinner graphic for a moment, before your store's content is loaded. This will only happen once, if the visitor has an accepted IP address.

{% hint style="danger" %}
**Important**: When used, this key condition has the potential to negatively affect the SEO of any content that is locked in this way. [More information on SEO and Locksmith here](/faqs/more/how-does-locksmith-affect-search-engines-and-seo).
{% endhint %}


# Newsletter keys

Use Locksmith to only grant access to customers that subscribe to your newsletter

Locksmith allows you to integrate directly with either **Mailchimp** or **Klaviyo**. When setup, Locksmith will ask customers for an email address when they arrive on a locked page. Once the email is entered, a customer is immediately granted access, and Locksmith will automatically send the subscription information to the corresponding service.

![](/files/1onUSNeUaUHZ28DKy2Hi)

{% hint style="info" %}
**Note**: Mailchimp and Klaviyo both have their own policies regarding double opt in, and it is typically enabled by default. This setting is adjusted in your Mailchimp or Klaviyo dashboards - it is not a setting that is controlled by Locksmith.
{% endhint %}

## Mailchimp

Detailed information on how to setup Mailchimp can be found here:

{% content-ref url="/pages/1gBNBlY4Klt4vAB8hcIc" %}
[Use Mailchimp to collect customer emails](/tutorials/more/mailchimp)
{% endcontent-ref %}

## Klaviyo

If using Klaviyo, you have the option to simply request that visitors subscribe in order to gain access:

{% content-ref url="/pages/z1IVLGpbpnWnaD5XQ6MI" %}
[Grow your subscriber lists with Klaviyo](/tutorials/more/klaviyo)
{% endcontent-ref %}

Or, you can also use Klaviyo to grant access only to those who are *already* subscribed to a specific list in your Klaviyo account:

{% content-ref url="/pages/77iwUv68N0neEBD4ZfM9" %}
[Use a Klaviyo list or segment as an access control list](/tutorials/more/use-a-klaviyo-list-or-segment-as-an-access-control-list)
{% endcontent-ref %}

## Using your default Shopify mailing list

Shopify ships out of the box with a marketing mailing list service. If you would like to use Locksmith to grant access to those who have already subscribed to this, you can do so using a custom Liquid key condition.

This is slightly different than the above options, in that **it will only grant access to a signed in customers - if the customer is already subscribed**! To start, check out our guide on this here:

{% content-ref url="/pages/ve2JX4pz2jetN297ciB6" %}
[Custom Liquid key-condition basics](/keys/more/custom-liquid-key-condition-basics)
{% endcontent-ref %}

The condition you're looking for is:

`{% if customer.accepts_marketing %}`

When set up, this will present the customer will the regular prompt to sign in (as opposed to the subscription prompt):

![](/files/VQwivnx6b2jpZMbm3Baj)

If desired, you can adjust your message prompt to direct your customers to the page footer(in most stores) to subscribe to your newsletter. More information on editing messages here:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages)
{% endcontent-ref %}

## Using other mail services

Locksmith does not support other mail services at this time.

However, if you have a mail service that automatically tags customers that are subscribed, you can use Locksmith to check for a customer tag:

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys)
{% endcontent-ref %}

Please feel free to contact us via email at **<team@uselocksmith.com>** if you have any questions!

### Related pages:

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}


# Limiting the scope of variant locks using the product tag key condition

By default, Locksmith's [variant locks](/tutorials/more/locking-variants) apply to all matching option/value combinations. For example, you'll typically see something like this:<br>

<figure><img src="/files/c6di7SBHZLj5f6dCKpyN" alt=""><figcaption></figcaption></figure>

Once a variant lock is created, you can limit which products it applies to by using the key condition labelled "If the product is tagged with":

<figure><img src="/files/l6OPng7ifi63v0YdRQWl" alt=""><figcaption><p>Type "product" in the popover filter, as shown above, to more easily find the correct key condition</p></figcaption></figure>

You'll use any existing product tags to denote which products you want the variant lock to apply to, or create new product tags if needed.

If you want the lock to **apply to variants on one product tag only**, and leave all other products untouched, for example, you'll use an inverted key condition like so:

<figure><img src="/files/1f7wV0t8yzzsv9dkFNPE" alt=""><figcaption></figcaption></figure>

Then, **as a separate key,** add in your conditions for access to the product. So if you want to allow access to the variant with a sign in, that will look like this:

<figure><img src="/files/8Q4WUgPsGs93AwdGRrUv" alt=""><figcaption></figcaption></figure>

The result of this is that all matching variants will automatically be unlocked if the product is NOT tagged with "Snowboard". In other words, **the variant lock will only apply to products tagged with "Snowboard"**.


# Why aren't my locks working?

## First thing to try: Update Locksmith

Is your Locksmith installation synced up with your current theme? When changing around themes, Locksmith needs to be re-installed each time you do this. To initiate a new theme install on your *currently published theme*, press the "Update Locksmith" button on the "Help" page:

![](/files/Plq5usoxHBXwTMq47AXE)

## Using passcodes, secret links, newsletter, or location keys?

Read our full guide on this here:

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working)
{% endcontent-ref %}

If you've been testing out your locks, and you've already entered the passcode or used the secret link, etc, during the current browser session, the content is now unlocked for you, and will be accessible on your current browser: Locksmith will not continue to ask you for access credentials.

To test out what a new visitor to your website will see, use an incognito window, or try on a different device or browser.

For more information from the sources on **how to use an incognito window** in each of the different types of browsers(sometimes called "private session"), use the following links:

* [Chrome](https://support.google.com/chrome/answer/95464)
* [Safari on Mac](https://support.apple.com/guide/safari/browse-in-private-ibrw1069/mac)
* [Safari on iOS](https://support.apple.com/en-us/HT203036)
* [Firefox](https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history)
* [Edge](https://support.microsoft.com/en-us/help/4026200/microsoft-edge-browse-inprivate)

### Using manual locks or locked sections and noticing that prices or content aren’t hidden anymore?

If you recently switched to a new theme or published an updated version of your existing theme, any manual locking code or theme hiding profile definitions you previously added will *not* automatically carry over. This is expected behavior in Shopify — theme files are unique to each theme version, and apps can’t migrate custom edits between themes.

If you were relying on:

* [Manual Locking](/tutorials/more/manual-mode) Liquid code inserted directly into templates (for example, to hide prices, add-to-cart buttons, or sections etc)
* A [theme hiding profile](/tutorials/more/how-to-hide-theme-sections-blocks-and-snippets) that references your theme’s specific section or block structure
* Custom CSS added for supplemental hiding
* Any other theme-specific customization using Locksmith manual locking code made outside of Locksmith’s automatic installation

…you’ll need to re-add these changes in the newly published theme.

{% hint style="success" %}
If you’d like help identifying which code needs to be brought over or where to place it in your new theme, please feel free to reach out at [**team@uselocksmith.com**](mailto:mailto:team@uselocksmith.com) — we’re happy to walk with you through it or add it ourselves if that's helpful. :)
{% endhint %}

## Lastly...

If none of the above helps, inside the Locksmith app, double-check each lock individually for warnings. Or, for any extra keys that might be accidentally allowing access.

**If you're still having trouble, email us –** [**team@uselocksmith.com**](mailto:mailto:team@uselocksmith.com)**. We're here to help. :)**


# FAQ: I see blank spaces in my collections and/or searches when locking

Some strategies to improve the appearance of your collections and searches when Locksmith is filtering out products

Locksmith supports hiding locked products across your shop, preventing them from appearing to unauthorized customers in collection listings, search results, and anywhere else product lists appear.

*However*, if a collection has some products which are locked, and some that aren't, the result can be a collection with empty or partially-empty pages. This is because Shopify only permits filtering products out of a collection page by page - there's no way to reshuffle products so that every page appears full.

There are, however, some other options to get around this issue.

### Option 1: Turn up the maximum number of products that are displayed per page

The maximum products per page, Shopify-wide, is 50. This may not work for everyone, but it can make pages appear less empty. And, if you have less than the maximum products in your collection, this can eliminate the issue completely in those cases. [To change the maximum number of products, follow the tutorial here.](https://shopify.dev/tutorials/customize-theme-show-more-products-on-collection-pages)

### Option 2: Don't mix locked products and unlocked products in the same collections

Simple enough. To make sure that each customer type gets pointed to the right collections, follow these steps.

1. Create versions of each collection that are geared toward each audience. For example, if you have a "Staff" collection that has some manager-only products, create one "Staff" collection with just non-manager products, and another "Staff" collection with all the manager-friendly products.
2. Next, add links to all versions to your shop's navigation menus. We'll take care of filtering the links themselves in the next step, but for now, make sure your shop's navigation gives your visitors a way to get to the collection that's right for them.
3. Finally, lock each collection, making sure to check the box labeled "Hide any links to this collection and its products in my shop's navigation menus". This will instruct Locksmith to only show a collection link to the visitor if they're qualified to open its lock.

### Option 3: Use an app to create "infinite scroll" pages on your store

We've seen that some infinite scroll features and apps can handle reordering, or "filtering down" the products on the collection page, removing the empty spots where the locked products would normally show.

### Handling the "All" collection

Shopify generates a default collection called "All", located at the `/collections/all` url of your shop. Out of the box, this collection contains your entire product catalog.

Because this collection is subject to the same conditions that are described above, it may be useful to override this collection with one that *just* contains the products in your shop that are public friendly.

To do that, simply create a new collection in your shop called "All", and manually specify the products (either individually or using conditions) that should be visible to the public. This will override the default collection, and visitors who open it will see normal, full collection pages, containing your public-friendly products.

### Handling "Frontpage" collections, and other theme-specific product areas

Some themes include the ability to feature a collection of products on the frontpage, or elsewhere. Most themes don't support swapping collections based on the visitor, so it will require custom code to use audience-specific collections in these cases. This kind of thing would only work with specific key types such as customer tags or e-mail addresses.

**Feel free to get in touch if you have questions about any of this!** You can do that by just hitting the message icon on the bottom right of this screen ↘️


# Can Locksmith hide content from my in-store search?

How to adjust your lock settings to prevent your content from being found via your in-store search

Locksmith includes a checkbox inside of the "Settings" area, on lock pages, that will remove products and other resources from searches - but only from the default and static searches in your store.

{% hint style="warning" %}
**Note**: Locksmith can NOT remove products from display **in other apps**, nor can it remove products from **dynamic (shows results as you type) searches**. In these cases, see suggestions below\...
{% endhint %}

You'll find the hide-from-lists setting on each of your lock pages, like so:

<figure><img src="/files/KmPSopoVh5KATyqIFMxq" alt=""><figcaption></figcaption></figure>

## Suggestions for third-party or dynamic searches

Using the above Locksmith setting to 'hide from search results' will *not* remove the search results when a third party or dynamic search is enabled in your store, so we have some suggestions for alternatives.

### **Dynamic searches(show results as you type) enabled from within the theme settings**

The only option here, if you want to make sure that your locked content is never displayed inside of your in-store search, is to disable the dynamic loading of the products. Each theme is different, but this is typically done within the "search" settings for the theme.

Once you open the Theme Editor, you can find it under your "Search" settings. On the Debut theme, for example, go to:

* Theme Settings > Search > Enable product suggestions (turn OFF)

### **Third party searches**:

Locksmith won’t be able to hide your products from a search in this case, since the third party app is completely responsible for displaying search results when enabled. Suggestions:

* Many third party apps have their own ways to prevent products from showing up in them. Check the settings for the app that you're using! At the very least, they should allow you to remove certain products entirely from appearing in searches, using a specific product tag.

## The "Hide from sitemaps..." setting

For *product* and *collection* locks, Locksmith also gives you the option to hide from sitemaps:

<figure><img src="/files/DFbwJK1t8XGmERCLvUOZ" alt="" width="337"><figcaption></figcaption></figure>

Behind the scenes, this setting uses [Shopify's "seo" metafield](https://shopify.dev/docs/apps/marketing/seo#step-2-hide-a-resource-from-search-engines-and-sitemaps), which removes products from any *in-store* searches, but also works to remove products from search engines like Google.

{% hint style="warning" %}
**Note**: When enabled, his setting will remove products completely from in-store searches. In other words, **even visitors that have access to the content via Locksmith&#x20;*****won't*****&#x20;see the products appear in searches.** Because of that, this setting may not work for everyone, but is still available as an option.
{% endhint %}

On collection locks, as long as the '*protect products in this collection*' option is enabled, the setting will also be applied to each product in the collection.

## Related topics

{% content-ref url="/pages/UM2j5kcD3lAniUmsgpg3" %}
[How does Locksmith affect search engines and SEO?](/faqs/more/how-does-locksmith-affect-search-engines-and-seo)
{% endcontent-ref %}

{% content-ref url="/pages/9lNhC04BlaQAMeVE7mrX" %}
[Automatically managing the seo.hidden metafield using Locksmith](/tutorials/more/automatically-hide-from-sitemaps-and-manage-seo-metafield)
{% endcontent-ref %}


# Locksmith is not working with my page builder app

Merchants frequently have issues with Locksmith and page building apps such as **GemPages** or **PageFly.**

This is a hard area to have full compatibility since those particular apps specialize in letting merchants have full control over the look and feel of the pages. This is a great thing, of course, but it does make it hard for apps such as Locksmith to come in after the fact and also attempt to control the display.

That being said, **if you are using Locksmith in a more standard way** - i.e. using full-page locks on some of your products or collections, there's still a good chance that you can use both.

If you're not sure, the following points should clear up when not to use the apps together...

## Editing your pages while Locksmith is active

Even when using standard Locksmith locks, you may still find that you cannot edit your pages while Locksmith is active. The best way to get around this is to simply **disable Locksmith** while you are editing your pages. This can be an inconvenience, and we apologize for that in advance. You can disable Locksmith from the **Settings** page in the app.

## Hiding prices, the add-to-cart button, or other types of manual locking on your pages

Locksmith's [manual locking features](/keys/more/manual-mode) are NOT compatible with page builder apps, it is **not recommended** to try to use both, and Locksmith support cannot help with this.

## Variant locking

Locksmith's [variant locking](#undefined) works similarly to manual locking, and is **also not compatible** with page building apps.


# What should I do if my site is loading slowly?

If your online storefront is showing poor performance *after* installing Locksmith or adjusting Locksmith settings, it's possible that an unintentionally aggressive Locksmith configuration is to blame.

Start by using the following troubleshooting steps:

## 1. Temporarily disable Locksmith

This will help you figure out if Locksmith is actually causing your issue. If your site is still performing poorly after disabling Locksmith, it's probable that the issue lies elsewhere, and you will need to continue your search for the culprit outside of Locksmith.

Disabling Locksmith is done from with the **Disable Locksmith** button on the Settings page:

![](/files/meEC3DNymZReTQtW6Xrd)

## 2. Disable specific lock settings

There are two lock settings known in Locksmith to *potentially* cause speed issues in certain circumstances:

<figure><img src="/files/BfCCHTZ2inGWzU4AVKVS" alt=""><figcaption></figcaption></figure>

*The exact labels might differ slightly depending on if this is a product lock, collection lock, page lock etc.*

When either option is enabled, it creates the possibility for Locksmith's suite of security checks to be run many times, slowing the rendering process of your storefront. Because of that, disabling these two settings **on all of your locks** will result in Locksmith removing its security checks from places where your storefront theme performs a "loop", e.g. the places where it cycles through lists of links/pages/collections/products/etc.

Keep in mind that it is typically safe to use either of these settings, but there are a few situations you'll want to look for if you are seeing speed issues.

{% hint style="info" %}
**Note**: If you only have a few locks, it might be simple to troubleshoot on your own, keep reading. However, if you have quite a few locks, please feel free to skip straight to contacting us at **<team@uselocksmith.com>** for help!
{% endhint %}

### The 'hide from navigation' setting

If you have this setting enabled, even on just one of your locks, AND you have a large navigation menu (25+ links, including sub-menus), this is very likely the culprit. Because of this, **it is not recommended to try to use this setting with large navigation menus**.

Try disabling this setting (on all locks) and then check if your site is loading better.

### The 'hide from searches and collections' setting

It is more rare that this setting will slow down your site. However, with certain themes, there may be unexpected loops in product or collection templates where Locksmith inserts its checks.

If you see Locksmith *only* loading slowly on collections or search results pages, that could be the signal that this setting is the issue.

{% hint style="info" %}
**Hint**: If you're not sure which setting is causing the issue, you may want to try only disabling only one of the two above settings at a time (for all locks)*.* Failing that, disable the second setting (again, for all locks)*.* This strategy would help you isolate the problem to one of the two settings.
{% endhint %}

## 3. If you have any developers working with you...

Enlist their help to find the specific assets in your storefront theme which contains Locksmith code that might be unnecessarily running too many times. It's simple to tell Locksmith to ignore specific files in your theme, and this fact can be used to your advantage here.

To do this use the Settings > Advanced > "Liquid ignore list" field:

![](/files/Kh7TMFhCWwsdIumJS426)

Using this settings will mean that Locksmith will strip itself out of that asset.

## Contact us for help!

If the above strategies do not provide anything useful, please do not hesitate to contact us via email at **<team@uselocksmith.com>**, and we'd be happy to help you troubleshoot this.


# I'm the administrator of my site and I cannot access pages because of Locksmith locks.

Locksmith locks your customer facing website so that it can only be accessed under certain circumstances. Some merchants set up more nuanced conditions and Locksmith can get in the way as you navigate your own website.

{% hint style="info" %}
*Note: Using this guide requires that customer accounts are enabled in your store, and that you have a customer account for your own store.*
{% endhint %}

### To let Locksmith know to let your customer account through, set up the following lock:

Click the "Start a Liquid lock" on the main page of Locksmith.

<figure><img src="/files/yiKMto9Sh9IWcCezzLfV" alt=""><figcaption></figcaption></figure>

Next enter this into the "Liquid condition area":

```
customer.tags contains "admin"
```

That will look like this:

<figure><img src="/files/V6UASNr9ojrG12wFKQZO" alt=""><figcaption></figcaption></figure>

Press **Create lock** to continue. For your key, use the following..

Select "if (always permit)" from the list of key condition types.

<figure><img src="/files/5igPpi9ZLcbAM3cydRAy" alt=""><figcaption><p>You can simply type "always" to filter the list.</p></figcaption></figure>

It should end up saying "Permit...always", like so:

<figure><img src="/files/a72Q2Nlq256eUy9Jr6AU" alt=""><figcaption></figcaption></figure>

That's it, for your lock setup. Make sure to save the lock!

### Create a "customer" account for your store:

Now, if you haven't already, create a *customer* account for your store, and go into your "Customers" area and add "admin" as a tag to your own customer account. You can now access any content in your store while signed in with this account.

Remember this is just a way to test what your customers are seeing, so this means you need to **sign in with your customer account** to gain access to locked content. If customer accounts are not enabled on your store, you won't be able to use this method.

{% hint style="info" %}
**Note:** Locksmith won't lock down your website during [theme edit mode](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/edit), so you always have the option to view your store that way.
{% endhint %}

**As always, feel free to contact us via email at <team@uselocksmith.com> if you have any questions.**


# More FAQs...

Check the following or simply use the search bar in the header to quickly find the topic that you're looking for!


# I'm having trouble using Locksmith with a site speed optimization app.

Locksmith isn't supported in combination with site speed optimization apps. It may work with some, but we don't offer support for this combination.

## Apps known to be affected

* [Nostra](https://www.nostra.ai/)

If you run into an app that should be on this list (or if you find one that *does* seem to work), please let us know: <team@uselocksmith.com>.

## Why isn't this supported?

Locksmith's session state is very tightly coupled with the customer's Shopify session state (as managed by the Online Store channel). The two operate hand in hand, and depend on each other.

Site speed apps usually work by caching, or by dynamic injection of content delivered from a non-Shopify source. This introduces a layer *between* Locksmith's state and Shopify's state, which creates a synchronization problem, and one that we can't sustainably sign up for.


# The app isn't loading. What do I do?

Deep breaths! We can figure this out. :)

1. Check [status.uselocksmith.com](https://status.uselocksmith.com/) for platform updates.
2. Try accessing Locksmith's app domains directly:
   * Try opening [uselocksmith.com](https://uselocksmith.com/) directly.
   * Try opening [ui.uselocksmith.com](https://ui.uselocksmith.com/). (You should be redirected to [uselocksmith.com/auth/login](https://uselocksmith.com/auth/login); this is normal.)
3. If loading fails, try again from a private/incognito browser session.
4. If that doesn't work, try again from another device.
5. If that doesn't work, try again from another network. (Switch WiFi networks, or switch to cellular.)

If these steps don't reveal the issue and a path for resolving it, write to <team@uselocksmith.com> with the following details:

* How far you got in the list above
* The contents of [myip.wtf/text](https://myip.wtf/text) and [myip.wtf/headers](https://myip.wtf/headers)
* A screenshot from [ipv6test.google.com](https://ipv6test.google.com/)
* A screenshot (including the browser's URL bar) of the app failing to load


# Can Locksmith protect shipping methods, billing methods, or discount codes?

**No - It's not possible to protect shipping methods, billing methods, or discount codes.**

Shopify keeps a pretty tight leash on the checkout process itself, and third-party apps aren't permitted to get involved here at this time.

If you absolutely must set up different shipping or billing terms, your best bet may be to set up a completely new Shopify store.

If you want to dig into this further, get in touch with the Shopify support crew directly, at <support@shopify.com>.


# I switched themes, and Locksmith isn't working

## **The solution: trigger a new Locksmith install for your theme**

**Click the "Help" button, and then click the "Update Locksmith" button:**

When changing around themes, Locksmith needs to be re-installed each time you do this. To initiate a new theme install on your *currently published theme*, press the "Update Locksmith" button on the "Help" page:

![](/files/qJhGDJvbOHP13hG2wWkL)

This will trigger a full reinstall of Locksmith's code into your theme - this is important, because Locksmith is able to do what it does via Liquid code in your shop's theme.

## **Using manual locking?**

{% hint style="warning" %}
**This is important!** If you are using Locksmith for price hiding or other types of manual locking, *or any other type of Locksmith code manually added to your theme by a developer or our team,* you'll need to re-instate the code changes in your new theme.
{% endhint %}

If this is the case, contact us via email at **<team@uselocksmith.com>,** and we'll be happy to add the manual code to your new theme for you.


# Why isn't my passcode, secret link, newsletter, or location key working?

{% hint style="info" %}
Tip: we call these "remote key conditions", because they involve making remote calls to Locksmith for verification.
{% endhint %}

You tested out your key, and it worked great. But now it stopped asking for verification. This can often happen when using one of these key types:

* [Passcode](/keys/passcode-keys)
* [Secret link](/keys/secret-link-keys)
* [Newsletter](/keys/more/newsletter-keys)
* [Location](/keys/visitor-location-keys)
* IP Address

For background, Locksmith remembers your previous access using the same mechanism Shopify uses to remember you: via browser cache.

The easiest way to move forward is by opening a private browsing session (sometimes called "incognito mode"), and *then* proceeding to test Locksmith in your online storefront.

{% hint style="warning" %}
**Important:** If you're using a URL with the `shopifypreview.com` domain to test, Locksmith changes won't appear there.

The Shopify theme editor's built-in preview bypasses Locksmith entirely. Locks, keys, and any manual locking code can look like they are not in place.

If you're testing your published theme, open the live storefront URL in a new private browsing window.

If you're testing an unpublished theme, use the preview URL that includes `?fts=0&preview_theme_id=` followed by your theme ID, as described in [Testing Locksmith on unpublished themes](https://www.locksmith.guide/tutorials/more/testing-locksmith-on-unpublished-themes).
{% endhint %}

Detailed information on using private/incognito mode here:

{% content-ref url="/pages/YlgXzL9Q7dWf6b1zdX3N" %}
[How to use a private browsing session](/tutorials/more/how-to-use-a-private-browsing-session)
{% endcontent-ref %}

{% hint style="info" %}
**Note**: If you're using location keys, and you're changing your location with a VPN for testing purposes, the cause is the same in that Locksmith caches your access status. Using a private browsing session can still help with this in that you'll have fresh cache
{% endhint %}

{% hint style="success" %}
**Tip:** Each time you test, be sure to start a ***new*** private browsing session. Remember, the cache in private browsing doesn't clear stored access until you close all private windows or stop the main Incognito process.
{% endhint %}

## Locksmith is remembering your browser.

When you open the key, Locksmith remembers it as long as your browser application remains running. To get around this, you'll need to use a private session (see above), or use a different browser or device.

In the case of location keys, if you're using a VPN to change your apparent location, it can even be useful to delete the browser cache *during the same browser session*. We have a guide on how to do this here:

{% content-ref url="/pages/Y5RU9E9tdgNNkDrrYW39" %}
[How to clear cache for a single website](/tutorials/more/how-to-clear-cache-for-a-single-website)
{% endcontent-ref %}

## Locksmith is remembering your account.

*If you were signed into a customer account when you opened the key*, Locksmith can remember access on that account. This is a toggle-able setting on those key condition types, and, when turned on, Locksmith will never ask again when you're signed in.

To turn this setting off, head into the lock and click on the link to the key condition. Next, scroll down in the pop up and disable the option "Remember for signed in customer":

<div align="center"><img src="/files/yzSMuKtt5Hh2B3IHYvdH" alt=""></div>

Toggle the setting OFF, and **don't forget to save your lock**!


# Can Locksmith lock Shopify's public JSON API for my online store?

It cannot. To our knowledge, this feature cannot be disabled, and its behavior cannot be adjusted – and, it's an integral part of the operation of many themes. If you have questions about this, contact Shopify support.

If preventing access to these endpoints is *mission critical*, you could consider building a web proxy that allows all traffic *except* those endpoints. This would be a custom project, and it's not something we can help with, or support.


# Why are my customers seeing a reCAPTCHA when logging in?

While Locksmith does often use the information of already-signed-in customers to decided whether or not to grant access (depending on your settings), Locksmith does this by using the account system *provided by Shopify* for your store, and does not create its own, or directly edit the sign in process in any way.

For security, Shopify may ask your customers to complete a Google reCAPTCHA task, verifying that a human user is present. This is an effective way to prevent bot submissions of orders and contact forms. Locksmith doesn't have any control over these; they're entirely managed by Shopify.

For information on editing the Shopify setting regarding the re-captcha in your store, [see Shopify's guide here](https://help.shopify.com/en/manual/online-store/setting-up/preferences#protect-your-store-with-google-recaptcha), or continue reading for information on how to turn it off...

### Turning re-captcha off

Shopify allows these reCAPTCHA tasks to be enabled or disabled in two categories: at checkout, and on contact forms. That second category is a little misleading: it *also* applies to normal customer login attempts.

To manage these settings, find the "Online Store" navigation category, in your Shopify admin's list of sales channels. From that navigation list, head to the "Preferences" area, and scroll to the very end of the page of settings. You'll find a section titled "Spam protection". Use this section to control your online storefront's settings for Google reCAPTCHA.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5ddd799f2c7d3a7e9ae472fc/images/5f1b4f7304286306f8076075/file-uF6CWuMvgY.png)

If you have more questions about how these work, [contact Shopify support](https://help.shopify.com/en/questions).<br>




---

[Next Page](/llms-full.txt/1)

