You've already forked wc-bootstrap
- Override WooCommerce's .input-text background (specificity 0,3,1) with [data-bs-theme="dark"] selector for text inputs and textareas - Remove table-light from <thead> in cart, review-order, orders, and payment-methods templates (forces white in dark mode) - Add .alert.woocommerce-* compound selectors for notice overrides outside .woocommerce wrapper ancestry - Suppress focus ring on programmatically focused notices (woocommerce.js focus_populate_live_region adds tabindex + focus) - Wrap order-details product table in card matching thank-you page style - Fix thank-you alert icon/text line wrap with d-flex align-items-center - Bump version to 0.1.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92 lines
3.5 KiB
Twig
92 lines
3.5 KiB
Twig
{#
|
|
# Order Review Table (Bootstrap 5 Override)
|
|
#
|
|
# Renders the order summary table during checkout.
|
|
#
|
|
# Expected context:
|
|
# cart_items - Array of cart items for review
|
|
# cart_subtotal - Subtotal HTML
|
|
# cart_total - Total HTML
|
|
# coupons - Applied coupons
|
|
# fees - Fees
|
|
#
|
|
# WooCommerce PHP equivalent: checkout/review-order.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
<div class="card shadow-sm woocommerce-checkout-review-order-table">
|
|
<div class="card-body p-0">
|
|
<table class="table table-sm mb-0 shop_table woocommerce-checkout-review-order-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="product-name" scope="col">{{ __('Product') }}</th>
|
|
<th class="product-total text-end" scope="col">{{ __('Subtotal') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ do_action('woocommerce_review_order_before_cart_contents') }}
|
|
|
|
{% if cart_items is defined %}
|
|
{% for item in cart_items %}
|
|
<tr class="cart_item">
|
|
<td class="product-name">
|
|
{{ item.product_name|esc_html }}
|
|
<strong class="product-quantity text-body-secondary">× {{ item.quantity }}</strong>
|
|
{{ item.item_data_html|default('')|raw }}
|
|
</td>
|
|
<td class="product-total text-end">
|
|
{{ item.subtotal|raw }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_review_order_after_cart_contents') }}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="cart-subtotal">
|
|
<th scope="row">{{ __('Subtotal') }}</th>
|
|
<td class="text-end">{{ cart_subtotal|raw }}</td>
|
|
</tr>
|
|
|
|
{% if coupons is defined %}
|
|
{% for coupon in coupons %}
|
|
<tr class="cart-discount coupon-{{ coupon.code|esc_attr }}">
|
|
<th scope="row">{{ __('Coupon:') }} {{ coupon.code|esc_html }}</th>
|
|
<td class="text-end">{{ coupon.discount_html|raw }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_review_order_before_shipping') }}
|
|
|
|
{% if wc_shipping_enabled() %}
|
|
{{ do_action('woocommerce_review_order_shipping') }}
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_review_order_after_shipping') }}
|
|
|
|
{% if fees is defined %}
|
|
{% for fee in fees %}
|
|
<tr class="fee">
|
|
<th scope="row">{{ fee.name|esc_html }}</th>
|
|
<td class="text-end">{{ fee.total_html|raw }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_review_order_before_order_total') }}
|
|
|
|
<tr class="order-total">
|
|
<th scope="row" class="fw-bold">{{ __('Total') }}</th>
|
|
<td class="text-end fw-bold fs-5">{{ cart_total|raw }}</td>
|
|
</tr>
|
|
|
|
{{ do_action('woocommerce_review_order_after_order_total') }}
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|