From 37a50d0f971658ab777696e816791182e153a45c Mon Sep 17 00:00:00 2001 From: Luke Holder Date: Tue, 12 Sep 2023 22:57:32 +0800 Subject: [PATCH] Cleanup --- .../dist/shop/_private/address/list.twig | 13 ++++--------- .../dist/shop/customer/addresses/index.twig | 1 + .../src/shop/_private/address/list.twig | 13 ++++--------- .../src/shop/customer/addresses/index.twig | 1 + 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/example-templates/dist/shop/_private/address/list.twig b/example-templates/dist/shop/_private/address/list.twig index fab6609dcc..d06e614c7f 100644 --- a/example-templates/dist/shop/_private/address/list.twig +++ b/example-templates/dist/shop/_private/address/list.twig @@ -9,11 +9,13 @@ {% if currentUser %} {% if addresses|length %}
- + {% if showAdd %} +
Add Address
+ {% endif %} {% for address in addresses %} {% set editUrl = '/shop/customer/addresses/edit?addressId=' ~ address.id ~ '&redirect=' ~ craft.app.request.fullPath %}
@@ -32,7 +34,7 @@ checked: (attribute(cart, sourceIdName) == address.id) or (not attribute(cart, sourceIdName) and address.id == attribute(_context, primaryIdName)), }) }} {% endif %} - + {{ address|address }} @@ -59,13 +61,6 @@ {% endfor %}
{% endif %} - {% if showAdd %} - - {% endif %} {% endif %} {% js %} diff --git a/example-templates/dist/shop/customer/addresses/index.twig b/example-templates/dist/shop/customer/addresses/index.twig index 5e6c0e57b4..2024af9fba 100644 --- a/example-templates/dist/shop/customer/addresses/index.twig +++ b/example-templates/dist/shop/customer/addresses/index.twig @@ -26,6 +26,7 @@ primaryShippingAddressId: currentUser.primaryShippingAddressId, cardWidth: 'md:w-1/3', showDelete: true, + showAdd: true }) }} {% else %}
diff --git a/example-templates/src/shop/_private/address/list.twig b/example-templates/src/shop/_private/address/list.twig index 5914cce5e5..94fcd3428d 100644 --- a/example-templates/src/shop/_private/address/list.twig +++ b/example-templates/src/shop/_private/address/list.twig @@ -9,11 +9,13 @@ {% if currentUser %} {% if addresses|length %}
- + {% if showAdd %} +
Add Address
+ {% endif %} {% for address in addresses %} {% set editUrl = '/[[folderName]]/customer/addresses/edit?addressId=' ~ address.id ~ '&redirect=' ~ craft.app.request.fullPath %}
@@ -32,7 +34,7 @@ checked: (attribute(cart, sourceIdName) == address.id) or (not attribute(cart, sourceIdName) and address.id == attribute(_context, primaryIdName)), }) }} {% endif %} - + {{ address|address }} @@ -59,13 +61,6 @@ {% endfor %}
{% endif %} - {% if showAdd %} - - {% endif %} {% endif %} {% js %} diff --git a/example-templates/src/shop/customer/addresses/index.twig b/example-templates/src/shop/customer/addresses/index.twig index bbb564ae0d..375b2eb4c4 100755 --- a/example-templates/src/shop/customer/addresses/index.twig +++ b/example-templates/src/shop/customer/addresses/index.twig @@ -26,6 +26,7 @@ primaryShippingAddressId: currentUser.primaryShippingAddressId, cardWidth: 'md:w-1/3', showDelete: true, + showAdd: true }) }} {% else %}