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
|
|
|
{#
|
|
|
|
|
# View Order (Bootstrap 5 Override)
|
|
|
|
|
#
|
2026-02-28 13:28:15 +01:00
|
|
|
# Shows details of a specific order on the account page
|
|
|
|
|
# with summary card, status badge, and order notes.
|
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
|
|
|
# HPOS compatible: uses WC_Order methods only.
|
|
|
|
|
#
|
|
|
|
|
# Expected context:
|
|
|
|
|
# order_id - Order ID
|
|
|
|
|
# order - WC_Order object
|
|
|
|
|
#
|
|
|
|
|
# WooCommerce PHP equivalent: myaccount/view-order.php
|
|
|
|
|
#
|
|
|
|
|
# @package WcBootstrap
|
|
|
|
|
# @since 0.1.0
|
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
{% set notes = order.get_customer_order_notes() %}
|
|
|
|
|
|
2026-02-28 13:28:15 +01:00
|
|
|
<div class="card shadow-sm mb-4">
|
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
|
<h2 class="h5 mb-0">
|
|
|
|
|
{{ __('Order #%s')|format(order.get_order_number()) }}
|
|
|
|
|
</h2>
|
|
|
|
|
{% include 'components/status-badge.html.twig' with { status: order.get_status() } %}
|
|
|
|
|
</div>
|
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
|
|
|
<span class="text-body-secondary">{{ __('Date') }}</span>
|
|
|
|
|
<time datetime="{{ order.get_date_created().date('c')|esc_attr }}">
|
|
|
|
|
{{ wc_format_datetime(order.get_date_created())|esc_html }}
|
|
|
|
|
</time>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
|
|
|
<span class="text-body-secondary">{{ __('Status') }}</span>
|
|
|
|
|
{% include 'components/status-badge.html.twig' with { status: order.get_status() } %}
|
|
|
|
|
</li>
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
|
|
|
<span class="text-body-secondary">{{ __('Total') }}</span>
|
|
|
|
|
<strong>{{ order.get_formatted_order_total()|wp_kses_post }}</strong>
|
|
|
|
|
</li>
|
|
|
|
|
{% if order.get_payment_method_title() %}
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
|
|
|
<span class="text-body-secondary">{{ __('Payment method') }}</span>
|
|
|
|
|
<span>{{ order.get_payment_method_title()|esc_html }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</ul>
|
|
|
|
|
</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
|
|
|
|
|
|
|
|
{% if notes %}
|
2026-02-28 13:28:15 +01:00
|
|
|
<div class="card shadow-sm mb-4">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="h6 mb-0">
|
|
|
|
|
<i class="bi bi-chat-left-text me-1" aria-hidden="true"></i>
|
|
|
|
|
{{ __('Order updates') }}
|
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
|
{% for note in notes %}
|
|
|
|
|
<div class="list-group-item">
|
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-1">
|
|
|
|
|
<small class="text-body-secondary">
|
|
|
|
|
<i class="bi bi-clock me-1" aria-hidden="true"></i>
|
|
|
|
|
{{ date_i18n(__('l jS \\o\\f F Y, h:ia'), strtotime(note.comment_date)) }}
|
|
|
|
|
</small>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-0">
|
|
|
|
|
{{ wpautop(wptexturize(note.comment_content))|raw }}
|
|
|
|
|
</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
|
|
|
</div>
|
2026-02-28 13:28:15 +01:00
|
|
|
{% endfor %}
|
|
|
|
|
</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
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_view_order', order_id) }}
|