Hot Line:

+1 (917) 730-2010

AI-Powered Web Development, SEO, Shopify & WordPress — Get a Free Consultation Today. Get Started

Tutorials

How To Add Password Protected Collection For Special Customers – Shopify

  • 17 Jan, 2023
  • 9 Comments
  • By WebSensePro
How To Add Password Protected Collection For Special Customers – Shopify

In this video, you will learn how to add password protected collection for Special Customers, Whole Sale Customers etc.

Having a password protected collection page can be useful if you want to limit access to certain products or collections to specific customers or groups.

Creating a password protected collection for special customers may lead to an increase in sales for your store. By offering exclusive access to certain products or collections, you can create a sense of exclusivity and urgency among those special customers, which may prompt them to make a purchase. Additionally, by limiting access to certain products, you may be able to charge a premium price for them.

Add the following code to the collection template file:

{% if customer.tags contains "private" %}
{% section 'main-collection-product-grid' %}
{% else %}
<div class="page-width style_private">
  <h2>Please login to view this collection</h2>
  <a href="{{ routes.account_login_url }}">Login</a>
<!--   <a href="{{ routes.account_register_url }}">Register</a> -->
</div>
{% endif %}

Add the following code in base.css file

.style_private{
  text-align: center;
}

.style_private a{
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  background: #efefef;
  margin: 0 5px;
}
5/5 · 9 votes
Tags:

    Comments

    Background Pattern

    Want to work with us?

    Let’s build your website, grow your traffic, and automate your business with AI.

    Background Pattern