# 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="../../keys/more/limiting-the-scope-of-variant-locks-using-the-product-tag-key-condition" %}
[limiting-the-scope-of-variant-locks-using-the-product-tag-key-condition](https://www.locksmith.guide/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:\
\
&#x20;**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="../../basics/compatibility" %}
[compatibility](https://www.locksmith.guide/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="../../faqs/locksmith-is-not-working-with-my-page-builder-app" %}
[locksmith-is-not-working-with-my-page-builder-app](https://www.locksmith.guide/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](https://www.locksmith.guide/tutorials/more/manual-mode) feature.
{% endhint %}
