The customers/register.liquid template includes a form for visitors to make a Customer account.

Template Considerations

Outputting the register form

To output a form that visitors use to log in to their customer page, initialize the form tag with the parameter 'create_customer'. Within the form, include the following:

  • Input of type text with the name attribute customer[first_name]
  • Input of type text with the name attribute customer[last_name]
  • Input of type email with the name attribute customer[email]
  • Input of type password with the name attribute customer[password]
  • Input of type submit to submit the form.

Below is an example of a simple register form:

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

<label for="first_name">First Name</label>
<input type="text" value="" name="customer[first_name]" size="30" />

<label for="last_name">Last Name</label>
<input type="text" value="" name="customer[last_name]" size="30" />

<label for="email">Email Address</label>
<input type="email" value="" name="customer[email]" size="30" />

<label for="password">Password</label>
<input type="password" value="" name="customer[password]" size="30" />

<input type="submit" value="Create" />

{% endform %}