Shopify themes, liquid, logos, and UX
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,
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.
What is the code to add in what files to made this happens, because I added the tag but it’s not working…
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
{% 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
- 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
Hello,
It's not working...
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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024