{{-- Shop toolbar partial — used by: - template-shop.blade.php (custom page with [products]) - woocommerce.blade.php (native WC shop / product-category archive) Inputs (all optional, sensible defaults provided): $baseUrl — where the search and sort forms post to $searchQ — current search query (?s=) $activeCatSlug — current active product_cat slug $cats — array of WP_Term (top-level product_cat terms) $showSort — render the sort dropdown (template-shop true, WC archive false) $sortMap — keyed array of sort options (see template-shop) $sortKey — currently selected key from $sortMap $useTermLinks — when true, category chips link to native term archives; when false, they append ?product_cat=slug to $baseUrl --}} @php $baseUrl = $baseUrl ?? (function_exists('get_permalink') ? get_permalink() : home_url('/')); $searchQ = $searchQ ?? ''; $activeCatSlug = $activeCatSlug ?? ''; $cats = $cats ?? []; $showSort = $showSort ?? false; $sortMap = $sortMap ?? []; $sortKey = $sortKey ?? 'menu_order'; $useTermLinks = $useTermLinks ?? false; $showFilterBtn = $showFilterBtn ?? false; $allLink = $useTermLinks ? (function_exists('wc_get_page_permalink') ? wc_get_page_permalink('shop') : $baseUrl) : $baseUrl; $isAllActive = ! $activeCatSlug && ! (function_exists('is_product_category') && is_product_category()); @endphp
{{-- The shop archive no longer renders its own search input — searching is handled site-wide by the header search button (🔍) which opens the full overlay with live results. --}} @if (! empty($cats)) @endif @if ($showFilterBtn) @endif @if ($showSort && ! empty($sortMap))
@if ($searchQ) @endif @if ($activeCatSlug) @endif
@endif