The password template renders the password page, which is a landing page that's shown when password protection is applied to a store. This page includes a message that is editable by merchants and the password form for customers to gain access to the store.

Location

The password template is located in the templates directory of the theme:

└── theme
    ├── layout
    ├── templates
    |   ...
    |   ├── password.liquid
    |   ...
    ...

Content

You can include the following in your section inside of the template:

The password message

When password protection is enabled on a store, there's also the option to include a message. This message can be shown using the password_message attribute of the Liquid shop object:

{% unless shop.password_message %}
  {{ shop.password_message | escape }}
{% endunless %}

The password form

The password form can be added with the <form> element. Within the form tag block, you can to include an <input> with the following attributes:

  • type="text"
  • name="password"

For example:

<form method="POST" action="{{ '/api/password/v2' | add_root_url }}">
  <input placeholder="Password" name="password" maxlength="100" required />
  <button type="submit">Enter</button>
</form>

Usage

If you're working on a development store, then you can't show a custom password page on the store. A development store-specific password page is always displayed.

Although the customizable password page isn't used to control access to your development store, you can still view it after you log in, or edit it from the Shoplazza admin.

To view the customizable password page, logged-in visitors can navigate to the https://your-store-name.myshoplaza.com/password, where your-store-name is the name of the development store.