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
|
|
|
{#
|
|
|
|
|
# My Account Navigation (Bootstrap 5 Override)
|
|
|
|
|
#
|
|
|
|
|
# Renders the sidebar navigation for the My Account area
|
2026-02-28 13:28:15 +01:00
|
|
|
# using Bootstrap list-group component with icons.
|
|
|
|
|
# Responsive: offcanvas on mobile, sticky sidebar on desktop.
|
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
|
|
|
#
|
|
|
|
|
# WooCommerce PHP equivalent: myaccount/navigation.php
|
|
|
|
|
#
|
|
|
|
|
# @package WcBootstrap
|
|
|
|
|
# @since 0.1.0
|
|
|
|
|
#}
|
|
|
|
|
|
2026-02-28 13:28:15 +01:00
|
|
|
{% set endpoint_icons = {
|
|
|
|
|
'dashboard': 'bi-speedometer2',
|
|
|
|
|
'orders': 'bi-bag',
|
|
|
|
|
'downloads': 'bi-download',
|
|
|
|
|
'edit-address': 'bi-geo-alt',
|
|
|
|
|
'payment-methods': 'bi-credit-card',
|
|
|
|
|
'edit-account': 'bi-person-gear',
|
|
|
|
|
'customer-logout': 'bi-box-arrow-right',
|
|
|
|
|
} %}
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_before_account_navigation') }}
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-outline-secondary w-100 mb-3 d-lg-none"
|
|
|
|
|
type="button"
|
|
|
|
|
data-bs-toggle="offcanvas"
|
|
|
|
|
data-bs-target="#accountNav"
|
|
|
|
|
aria-controls="accountNav">
|
|
|
|
|
<i class="bi bi-list me-1" aria-hidden="true"></i>
|
|
|
|
|
{{ __('Account menu') }}
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div class="offcanvas-lg offcanvas-start" id="accountNav" tabindex="-1"
|
|
|
|
|
aria-labelledby="accountNavLabel">
|
|
|
|
|
<div class="offcanvas-header d-lg-none">
|
|
|
|
|
<h5 class="offcanvas-title" id="accountNavLabel">{{ __('Account menu') }}</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas"
|
|
|
|
|
data-bs-target="#accountNav" aria-label="{{ __('Close') }}"></button>
|
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 class="offcanvas-body p-0">
|
|
|
|
|
<nav class="woocommerce-MyAccount-navigation position-sticky"
|
|
|
|
|
style="top: 5rem;"
|
|
|
|
|
aria-label="{{ __('Account navigation') }}">
|
|
|
|
|
<div class="list-group">
|
|
|
|
|
{% for endpoint, label in wc_get_account_menu_items() %}
|
|
|
|
|
{% set is_active = wc_get_account_menu_item_classes(endpoint) matches '/is-active/' %}
|
|
|
|
|
<a href="{{ wc_get_account_endpoint_url(endpoint)|esc_url }}"
|
|
|
|
|
class="list-group-item list-group-item-action d-flex align-items-center{% if is_active %} active{% endif %}"
|
|
|
|
|
{% if is_active %}aria-current="page"{% endif %}>
|
|
|
|
|
{% if endpoint_icons[endpoint] is defined %}
|
|
|
|
|
<i class="bi {{ endpoint_icons[endpoint] }} me-2" aria-hidden="true"></i>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{{ label|esc_html }}
|
|
|
|
|
</a>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_after_account_navigation') }}
|