AUS-122 Search & Facet Deployment Guide

AUS-122 Search & Facet Deployment Guide

AUS-122 Search & Facet Update — Deployment Guide

What’s New

This update adds to the existing plugin:

  1. class-search-handler.php — REST API with 4 endpoints:

    • GET /wp-json/ausstell/v1/search/autocomplete?q=keyword — Autocomplete suggestions
    • GET /wp-json/ausstell/v1/search/products?... — Faceted product search
    • GET /wp-json/ausstell/v1/search/facets?... — Facet counts
    • GET /wp-json/ausstell/v1/search/similar/(?P<product_id>\d+) — Similar pieces
  2. search.js — Frontend JavaScript (943 lines):

    • 300ms debounced autocomplete on search input
    • Keyboard navigation (up/down/enter/esc)
    • Faceted filtering (category, condition, status, period)
    • Authenticated-only toggle
    • Mobile filter bottom sheet
    • URL-based state management
    • Similar pieces loading per card
  3. archive-product-exhibition.php — Enhanced archive template:

    • Search toolbar with input + clear button + sort dropdown
    • Autocomplete dropdown panel
    • Filter sidebar with accordion sections
    • Period chips and auth-only toggle
    • Active filter chips
    • Mobile filter overlay
  4. ausstellungsstuecke.php — Plugin bootstrap updates:

    • require_once for SearchHandler
    • rest_api_init hook for SearchHandler routes
    • wp_enqueue_script for search.js

Files to Update

All 4 files are in a delta ZIP at:
https://ausstellungsstuecke-kaufen.de/wp-content/uploads/2026/05/ausstell-search-update.zip

FilePath in plugin
class-search-handler.phpwp-content/plugins/ausstellungsstuecke-plugin/includes/
search.jswp-content/plugins/ausstellungsstuecke-plugin/assets/js/
archive-product-exhibition.phpwp-content/plugins/ausstellungsstuecke-plugin/templates/
ausstellungsstuecke.phpwp-content/plugins/ausstellungsstuecke-plugin/

Deployment Steps

  1. Download the ZIP from the URL above
  2. Extract the 4 files
  3. Upload/replace each file in the plugin directory via Elementor Cloud File Manager or SFTP
  4. No database migration needed — no new tables or columns
  5. Verify: GET /wp-json/ausstell/v1/ should show /search/autocomplete, /search/products, /search/facets, /search/similar/(?P<product_id>\d+) routes

Technical Notes

  • All search endpoints are public (permission_callback: __return_true)
  • class-search-handler.php contains one fix: declare(strict_types=1); (was missing closing paren)
  • No WooCommerce template changes required
  • No new database tables

Verification After Deploy

Visit the shop page — you should see:

  • Search bar with autocomplete
  • Filter panel on left (desktop) or bottom sheet (mobile)
  • Sort dropdown
  • Facet count badges on filter checkboxes

URLs with search params should work: /?s=monet&exhibition_category=gem%C3%A4lde