In this video, you will learn how to add password protected colletion 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 - (7 votes)
2 thoughts on “How To Add Password Protected Collection For Special Customers – Shopify”
Hi, I have version Debut version 17.10.0 and i cant find base.css ! Normal? Thanks !
You can add code to any CSS file