-
Payment Methods
+
+
+ Payment Methods
+
{% include 'lib/rule.twig' %}
{% include 'lib/empty.twig' with {
@@ -11,20 +13,25 @@
subtitle: 'Add a payment method'
} %}
-
Billing Address
+
+ Billing Address
+
{% include 'lib/rule.twig' %}
-
Your billing information must match the information associatied with the credit card making the purchase.
-
- {{ default_billing.name }}
- {{ default_billing.company }}
- {{ default_billing.addressLine1 }}
- {{ default_billing.addressLine2 }}
- {{ default_billing.city }}, {{ default_billing.state }} {{ default_billing.zip }}
- {{ default_billing.phone }}
-
+
+ Your billing information must match the information associatied with the credit card making the purchase.
+
+ {% for address in addresses %}
+ {% if address.id == user.billing_address_id %}
+ {% include 'lib/address.twig' with {
+ address: address,
+ edit_url: '/account/billing/edit/' ~ address.id,
+ delete_url: '/account/billing/delete/' ~ address.id
+ } %}
+ {% endif %}
+ {% endfor %}
- {% include 'lib/rule.twig' with {
- text: 'OR'
- } %}
-
Use saved address
+ {% if addresses|length > 1 %}
+ {% include 'lib/rule.twig' with {
+ text: 'OR'
+ } %}
+ {% for address in addresses %}
+ {% include 'lib/address.twig' with {
+ address: address,
+ edit_url: '/account/billing/edit/' ~ address.id,
+ delete_url: '/account/billing/delete/' ~ address.id
+ } %}
+ {% endfor %}
+ {% endif %}
-
\ No newline at end of file
+
diff --git a/src/views/account/index.twig b/src/views/account/index.twig
index 0c601cb..b46ff3c 100644
--- a/src/views/account/index.twig
+++ b/src/views/account/index.twig
@@ -1,10 +1,12 @@
{% include 'lib/alert.twig' %}
-
Profile
+
+ Profile
+
{% include 'lib/rule.twig' %}
-
Email
+
+ Email
+
{% include 'lib/rule.twig' %}
-
-
{{ default_shipping.name }}
- {{ default_shipping.company }}
- {{ default_shipping.addressLine1 }}
- {{ default_billing.addressLine2 }}
- {{ default_shipping.city }}, {{ default_shipping.state }}, {{ default_shipping.zip }}
- {{ default_shipping.phone }}
-
-
-
-
- {% include 'lib/rule.twig' %}
-
-
{{ default_billing.name }}
- {{ default_billing.company }}
- {{ default_billing.addressLine1 }}
- {{ default_billing.addressLine2 }}
- {{ default_billing.city }}, {{ default_billing.state }}, {{ default_billing.zip }}
- {{ default_billing.phone }}
-
+ {% for address in addresses %}
+ {% if address.id == user.shipping_address_id %}
+ {% include 'lib/address.twig' with {
+ address: address,
+ edit_url: '/account/shipping/edit/' ~ address.id,
+ delete_url: '/account/shipping/delete/' ~ address.id
+ } %}
+ {% endif %}
+ {% endfor %}
+ {% include 'lib/rule.twig' %}
+ {% for address in addresses %}
+ {% if address.id == user.billing_address_id %}
+ {% include 'lib/address.twig' with {
+ address: address,
+ edit_url: '/account/billing/edit/' ~ address.id,
+ delete_url: '/account/billing/delete/' ~ address.id
+ } %}
+ {% endif %}
+ {% endfor %}
+