
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;
}

![[FREE] - How To Add Volume Discount in Shopify with Sale Badge](/_astro/_FREE_%20-%20How%20To%20Add%20Volume%20Discount%20in%20Shopify%20with%20Sale%20Badge.DeAH13EL_WMT7r.webp)
![GPT-6 Astra + OpenCode - 3D WordPress Websites [This is INSANE]](/_astro/GPT-6%20Astra%20_%20OpenCode%20-%203D%20WordPress%20Websites%20_This%20is%20INSANE_.CFF0euP5_3Xbbj.webp)


