How can I password protect a specific product page or collection?

How can I password protect a specific product page or collection?

PVG
Tourist
6 0 0

Hi! 

 

I want to protected specifically a page or collection where I only sell one product. This is the journey I am trying to make:

1. Customer lands on my collection/page protected with password. The can only see the field to unlock the page.

2. The put the correct password and as the collection/page unlocks, the one product I am selling appears. 

 

So far, I have got to have both at the same time on a page but not in the order I need. I have edited the code as I want to avoid paying for another app just to do this. This is what I have done: https://yagisoftware.com/articles/how-to-password-protect-a-page-on-shopify 

 

My theme is Dawn 2.0 and this is the page I am trying to edit: https://pvgproductions.com/pages/pvg-treat 

The password to my site is: peagle

 

I hope someone in the community can help me! Thanks in advance 

Replies 12 (12)

g33kgirl
Shopify Partner
390 109 144

Why not show the login form on that page if it's a guest and let only registered customers view the page?

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
PVG
Tourist
6 0 0

That is so clever, thank you!! It would work for me. Is the login form something I will have to add to the code or it is part of the shopify theme editor? 

g33kgirl
Shopify Partner
390 109 144

The login form can be found here: [your website]/account/login

The registration link is: [your website]/account/register

 

You will have to code the logic on the collection page to show the login form when it is a guest or show the product when it is a customer. 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
PVG
Tourist
6 0 0

Oh I get you. I can see these pages, thank you

 

Do you know how to do the code for that? I have no much idea about how to code haha, if you could help me it would be amazing! 

g33kgirl
Shopify Partner
390 109 144

This is paid work, so if you're happy to pay, shoot me a DM. 🙂

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
frogmansretreat
Tourist
8 0 1

Hi G33kgirl - I have an enterprise theme and I installed the code from https://websensepro.com/blog/how-to-add-password-protected-collection-for-special-customers-shopify/...

and I everything to work except I cannot see my products.  I also cannot find the base.css file in my theme since the video is for tutorial.  Either way - I am willing to hire you for assistance.  I can spell out the scope but the websense guy has a good solution but I don't think it applies to my theme.  Thoughts?  www.frogmansretreat.com

g33kgirl
Shopify Partner
390 109 144

Hi @frogmansretreat, I believe you cannot see the products because only the customers with the "private" tag will be able to view it if you have copy pasted the code from websense. Try logging in and adding the tag "private" to your customer profile in the Customer settings. 

 

Your theme's stylesheet name is main.css

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
frogmansretreat
Tourist
8 0 1

G33kgirl - that is exactly the problem.  When tagging the customers the spelling is case sensitive....and for my situation it has to be lower case.  Every time I try and tag a customer, it auto-populates as a Capital "P".  I was on shopify support and they are going to follow up with me.  Thx for sending your note!

g33kgirl
Shopify Partner
390 109 144

That is easily resolvable by modifying the code. Let me know if the issue still persists.

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
frogmansretreat
Tourist
8 0 1

Hi and thx again.  I just bought you a coffee.  How can we move forward with modifying the code.  I removed the code already but I can start over.

 

g33kgirl
Shopify Partner
390 109 144

Hi thanks for the coffee. I have messaged you.

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.

junx
Tourist
5 0 5

You can do this with Atelier without any custom code!