Last active
March 29, 2017 22:53
-
-
Save stewartknapman/a1bb9f48ac1b2b20d4771bf7449352cb to your computer and use it in GitHub Desktop.
Redirect the Shopify account register form to custom message pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if form.errors and form.errors contains "form" %} | |
{% capture error_output %}{{ form.errors | default_errors }}{% endcapture %} | |
{% capture reset_password %}{{ 'shopify.errors.reset_password_html' | t }}{% endcapture %} | |
{% capture verify_email %}{{ 'shopify.errors.verify_email' | t: customer_email: "*" | split: "*" | first }}{% endcapture %} | |
{% if error_output contains reset_password %} | |
<script> | |
window.location = "/pages/you-have-an-account"; | |
</script> | |
{% elsif error_output contains verify_email %} | |
<script> | |
window.location = "/pages/verify-your-account"; | |
</script> | |
{% endif %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment