Skip to content
This repository was archived by the owner on Aug 30, 2018. It is now read-only.
This repository was archived by the owner on Aug 30, 2018. It is now read-only.

Javascript error in addresses page #489

@rubenbristian

Description

@rubenbristian

Hi

There's a big js error in the addresses.liquid file when address pagination kicks in. I've reported it to Shopify last year, but it seems that it's still here..

When you are on page 2 of addresses it is impossible to edit or add new addresses, because there's a js error caused by the fact that the handlers aren't setup with pagination in mind.

The solution is simple, you just need to add pagination in the js part, when calling the Shopify js functions.

{% paginate customer.addresses by 5 %}
  {% for address in customer.addresses %}
    new Shopify.CountryProvinceSelector('AddressCountry_{{ address.id }}', 'AddressProvince_{{ address.id }}', {
      hideElement: 'AddressProvinceContainer_{{ address.id }}'}
    );
  {% endfor %}
{% endpaginate %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions