Create a private collection

Create a private collection

PAUL8
Pathfinder
94 0 29

Hello,

I want to create a private collection on my store, so only people with an account can access the collection. I also want to mask the private collection article everywhere on the website. So it just can be accessible in the private collection menu.

I use dawn theme, this is my website: womber.fr and the password is PROPAGANDAAA

Thanks, 

Cordially,

Replies 7 (7)

DitalTek
Shopify Partner
865 103 121

To achieve function you need assign for each user a tag, then when user login you can check if user has the tag will show the collection if the user has not tag or not login the collection will hide.

- You can please Like and Accepted Solution if my suggestion helpful.
- And you want to hire developer Theme or App Shopify => Feel free to send me a DM or contact to us via Email | WhatsApp
- Website: ditaltek.com
PAUL8
Pathfinder
94 0 29

What is the code to add in what files to made this happens, because I added the tag but it’s not working…

DitalTek
Shopify Partner
865 103 121

You need to check in code at the file handling show menu.

 

 

{% assign statusShow = false %}
{% for tag in customer.tags %}
  {% if tag contains 'abc' %}
     {% assign statusShow = true %}
  {% endif %}
{% endfor %}

 

 

Then you can check if statuShow == true => make the collection show and opposite hide that collection

- You can please Like and Accepted Solution if my suggestion helpful.
- And you want to hire developer Theme or App Shopify => Feel free to send me a DM or contact to us via Email | WhatsApp
- Website: ditaltek.com

BSS-TekLabs
Shopify Partner
2401 695 831
  {% if collection.handle == 'womber-x-spicyv' %}
    {% if customer == null %}
      <script>
        window.location.href = "/account/login";
      </script>
    {% endif %}
  {% endif %}

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
BSS-TekLabs
Shopify Partner
2401 695 831

- Here is the solution for you @PAUL8 
- Please follow these steps:
1. Go to Online Store --> Theme --> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head> and press 'Save' to save it

  {% if collection.handle == 'womber-x-spicyv' %}
    {% if customer == null %}
      <script>
        window.location.href = "/account/login";
      </script>
    {% endif %}
  {% endif %}

- change womber-x-spicyv to collection you want make private

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
PAUL8
Pathfinder
94 0 29

Hello,
It's not working...

BSS-TekLabs
Shopify Partner
2401 695 831

Can you send me the link of the collection you want to make private, I will send you the code again.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now