You've already forked wc-bootstrap
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>
33 lines
1.1 KiB
Twig
33 lines
1.1 KiB
Twig
{#
|
|
# My Account Downloads (Bootstrap 5 Override)
|
|
#
|
|
# Shows downloads on the account page.
|
|
#
|
|
# WooCommerce PHP equivalent: myaccount/downloads.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
{# Match PHP template: use WC()->customer->get_downloadable_products() #}
|
|
{% 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) }}
|