> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/b2b-lock-password-protect/lock-1/creating-lock-for-products.md).

# Creating Lock for Products

### **Create Lock for all Products**

**Steps to manage**

1. Open the app > click on the **Locks** section > **Create Lock**

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

2. In the **Lock setup** tab, set up **Lock name**:

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

3. Move to the **Content to lock** section:&#x20;

* Choose a Lock content for Products: **All products**&#x20;

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

* **Exclude** some specific products in the **Restricted products** setting (optional)&#x20;

<figure><img src="/files/8NxkiT0GtOniDAQ0R6cY" alt=""><figcaption></figcaption></figure>

4. In the **Unlock rules** tab > Navigate to the **Access key** section and set up a lock condition.&#x20;

*For example:*

*Hide the products in the storefront and only allow **customers who login to the store** can see the products again.*&#x20;

*Customers will be redirected to the login page immediately once trying to access the locked products.*&#x20;

*After login, customers are redirected back to the Collection page to start purchasing locked items in the store.*&#x20;

* **Rule condition** > Select **Logged-in customers** from the list:&#x20;

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

* **Rule logic**

There are two options for you to choose: **If** or **Unless**.&#x20;

**If** - when you just want customers to immediately login to your store when they try to access the locked products.&#x20;

**Unless** - when you want customers to be redirected to another page to do other things you require before they can login and see the locked products. Like register or do some extra works before login.&#x20;

In each logic, the app supports redirecting customers to a specific page before or after login.&#x20;

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

* Navigate the **Summary** section, in here, select a **lock behaviour**:&#x20;

<figure><img src="/files/18z7UBCsZjE3W2bwhrwH" alt=""><figcaption></figcaption></figure>

You also can configure to hide the product in Google by checking the settings in **Google settings**:&#x20;

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

These settings help you:&#x20;

* Hide products within collection pages/product lists
* Hide products on Google via search/search engine.&#x20;

5. Click **Save** to complete the lock.&#x20;

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

***

### **Create lock for specific Products**

**Steps to manage**

1. Open the app > click on the **Locks** section > **Create Lock**
2. In the **Lock setup** tab, set up **Lock name**
3. Move to the **Content to lock** section:&#x20;

* Choose a Lock content for Products: **Manual products**&#x20;

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

* Select the products you want for this lock in the **Restricted products** setting:&#x20;

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

*\*You can select more than 1 product*

4. In the **Unlock rules** tab > Navigate to the **Access key** section and set up a lock condition.&#x20;

*For example:*

*Hide 1 product in the storefront and only allow **customers who login to the store** can see the products again.*&#x20;

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

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

* Navigate the **Summary** section, in here, select a **lock behaviour**:&#x20;

<figure><img src="/files/18z7UBCsZjE3W2bwhrwH" alt=""><figcaption></figcaption></figure>

You also can configure to hide the product in Google by checking the settings in **Google settings**:&#x20;

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

5. Click **Save** to complete the lock.&#x20;

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

{% 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://samita.io/pages/contact)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.samita.io/b2b-lock-password-protect/lock-1/creating-lock-for-products.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
