Why isn't my password protection message displaying on my online store?

I need to restrict access to my store for a few days, so have enabled password protection, however, the message I have placed in the “message to your visitors” box isn’t showing, only a message that says “coming soon”.

Is there something more I should be doing to have the message show, or is this a bug?

Hi @omgbeauty

If you’re on any Shopify plan then the message would appear and if you’re still trying building your store, it’ll show coming soon.
However, old themes have password.liquid files and Shopify allowed to place the custom text but now Shopify deprecated the password.liquid file.

Please let us know your store’s theme name and website url to check further.

Thanks

Sheesh B

Hi Sheesh_b, thanks so much for your reply. I am on a paid plan using Testament theme. Website url is www.omgbeauty.co.nz

Hi @omgbeauty

You can go to edit code and the under Sections find password.liquid.

You can see some options there to change the text.

Let us know if that helps.

Thanks

Sheesh B

Hi Sheesh,

This is all I have displayed in the edit code area

{% section ‘password-template’ %}

and when I change it to

{% section ‘shopify-section-password-template’ %}

There is an error that appears. Can you please advise what I need to change it to.

Hi @omgbeauty

Let’s make it simple.

When you see this code

{% section 'password-template' %}

It means a file is inserted here from a Sections folder

Now, when you see files in Sections folder, look for “password-template.liquid”

and share the code so that I can provide you changes where you needed to add your custom message.

Thanks

Sheesh B

Hi Sheesh,

I can’t thank you enough for your help with this. This is all the code I see when going to the “password-template.liquid”, all 326 lines

{% layout none %}

{{ page_title }} {% if page_description %} {%- comment %}{% endcomment -%} {%- capture var %}{% render 'locksmith-variables', variable: 'transparent', hiding_scope: 'resource' %}{% endcapture %}{% if var == 'true' %}{% endif -%} {%- comment %}original: {%- endcomment %} {%- comment %}{% endcomment -%} {% endif %} {{ 'stylesheet.css' | asset_url | stylesheet_tag }} {{ content_for_header }}
{% form 'storefront_password' %} {{ form.errors | default_errors }} {{ 'password.general.enter_store' | t }} {% endform %}
{{ 'password.general.enter_store' | t }}

{% if section.settings.background_image %}

{% else %}
{% endif %}
{% if section.settings.logo != blank %} {{ section.settings.logo.alt | default: shop.name }} {% else %} {{ shop.name }} {% endif %}
{% unless section.settings.newsletter_details == blank %}
{{ section.settings.newsletter_details }}
{% endunless %}
{% form 'customer' %} {{ form.errors | default_errors }} {% if form.posted_successfully? %}

{{ 'password.general.thanks' | t }}

{% else %} {% endif %} {% endform %}
{% include 'social-icons' %}
{{ 'password.general.powered' | t }} shopify

{%- assign image_size = ‘2048x’ -%}
{% assign opacity = section.settings.overlay_color_opacity | divided_by: 100.00 %}

.password-page { {%- if section.settings.background_color -%} background-color: {{ section.settings.background_color }}; {%- endif -%} {% if section.settings.background_image %} background: {%- if section.settings.show_overlay_color -%} linear-gradient( {{ section.settings.background_overlay_color | color_modify: 'alpha', opacity }}, {{ section.settings.background_overlay_color | color_modify: 'alpha', opacity }}), {%- endif -%} url({{ section.settings.background_image | img_url: image_size }}) {% endif %}; background-position: center center; color: {{ section.settings.text_color }}; margin-top: -40px; background-repeat: no-repeat; background-size: cover; } {% if section.settings.logo_max_width != blank %} .password-page #logo img { max-width: {{ section.settings.logo_max_width }}px; } {% endif %} input#password-email::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: {{ section.settings.text_color }}; } input#password-email::-moz-placeholder { /* Firefox 19+ */ color: {{ section.settings.text_color }}; } input#password-email:-ms-input-placeholder { /* IE 10+ */ color: {{ section.settings.text_color }}; } input#password-email:-moz-placeholder { /* Firefox 18- */ color: {{ section.settings.text_color }}; } input#password-subscribe { background-color: {{ section.settings.button_color }}; color: {{ section.settings.button_text_color }}; } input#password-subscribe:hover { opacity: 0.75; } input#password-email { border-color: {{ section.settings.border_color }}; } .password-page p, .password-page h1, .password-page h2, .password-page h3 #password-signup h3, .password-page-footer, .slideout-toggle.open_password { color: {{ section.settings.text_color }}; } .password-page a { opacity: 0.8; } .password-page a:hover { opacity: 1.0; } #password-message, #newsletter-details p { font-size: {{ section.settings.text_size }}px; line-height: initial; }

