{% if customer %} {% set orders = customer.orders %} {% if orders|length %} {% for order in orders %} {% endfor %}
{{ 'Order'|t('commerce') }} {{ 'Order Date'|t('commerce') }} {{ 'Total Paid'|t('commerce') }} {{ 'Status'|t('commerce') }}
{{ order.link|raw }} {% if order.isCompleted %}{{ order.dateOrdered|date('D dS M Y') }}{% endif %} {{ order.totalPaid|currency(order.currency) }} {{ order.orderStatus.labelHtml|raw }}
{% endif %} {% set addresses = customer.addresses %}
{% if addresses|length %}
{% for address in addresses %} {% endfor %}
{% endif %} {% set subscriptions = customer.subscriptions %}
{% for subscription in subscriptions %} {% endfor %}
{{ 'Subscription'|t('commerce') }} {{ 'Subscription date'|t('commerce') }} {{ 'Cancellation date'|t('commerce') }} {{ 'Expiration date'|t('commerce') }} {{ 'Is subscription active?'|t('commerce') }}
{{ subscription }} {{ subscription.dateCreated|date('D dS M Y') }} {{ subscription.dateCanceled ? subscription.dateCanceled|date('D dS M Y') : '' }} {{ subscription.dateExpired ? subscription.dateExpired|date('D dS M Y') : '' }} {{ subscription.status == 'active' ? 'Yes'|t('commerce') : 'No'|t('commerce') }}
{% endif %} {% css %} .address-heading-label { margin-bottom:4px; } {% endcss %} {% js %} window.countries = {{ craft.commerce.countries.allCountries|values|json_encode|raw }}; window.states = {{ craft.commerce.states.allStates|values|json_encode|raw }}; $(".address-box").each(function(){ new Craft.Commerce.AddressBox($(this),{}); }); {% endjs %}