Files
wc-bootstrap/templates/content-product-cat.html.twig
magdev c9c99a6b88 Implement Phase 2: product archive and shop loop templates (Bootstrap 5)
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>
2026-02-28 10:23:09 +01:00

35 lines
1.0 KiB
Twig

{#
# Product Category Content in Loop (Bootstrap 5 Override)
#
# Renders a product category card within the shop loop grid.
#
# Expected context:
# category - Product category object with:
# .name - Category name
# .count - Number of products
# .link - Category URL
# .thumbnail - Category thumbnail HTML
#
# WooCommerce PHP equivalent: content-product-cat.php
#
# @package WcBootstrap
# @since 0.1.0
#}
<div class="col">
<article class="card h-100 shadow-sm product-category">
{{ do_action('woocommerce_before_subcategory', category) }}
<div class="position-relative overflow-hidden">
{{ do_action('woocommerce_before_subcategory_title', category) }}
</div>
<div class="card-body text-center">
{{ do_action('woocommerce_shop_loop_subcategory_title', category) }}
{{ do_action('woocommerce_after_subcategory_title', category) }}
</div>
{{ do_action('woocommerce_after_subcategory', category) }}
</article>
</div>