You've already forked wc-bootstrap
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>
46 lines
1.5 KiB
Twig
46 lines
1.5 KiB
Twig
{#
|
|
# View Order (Bootstrap 5 Override)
|
|
#
|
|
# Shows details of a specific order on the account page.
|
|
# 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() %}
|
|
|
|
<p>
|
|
{{ __('Order #%1$s was placed on %2$s and is currently %3$s.')|format(
|
|
'<mark class="order-number">' ~ order.get_order_number() ~ '</mark>',
|
|
'<mark class="order-date">' ~ wc_format_datetime(order.get_date_created()) ~ '</mark>',
|
|
'<mark class="order-status">' ~ wc_get_order_status_name(order.get_status()) ~ '</mark>'
|
|
)|wp_kses_post }}
|
|
</p>
|
|
|
|
{% if notes %}
|
|
<h2 class="h5 mt-4 mb-3">{{ __('Order updates') }}</h2>
|
|
<div class="list-group mb-4">
|
|
{% 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">
|
|
{{ 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>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_view_order', order_id) }}
|