On the “Your addresses” part of my site, whenever I add a new address, I get the following error:
Everything seems to be fine in the ‘en.default.json’ file…
As well as the ‘Edit languages’ section of Shopify settings…
Anybody have any idea what might be causing this?
Thanks in advance!
Kyle_W
August 6, 2021, 12:11am
2
Hey @JohnDoe81 !
I suspect there’s a small typo somewhere in the theme’s address template (templates/customers/addresses.liquid ). Based on the error shown in your screenshot, I’m guessing the template is using the following:
{{ 'customer.addresses.address 2' | t }}
Can you change this to {{ ‘customer.addresses.address2’ | t }} to see if that fixes the error?
Thanks for your answer.
I couldn’t find the typo you mentioned. Here is the template, if it helps:
{% assign name = 'customer.register.title' | t %}
{% include 'nov-breadcrumb', custom_pagetitle : name %}
{% paginate customer.addresses by 5 %}
{% comment %}
Add address form, hidden by default
{% endcomment %}
{% form 'customer_address', customer.new_address %}
## {{ 'customer.addresses.add_new' | t }}
{{ form.set_as_default_checkbox }}
{% endform %}
---
{% comment %}
List all customer addresses with a unique edit form.
Also add pagination in case they have a large number of addresses
{% endcomment %}
{% for address in customer.addresses %}
{% if address == customer.default_address %}
{{ 'customer.addresses.default' | t }}
{% else %}
{{ 'customer.addresses.address' | t }} {{ forloop.index }}
{% endif %}
- {{ 'customer.addresses.my_name' | t }}:
{{ address.name }}
- {{ 'customer.addresses.company' | t }}:
{{ address.company }}
- {{ 'customer.addresses.address1' | t }}:
{{ address.address1 }}
- {{ 'customer.addresses.address2' | t }}:
{{ address.address2 }}
- {{ 'customer.addresses.city' | t }}:
{{ address.city }}
- {{ 'customer.addresses.zip' | t }}:
{{ address.zip }}
- {{ 'customer.addresses.phone' | t }}:
{{ address.phone }}
- {{ 'customer.addresses.country' | t }}:
{{ address.country }}
{% form 'customer_address', address %}
#### {{ 'customer.addresses.edit_address' | t }}
{{ form.set_as_default_checkbox }}
{% endform %}
---
{% endfor %}
{% if paginate.pages > 1 %}
{% include 'pagination' %}
{% endif %}
{% endpaginate %}