PASSWORD PROTECTED PAGE

Highlighted
Shopify Partner
31 0 1

Can someone please tell me how to created just a "password protected page" with Shopify?  I don't want to password protect the entire site---just a "page" for wholesale and private label products.  Thanks so much!  Lisa

Lisa Carmichael Webmaster-Digital Entrepreneur- Instructor RANK FOR MORE THAN 300 KEYWORDS ON GOOGLE PAGE 1-4 IN JUST 23 MONTHS ORGANICALLY-BLOGGER, GOOGLE WEBMASTER TOOLS, PAY PER CLICK CONSULTING, LINKING, WHITE HAT SEO, WEB DESIGN, WP, MAC, BLOGGER, SHOPIFY, WEEBLY, AFFILIATE MARKETING, FACEBOOK AND TWITTER MARKETING, CAMPAIGN MARKETING, CROWDFUNDING, MAINTAINING YOUR KEYWORDS. EMAIL ME FOR CLASS INFORMATION. I NEED AT LEAST 5-BUT NO MORE THAN 7-8 ATTENDEES-BUT I CAN TEACH YOU HOW TO RISE ABOVE THE OTHERS AT LIGHTENING SPEED-AND I CAN TEACH YOU THE ART OF GROWTH-HACKING FOR THE REAL PASSIONATE ONES! CLEARSKINMINERALS@GMAIL.COM
0 Likes
Highlighted
Shopify Staff
Shopify Staff
607 30 97

Hey!

 

My name is Ava, I’m one of Shopify’s Gurus and I’m here to help :)

 

If you wanted to password protect certain products/collection/pages that are only for wholesale customers only, you can use an app called Locksmith. This app will allow you to hide pages from customers who do not have special access to these pages. Can you take a look at this app and see if it would work for you? There is a 15-day free trial also, so you can test it out first free of charge.

 

Let me know if you have any more questions, happy to help!

 

Ava

Social Care Guru | support@shopify.com

Ava | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Tourist
8 0 6

its crazy how much shopify doesn't do - then you have to pay extra to a 3rd party.

is there currently no other way to do this?

1 Like
Highlighted
Shopify Partner
10 1 3

it actually depends. you can either use an app like Shopify stuff was recommending or you can implement this functionality by yourself. I'd need to gather more information to get a sense of what exactly you need but for example if you want to just restrict one page, you can do password protected by checking if customer is logged in. 

 

% if customer %}
<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
      <div class="section-header text-center">
        <h1>{{ page.title }}</h1>
      </div>
      <div class="rte">
        {{ page.content }}
      </div>
    </div>
  </div>
</div>
{% else %}
  {%- include 'lock-content-login' -%}
{% endif %}

Where lock-content-login will be the login form and reset password code. 

Now let's say that you want to tag wholesale customer only. Then you can add customerTags to the conditional 

 

{% assign customerTags = customer.tags | join:',' %}
{% if customerTags contains 'wholesale' %}   
0 Likes
Highlighted
Tourist
3 0 1

Hi Michel! Where do you paste this code?

I need to protect with password just one page and It would be perfect if it's visible only for customers that are logged in.

 

Cheers.

0 Likes
Highlighted
New Member
2 0 0

Thank you for providing that code. Where do you insert it? Where do you edit which specific product page needs this protection? Thank you so much!

0 Likes
Highlighted
New Member
2 0 0

You would paste that entire code block as a page template(theme>edit code).

You'll also have to select the template you created as the template for the page through your theme UI.

Whatever content and title you enter through the theme UI for the page will appear where the liquid interpreter code is.

 

0 Likes