Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation
Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button
All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
|
|
|
{#
|
|
|
|
|
# Edit Address Form (Bootstrap 5 Override)
|
|
|
|
|
#
|
2026-02-28 13:28:15 +01:00
|
|
|
# Address editing form wrapped in a Bootstrap card with
|
|
|
|
|
# contextual icon for billing/shipping.
|
Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation
Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button
All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
|
|
|
#
|
|
|
|
|
# Expected context:
|
|
|
|
|
# load_address - Address type ('billing' or 'shipping'), or empty
|
|
|
|
|
# address - Array of address fields
|
|
|
|
|
#
|
|
|
|
|
# WooCommerce PHP equivalent: myaccount/form-edit-address.php
|
|
|
|
|
#
|
|
|
|
|
# @package WcBootstrap
|
|
|
|
|
# @since 0.1.0
|
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
{% set page_title = load_address == 'billing' ? __('Billing address') : __('Shipping address') %}
|
2026-02-28 13:28:15 +01:00
|
|
|
{% set address_icon = load_address == 'billing' ? 'bi-receipt' : 'bi-truck' %}
|
Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation
Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button
All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_before_edit_account_address_form') }}
|
|
|
|
|
|
|
|
|
|
{% if not load_address %}
|
|
|
|
|
{% include 'myaccount/my-address.html.twig' %}
|
|
|
|
|
{% else %}
|
2026-02-28 13:28:15 +01:00
|
|
|
<div class="card shadow-sm">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h2 class="h5 mb-0">
|
|
|
|
|
<i class="bi {{ address_icon }} me-1" aria-hidden="true"></i>
|
|
|
|
|
{{ apply_filters('woocommerce_my_account_edit_address_title', page_title, load_address) }}
|
|
|
|
|
</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<form method="post" novalidate>
|
|
|
|
|
<div class="woocommerce-address-fields">
|
|
|
|
|
{{ do_action('woocommerce_before_edit_address_form_' ~ load_address) }}
|
|
|
|
|
|
|
|
|
|
<div class="woocommerce-address-fields__field-wrapper">
|
|
|
|
|
{% for key, field in address %}
|
|
|
|
|
{{ woocommerce_form_field(key, field, wc_get_post_data_by_key(key, field.value)) }}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_after_edit_address_form_' ~ load_address) }}
|
|
|
|
|
|
|
|
|
|
<div class="mt-3">
|
|
|
|
|
<button type="submit" class="btn btn-primary" name="save_address" value="{{ __('Save address') }}">
|
|
|
|
|
<i class="bi bi-check-lg me-1" aria-hidden="true"></i>
|
|
|
|
|
{{ __('Save address') }}
|
|
|
|
|
</button>
|
|
|
|
|
{{ wp_nonce_field('woocommerce-edit_address', 'woocommerce-edit-address-nonce') }}
|
|
|
|
|
<input type="hidden" name="action" value="edit_address" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation
Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button
All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
|
|
|
</div>
|
2026-02-28 13:28:15 +01:00
|
|
|
</div>
|
Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation
Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button
All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_after_edit_account_address_form') }}
|