You've already forked wc-bootstrap
Add 15 Twig template overrides for the product archive and shop loop: - archive-product: 3+9 grid layout with optional filter sidebar - content-product: card component with hook-based content injection - content-product-cat: category card with thumbnail - product-searchform: input-group with search icon button - loop/loop-start, loop-end: responsive row-cols grid - loop/header: archive title with description hook - loop/result-count: showing X-Y of Z with aria-relevant - loop/orderby: form-select-sm sort dropdown - loop/pagination: delegates to components/pagination.html.twig - loop/no-products-found: alert-info empty state - loop/add-to-cart: btn-primary-sm with AJAX data attributes - loop/price: fw-semibold with sale/regular markup - loop/rating: Bootstrap Icon stars (full, half, empty) - loop/sale-flash: badge bg-danger positioned overlay CSS additions: product card hover, sale badge z-index, star rating sizing, price del/ins styling, WooCommerce grid reset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.3 KiB
Twig
41 lines
1.3 KiB
Twig
{#
|
|
# Catalog Ordering / Sort Dropdown (Bootstrap 5 Override)
|
|
#
|
|
# Renders the product sort-by dropdown as a Bootstrap 5 form-select.
|
|
#
|
|
# Expected context:
|
|
# catalog_orderby_options - Associative array of { value: label } sort options
|
|
# orderby - Currently selected orderby value
|
|
# use_label - Whether to display a label (boolean)
|
|
#
|
|
# WooCommerce PHP equivalent: loop/orderby.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
<form class="woocommerce-ordering d-inline-block" method="get">
|
|
{% if use_label is defined and use_label %}
|
|
<label for="woocommerce-orderby" class="form-label visually-hidden">
|
|
{{ __('Sort by') }}
|
|
</label>
|
|
{% endif %}
|
|
|
|
<select name="orderby"
|
|
id="woocommerce-orderby"
|
|
class="form-select form-select-sm"
|
|
aria-label="{{ __('Shop order') }}"
|
|
onchange="this.form.submit()">
|
|
{% if catalog_orderby_options is defined %}
|
|
{% for value, label in catalog_orderby_options %}
|
|
<option value="{{ value|esc_attr }}"{% if value == orderby %} selected{% endif %}>
|
|
{{ label|esc_html }}
|
|
</option>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</select>
|
|
|
|
<input type="hidden" name="paged" value="1" />
|
|
{{ wc_query_string_form_fields() }}
|
|
</form>
|