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 Downloads (Bootstrap 5 Override)
|
|
|
|
|
#
|
|
|
|
|
# Shows downloads on the account page.
|
|
|
|
|
#
|
|
|
|
|
# WooCommerce PHP equivalent: myaccount/downloads.php
|
|
|
|
|
#
|
|
|
|
|
# @package WcBootstrap
|
|
|
|
|
# @since 0.1.0
|
|
|
|
|
#}
|
|
|
|
|
|
Fix 10 known bugs: catalog, single product, and account pages (v0.1.5)
Catalog: page title via woocommerce_page_title(), breadcrumbs, category
template rename (underscore), 3-column grid, single chevron on sort.
Single product: variable form data attributes + disabled CSS class fix
(WC JS only toggles CSS classes, not HTML disabled attribute), dark mode
select specificity (0,5,1) to beat WC's (0,4,3) background shorthand,
gallery main image in thumbnail strip with empty URL guard, related/
upsells setup_postdata for correct global $product, grouped product
loop logic rewrite.
Account: downloads via wc_get_customer_available_downloads().
New: product-gallery.js, sanitize_title filter, wc_setup_product_data()
and wp_reset_postdata() Twig functions, product-thumbnails.html.twig
suppressor. Removed obsolete PLAN.md and SETUP.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:33:31 +01:00
|
|
|
{# Match PHP template: use WC()->customer->get_downloadable_products() #}
|
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
|
|
|
{% set downloads = fn('WC').customer.get_downloadable_products() %}
|
|
|
|
|
{% set has_downloads = downloads is not empty %}
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_before_account_downloads', has_downloads) }}
|
|
|
|
|
|
|
|
|
|
{% if has_downloads %}
|
|
|
|
|
{{ do_action('woocommerce_before_available_downloads') }}
|
|
|
|
|
{{ do_action('woocommerce_available_downloads', downloads) }}
|
|
|
|
|
{{ do_action('woocommerce_after_available_downloads') }}
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="alert alert-info" role="alert">
|
|
|
|
|
<i class="bi bi-info-circle me-2" aria-hidden="true"></i>
|
|
|
|
|
{{ __('No downloads available yet.') }}
|
|
|
|
|
<a href="{{ apply_filters('woocommerce_return_to_shop_redirect', wc_get_page_permalink('shop'))|esc_url }}" class="alert-link">
|
|
|
|
|
{{ __('Browse products') }}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{{ do_action('woocommerce_after_account_downloads', has_downloads) }}
|