customers/register
The customers/register
template renders the customer register page, which hosts the form for customer account creation.
The customers/register
template is located in the templates
> customers
directory of the theme:
You should include the customer register form in your customers/register
template or a section inside of the template.
The customer register form
Anchor link to section titled "The customer register form"The customer register form can be added with the Liquid form
tag and accompanying 'create_customer'
parameter. Within the form tag block, you need to include the following:
Input | type |
name |
---|---|---|
First name | text |
customer[first_name] |
Last name | text |
customer[last_name] |
email |
customer[email] |
|
Password | password |
customer[password] |
For example:
When working with the customers/register
template, you should familiarize yourself with redirecting customers on account creation.
Redirect customers on account creation
Anchor link to section titled "Redirect customers on account creation"By default, when a customer creates an account, they're directed to the home page. However, you can specify a page to direct customers to using the return_to
parameter of the Liquid form tag.
For example, the following directs customers to the all-products collection page: