customers/activate_account.liquid

The customers/activate_account.liquid template is used to display the form for activating a customer account.

Ex activate account

Template considerations

Previewing the activate_account.liquid template

To preview the activate_account.liquid template, you'll need to add a fake customer with your email address.

  1. From your Shopify admin, add a fake customer on the Customers page. Make sure that you enter your own email address in the Email field.

  2. After adding the customer, click the ... button on the top right and select "Send account invite".

Send account invite
  1. Check your email inbox for the "Create customer account" email.

  2. In the email, you will see a URL link to the account activation form. Click the URL to view the activate_account.liquid template.

Customer account activation form

The customer account activation form must be wrapped in the form tag with "activate_customer_password" as its parameter.

Within the form tag block, there should be two inputs of type password, one for the password and another for confirming the password. They must have the attributes name="customer[password]" and name="customer[password_confirmation]", respectively.

Here is an example code snippet of a customer account activation form:


{% form 'activate_customer_password' %}

{{ form.errors | default_errors }}

<div class="password">
  <label for="password">Password</label>
  <input type="password" name="customer[password]" />
</div>
<div class="password_confirm">
  <label for="password_confirmation">Password Confirmation</label>
  <input type="password" name="customer[password_confirmation]" />
</div>
<div class="action_bottom">
  <input type="submit" value="Activate Account" />
  <span>or</span>
  <input type="submit" name="decline" value="Decline Invitation" />
</div>

{% endform %}

Want to discuss this page?

Visit the Shopify Community