You've already forked wc-bootstrap
45 lines
1.4 KiB
Twig
45 lines
1.4 KiB
Twig
|
|
{#
|
||
|
|
# Product Content in Loop (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Renders a single product card within the shop loop grid.
|
||
|
|
# Uses Bootstrap 5 card component with stretched-link.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# product - WC_Product object with:
|
||
|
|
# .name - Product name
|
||
|
|
# .permalink - Product URL
|
||
|
|
# .image - Product thumbnail HTML
|
||
|
|
# .price_html - Formatted price HTML
|
||
|
|
# .rating_html - Star rating HTML
|
||
|
|
# .is_on_sale - Whether product is on sale
|
||
|
|
# .add_to_cart - Add-to-cart button context
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: content-product.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
<div class="col">
|
||
|
|
<article class="card h-100 shadow-sm product">
|
||
|
|
{{ do_action('woocommerce_before_shop_loop_item') }}
|
||
|
|
|
||
|
|
{# Product image with sale badge overlay #}
|
||
|
|
<div class="position-relative overflow-hidden">
|
||
|
|
{{ do_action('woocommerce_before_shop_loop_item_title') }}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card-body d-flex flex-column">
|
||
|
|
{# Product title #}
|
||
|
|
{{ do_action('woocommerce_shop_loop_item_title') }}
|
||
|
|
|
||
|
|
{# Rating and price #}
|
||
|
|
{{ do_action('woocommerce_after_shop_loop_item_title') }}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card-footer bg-transparent border-0 pt-0 pb-3 px-3">
|
||
|
|
{{ do_action('woocommerce_after_shop_loop_item') }}
|
||
|
|
</div>
|
||
|
|
</article>
|
||
|
|
</div>
|