{% schema %}
{
“name”: “Password page”,
“settings”: [
{
“type”: “header”,
“content”: “Logo”
},
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Logo image”
},
{
“type”: “range”,
“id”: “logo_max_width”,
“min”: 100,
“max”: 600,
“step”: 10,
“unit”: “px”,
“label”: “Logo image width”,
“default”: 300
},
{
“type”: “richtext”,
“id”: “newsletter_details”,
“label”: “Coming soon message”,
“default”: “

Coming Soon

Signup for our newsletter and get updated when we launch our site <a href="[https://example.com/\](https://example.com/\)”>see our newsletter policy.

"
},
{
“type”: “range”,
“id”: “text_size”,
“min”: 12,
“max”: 36,
“step”: 1,
“unit”: “px”,
“label”: “Password page message size”,
“default”: 18
},
{
“type”: “color”,
“id”: “text_color”,
“label”: “Text Color”,
“default”: “#000000
},
{
“type”: “header”,
“content”: “Background”
},
{
“type”: “paragraph”,
“content”: “Choose between a background color or background image.”
},
{
“type”: “color”,
“id”: “background_color”,
“label”: “Background Color”,
“default”: “#f5f5f5
},
{
“type”: “image_picker”,
“id”: “background_image”,
“label”: “Background image”
},
{
“type”: “checkbox”,
“id”: “show_overlay_color”,
“label”: “Show background overlay color”,
“default”: false
},
{
“type”: “color”,
“id”: “background_overlay_color”,
“label”: “Background Image Overlay Color”,
“default”: “#f5f5f5
},
{
“type”: “range”,
“id”: “overlay_color_opacity”,
“min”: 10,
“max”: 100,
“step”: 10,
“unit”: “%”,
“label”: “Color Overlay Opacity”,
“default”: 80
},
{
“type”: “header”,
“content”: “Signup Form”
},
{
“type”: “color”,
“id”: “border_color”,
“label”: “Form Border Color”,
“default”: “#000000
},
{
“type”: “color”,
“id”: “button_color”,
“label”: “Button Background Color”,
“default”: “#000000
},
{
“type”: “color”,
“id”: “button_text_color”,
“label”: “Button Text Color”,
“default”: “#ffffff
}
]
}
{% endschema %}

Hi @omgbeauty

Just paste below code again and look for line number 64 and add your text after removing the line that I added there to explain it and it’ll work.

{% layout none %}

 

{% if page_description %}
{%- comment %}{% endcomment -%}
{% endif %}
{{ 'stylesheet.css' | asset_url | stylesheet_tag }}

{{ content_for_header }}

{% form 'storefront_password' %}
{{ form.errors | default_errors }}

{% endform %}

{{ 'password.general.enter_store' | t }}

{% if section.settings.background_image %}

{% else %}

{% endif %}

{% if section.settings.logo != blank %}

{% else %}
{{ shop.name }}
{% endif %}

{% unless section.settings.newsletter_details == blank %}

Write here your text after removing this line insted of coming soon text

{% endunless %}

{% form 'customer' %}
{{ form.errors | default_errors }}
{% if form.posted_successfully? %}

{{ 'password.general.thanks' | t }}

{% else %}

{% endif %}
{% endform %}

{% include 'social-icons' %}

{{ 'password.general.powered' | t }}
shopify

{%- assign image_size = '2048x' -%}
{% assign opacity = section.settings.overlay_color_opacity | divided_by: 100.00 %}

{% schema %}
{
"name": "Password page",
"settings": [
{
"type": "header",
"content": "Logo"
},
{
"type": "image_picker",
"id": "logo",
"label": "Logo image"
},
{
"type": "range",
"id": "logo_max_width",
"min": 100,
"max": 600,
"step": 10,
"unit": "px",
"label": "Logo image width",
"default": 300
},
{
"type": "richtext",
"id": "newsletter_details",
"label": "Coming soon message",
"default": "

Coming Soon

Signup for our newsletter and get updated when we launch our site see our newsletter policy.

"
},
{
"type": "range",
"id": "text_size",
"min": 12,
"max": 36,
"step": 1,
"unit": "px",
"label": "Password page message size",
"default": 18
},
{
"type": "color",
"id": "text_color",
"label": "Text Color",
"default": "#000000"
},
{
"type": "header",
"content": "Background"
},
{
"type": "paragraph",
"content": "Choose between a background color or background image."
},
{
"type": "color",
"id": "background_color",
"label": "Background Color",
"default": "#f5f5f5"
},
{
"type": "image_picker",
"id": "background_image",
"label": "Background image"
},
{
"type": "checkbox",
"id": "show_overlay_color",
"label": "Show background overlay color",
"default": false
},
{
"type": "color",
"id": "background_overlay_color",
"label": "Background Image Overlay Color",
"default": "#f5f5f5"
},
{
"type": "range",
"id": "overlay_color_opacity",
"min": 10,
"max": 100,
"step": 10,
"unit": "%",
"label": "Color Overlay Opacity",
"default": 80
},
{
"type": "header",
"content": "Signup Form"
},
{
"type": "color",
"id": "border_color",
"label": "Form Border Color",
"default": "#000000"
},
{
"type": "color",
"id": "button_color",
"label": "Button Background Color",
"default": "#000000"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button Text Color",
"default": "#ffffff"
}
]
}
{% endschema %}

Let me know if that works for you.

Thanks

Sheesh B

1 Like

Hi Sheesh,

I honestly can’t thank you enough for helping me get this sorted. The format isn’t great, but the text is now showing, which is all I really need. Many, many thanks again.

1 Like

Hi @omgbeauty

Glad that it helps.

If you wanted to format it in a better way just put
after last word of line which after you want a line break.

Also, kindly mark as accepted answer to help other members as an accepted answer.

Thanks

Sheesh B

Thanks again, so incredibly helpful.

1 Like