{% if currentUser %} {% redirect 'shop/checkout/addresses' %} {% endif %} {% extends 'shop/_layouts/checkout' %} {% block content %} {% if not cart.email %} {% redirect 'shop/checkout' %} {% endif %} {# Does a user exist with this email address? #} {% set userExists = craft.users.email(cart.email).one() %} {% set userExistsButCantLogin = craft.users.email(cart.email).status(['locked','suspended','pending']).one() %} {% if userExistsButCantLogin %} {% redirect 'shop/checkout/addresses' %} {% endif %}

Account

{% if userExists %}

Sign In

{{ csrfInput() }} {{ redirectInput('shop/checkout/addresses') }}

Forgot your password?

{% else %}

Register

{{ csrfInput() }} {{ redirectInput('shop/checkout/addresses') }} {% macro errorList(errors) %} {% if errors %}
    {% for error in errors %}
  • {{ error }}
  • {% endfor %}
{% endif %} {% endmacro %} {% from _self import errorList %}
{% if user is defined %} {{ errorList(user.getErrors('username')) }} {% endif %}
{% if user is defined %} {{ errorList(user.getErrors('email')) }} {% endif %}
{% if user is defined %} {{ errorList(user.getErrors('password')) }} {% endif %}
{% endif %}

Checkout

Or, just continue as guest →
{% endblock %}