# Lock

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Lock condition</td><td><a href="/files/e2bldVQtqUPnBfZWri8q">/files/e2bldVQtqUPnBfZWri8q</a></td></tr><tr><td>Creating Lock for specific products</td><td><a href="/files/e2bldVQtqUPnBfZWri8q">/files/e2bldVQtqUPnBfZWri8q</a></td></tr><tr><td>Creating Lock for collections</td><td><a href="/files/e2bldVQtqUPnBfZWri8q">/files/e2bldVQtqUPnBfZWri8q</a></td></tr><tr><td>Creating locks for a specific page</td><td><a href="/files/e2bldVQtqUPnBfZWri8q">/files/e2bldVQtqUPnBfZWri8q</a></td></tr><tr><td>Creating Lock for a specific URL</td><td><a href="/files/e2bldVQtqUPnBfZWri8q">/files/e2bldVQtqUPnBfZWri8q</a></td></tr></tbody></table>

## **Lock condition** <a href="#lock-condition" id="lock-condition"></a>

### **Logged-in customer:**

If you create a lock with this condition, the customers will be immediately redirected to the Login page of your store (or any pages that you choose in the **“Redirect to”** section).

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

### **Selected customers:**

There are two types of this condition, **Automate condition** and **Manual**.&#x20;

* The **Automate condition** option will help you manage the customers to be able to see the locked site by the customer tag. Then once the customers access the locked site, they will be redirected to the Login page of your store (or any pages that you choose in the **“Redirect to”** section).&#x20;

The customer tag will be added to the customer account in the **Customers folder** of Shopify.&#x20;

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

* The **Manual** option will help you choose and manage the customers who can be able to view the locked site

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

### &#x20;**Visitors with passcode:**

This condition will make the customers enter a passcode to view the locked site. They will be redirected to the lock page which has a passcode input field.

<figure><img src="/files/45KQ1l5Lk9maDfe2yzKV" alt=""><figcaption></figcaption></figure>

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

### **Secret link:**&#x20;

Just like the **“Visitors with passcode”** condition, the customers will need a code to add to the tail of the page URL. Then they will be able to see the locked site.&#x20;

The normal link has this form: abc/product/special

The secret link will be like this: abc/product/specia&#x6C;**?access=test1234**

The URL tail: **?access=test1234** is the code you have to set up in the app setting. You will have to create a code tail and add it to the tail of the page URL you want to access that locked page

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

Then once the customers access the locked site, they will be redirected to the lock page.

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

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

***

## Creating Lock for specific products

Steps to manage

&#x20;1\. Open the app > click on the **Locks** section > **Create Lock**

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

&#x20;2\. Enter the Lock **Name**

&#x20;3\. In the **Lock resources** setting > Click on the **Content to lock** section, select the **Specific products** option.

You can choose between the “All products” option or the “Manual products” option. In this case, we use the “Manual products” option as an example:

<figure><img src="/files/7HCVbJAjSOtveYA9fDiF" alt=""><figcaption></figcaption></figure>

&#x20;4\. Click on the **Manage products** button > Tick on the checkbox of the products you want > **Add**

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

You can choose more than one product.&#x20;

&#x20;5\. In the **Product Settings** section,  tick on the checkbox to hide the **Product**, **Product price,** or the **“Add to cart” button**. You can select one of these options or select all.&#x20;

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

&#x20;6\. Set up **Lock conditional**: Select who can (or cannot) access the content, and the direct page when customers access the Lock.&#x20;

&#x20;7\. Click **Save** to update the changes

Check the result on the front store.&#x20;

***

## Creating Lock for collections

**Steps to manage**

&#x20;1\. Open the app > click on **Locks** section > click the **Create Lock** button

&#x20;2\. Enter the Lock **Name**

&#x20;3\. In the **Lock resources** setting > Click on the **Content to lock** section, select the **Specific collections** option.

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

4\. Click on the **Add collections** button > tick on the checkbox of the collection you want > click **Add**

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

5\. In the **Product Settings** section,  tick on the checkbox to hide the **product**, **product price,** or the **“Add to cart” button**. You can select one of these options or select all.&#x20;

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

6\. Set up **Lock conditional**: Select who can (or cannot) access the content, and the direct page when customers access the Lock

7\. Click **Save** to update the changes

Check the result on the front store. When customers access the collection, the lock widget shows up

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

***

## Creating locks for a specific page

**Steps to manage**

&#x20;1\. Open the app > click **Locks** > click the **Create Lock** button

&#x20;2\. Enter the Lock **Name**

&#x20;3\. In the **Lock resources** section > **Content to lock** section, select the **Specific page** option

&#x20;4\. The page list of your site shows up > tick on the checkbox of the page(s) you want (you can select multiple pages)

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

5\. Set up **Lock conditional**: Select who can (or cannot) access the content, and the direct page when customers access the Lock

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

&#x20;6\. Click **Save** to update the changes

Check the result on the front store

View result on the front store&#x20;

***

## Creating Lock for a specific URL

**Steps to manage**

&#x20;1\. Open the app > click **Locks** > click **Create Lock** button

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

&#x20;2\. Enter the Lock **Name**

&#x20;3\. In **Lock resources**  > **Content to lock** section, select **Specific URL** option

&#x20;4\. Enter the URL link you want to lock. For example: ***/search***

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

&#x20;5 Set up **Lock conditional**: Select who can (or cannot) access the content, and the direct page when customers access the Lock

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

&#x20;6\. Click **Save** to update the changes

Check the result on the front store

{% hint style="success" %}
**Need support?**

If you do encounter any difficulty while proceeding these steps, don’t show any hesitation to contact us promptly via the email address [support@samita.io](https://help.samita.io/support@samita.io)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.samita.io/b2b-lock-password-protect/lock.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
