Files
wc-bootstrap/templates/brands/brand-description.html.twig
magdev 49b1d52701 Implement Phase 9 & reusable components; skip Phase 8 (emails)
Phase 8 (Emails) skipped: WooCommerce email rendering uses
wc_get_template_html() which bypasses the Twig pipeline entirely.
Email customization deferred to plugins or block email editor.

Phase 9 - Supplementary (7 templates):
- Brand description with thumbnail, taxonomy archive delegate
- Brands A-Z shortcode with alphabetical index navigation
- Single brand thumbnail shortcode
- REST API OAuth login and grant-access forms
- Back-in-stock notification form with email input

Reusable Components (6 templates):
- price: product price display with sale handling
- rating: star rating with Bootstrap Icons (filled/half/empty)
- address-card: billing/shipping address card with edit link
- status-badge: contextual order status badges
- quantity-input: +/- input group widget
- form-field: universal form field renderer (text/select/textarea/checkbox)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:53:44 +01:00

30 lines
849 B
Twig

{#
# Brand Description (Bootstrap 5 Override)
#
# Renders a brand's description with optional thumbnail.
#
# Expected context:
# thumbnail - URL of brand thumbnail image (or empty)
#
# WooCommerce PHP equivalent: brands/brand-description.php
#
# @package WcBootstrap
# @since 0.1.0
#}
{% set image_size = wc_get_image_size('shop_catalog') %}
<div class="term-description brand-description d-flex gap-4 mb-4">
{% if thumbnail %}
<img src="{{ thumbnail|esc_url }}"
alt="{{ single_term_title('', false)|esc_attr }}"
class="rounded flex-shrink-0"
width="{{ image_size.width|esc_attr }}"
style="max-width: {{ image_size.width }}px; height: auto;" />
{% endif %}
<div class="text">
{{ term_description()|wptexturize|wpautop|do_shortcode }}
</div>
</div>