You've already forked wc-bootstrap
Audit and fix 14 Twig templates for escaping bugs, CSS conflicts, and missing Bootstrap styling: - Fix nl2br/esc_html filter order in order details - Add WC gallery modifier classes for zoom/photoswipe JS init - Fix HTML entity double-encoding in headings (up-sells, cross-sells, related) - Remove wrong 'is defined' guards on function calls - Remove duplicate deprecated hooks in dashboard - Add |raw to brand description HTML filter chain - Add role="alert" for accessibility, |esc_attr on notification types - Style mini-cart remove button as Bootstrap btn - Make shipping form-check class conditional - Add shop_table CSS reset and gallery opacity fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
1.2 KiB
Twig
33 lines
1.2 KiB
Twig
{#
|
|
# Product Search Form (Bootstrap 5 Override)
|
|
#
|
|
# Renders the WooCommerce product search form as a Bootstrap 5 input-group.
|
|
#
|
|
# Expected context:
|
|
# index - Unique form index (for multiple search forms on a page)
|
|
#
|
|
# WooCommerce PHP equivalent: product-searchform.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
{% set field_id = 'woocommerce-product-search-field-' ~ (index|default(0)) %}
|
|
|
|
<form role="search" method="get" class="woocommerce-product-search" action="{{ home_url('/') }}">
|
|
<label class="visually-hidden" for="{{ field_id }}">{{ __('Search for:') }}</label>
|
|
<div class="input-group">
|
|
<input type="search"
|
|
id="{{ field_id }}"
|
|
class="form-control"
|
|
placeholder="{{ __('Search products…') }}"
|
|
value="{{ get_search_query() }}"
|
|
name="s" />
|
|
<button type="submit" class="btn btn-outline-primary" aria-label="{{ __('Search') }}">
|
|
<i class="bi bi-search" aria-hidden="true"></i>
|
|
<span class="d-none d-sm-inline ms-1">{{ __('Search') }}</span>
|
|
</button>
|
|
</div>
|
|
<input type="hidden" name="post_type" value="product" />
|
|
</form>
|