Skip to main content

customers/activate_account

The customers/activate_account template renders the customer account activation page, which hosts the form for activating a customer account.

Tip

Refer to the customers/activate_account template and its main section in Dawn for an example implementation.

An example of the customers/activate_account template in Dawn

The customers/activate_account template is located in the templates > customers directory of the theme:

└── theme
├── layout
├── templates
| └── customers
| ├── activate_account.json
| ...
...

You should include the customer account activation form in your customers/activate_account template or a section inside of the template.

Tip

If you're using a JSON template, then any HTML or Liquid code needs to be included in a section that's referenced by the template.

Anchor to The customer account activation formThe customer account activation form

The customer account activation form can be added with the Liquid form tag and accompanying 'activate_customer_password' parameter. Within the form tag block, you need to include the following:

Inputtypename
Passwordpasswordcustomer[password]
Password confirmationpasswordcustomer[password_confirmation]

For example:

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

<div className="password">
<label for="password">Password</label>
<input type="password" name="customer[password]" />
</div>

<div className="password_confirm">
<label for="password_confirmation">Password Confirmation</label>
<input type="password" name="customer[password_confirmation]" />
</div>

<div className="submit">
<input type="submit" value="Activate account" />
<span>or</span>
<input type="submit" name="decline" value="Decline invitation" />
</div>
{% endform %}

When working with the customers/activate_account template, you should familiarize yourself with previewing the template.

Anchor to Preview the templatePreview the template

To preview the customers/activate_account template, perform the following steps:

  1. From your Shopify admin, add a fake customer on the Customers page using your own email.

  2. Click the ... button at the top right of the page for your newly created customer, and then click Send account invite.

  3. Check your email inbox for the Customer account invite email.

  4. Click the link in the email. This will take you to the customer account activation page.


Was this page helpful?