StoreBolt – Advanced Search for WooCommerce

Plugin Banner

StoreBolt – Advanced Search for WooCommerce

by MadrasThemes

Download
Description

WooCommerce search runs through WordPress’s post search, which looks at titles and descriptions and has never heard of a SKU, a variation or a brand. This plugin replaces it with a dedicated, FULLTEXT-indexed table built for products, so a shopper gets a ranked dropdown of real purchasable items from the second character, instead of a page reload.

Everything below runs on your own server, on plain MySQL, and is free.

Search that knows what a product is

  • Variations are first-class. Each variation is its own indexed row with its own SKU, price, attributes and stock status, inheriting the parent’s title and taxonomies. A search for a variation’s SKU opens that variation, not its parent.
  • SKUs, categories, brands and tags are searched alongside titles and descriptions. There is a weight slider for each field, so you decide what “relevant” means in your catalogue.
  • Out-of-stock handling follows WooCommerce’s own setting: show, hide, or push to the bottom.
  • A dedicated index, never a live query. Searches never join posts and postmeta at request time, which is what keeps a large catalogue fast.

A dropdown shoppers recognise

  • Instant results as they type, with the searched words highlighted.
  • Recent searches: the shopper’s own, kept in their browser and never sent anywhere.
  • Trending searches: what your shoppers actually search for, plus terms you promote yourself.
  • Category and brand suggestions, linked to their archives.
  • Query completions: searches other shoppers ran and got results for.
  • Recent and trending laid out as a list or as pills, your choice under Suggestions. Pills fit more terms above the fold and show each recent search’s product picture.
  • An optional category dropdown in the search box, and a takeover of the WooCommerce search results page so the ranked results survive the page load.
  • Works without JavaScript: the box is a real product-search form first, enhanced second.

Placed and styled however you build pages

  • A block (StoreBolt Product Search) with the full colour / typography / border / layout surface WooCommerce’s own Product Search block has, a shortcode ([maswcas_search]), and a classic widget.
  • The dropdown itself is an editable template part built from blocks: re-order it, remove the price, or ship your own layout from a theme.
  • Theme search enhancement, on out of the box: the instant dropdown attaches to the search box your theme already renders, with no block placement at all. If your theme ships a live search of its own, turn one of the two off. Settings Theme search has the switch, and names the theme when it recognises one.

Merchandising you control

  • Product boosts: choose products to promote for particular searches. A boosted product is shown at the top of the results for those terms, including terms its own title and description would never match: a campaign name, “gift”, or something you are about to start stocking.
  • Boosts apply the moment you save (no reindex), and they still obey your catalogue: a product that is hidden, unpublished, or out of stock on a store that hides those is not promoted.

A search dashboard, on every install

A daily rollup (not a log) of what shoppers searched for, what found nothing, and what was searched but never clicked, with one-click hand-offs into a synonym rule or your trending list. Nothing in that table identifies a shopper: no ID, no IP, no timestamp finer than the day.

Optional: StoreBolt hosted search

The plugin is complete on its own. If you want what MySQL structurally cannot do (typo tolerance, synonyms, faceting, and search served off your server), you can connect a paid StoreBolt subscription from the settings screen. Nothing is withheld from the free plugin to sell it, and if the hosted service is ever unreachable, search falls back to your local index automatically.

External services

Out of the box, this plugin makes no external requests. Everything below happens only after a merchant chooses to connect a StoreBolt account, and stops when they disconnect.

StoreBolt (api.storebolt.app) is the service that issues and validates your subscription.

  • When: when you connect (or paste a license key), and once a day afterwards to keep the subscription status and expiry current.
  • What is sent: your license key, your site URL, and an environment report covering the site name, WordPress / WooCommerce / PHP / plugin versions, locale, whether the site is multisite, the published product count, and which search engine is currently active. The environment report is filterable (maswcas_vendor_environment); returning an empty array from that filter sends none of it.
  • Why: to return your store’s search connection, to tell you which stores are on which plan, and so support can tell what a store is running when something breaks.

Your StoreBolt search gateway is the host named in the connection your account returns.

  • When: only while the hosted engine is the selected engine. “Keep the cache warm between shoppers” adds no destination: those requests go to your own store’s search endpoint, and reach the gateway only where a shopper’s search would have, which is when the answer is not already cached. What it changes is the timing, not the recipient.
  • What is sent: the shopper’s search terms, and your indexed catalogue documents (product and variation titles, descriptions, SKUs, prices, stock status, visibility, attributes, categories, brands and tags) as they change. Images, permalinks and the prices a shopper is shown are resolved locally and never leave your store. No shopper identity, cookie or IP is attached by the plugin.
  • Why: to answer searches with typo tolerance and synonyms, which the built-in MySQL engine cannot do.

StoreBolt analytics (api.storebolt.app) is the hosted half of the search dashboard.

  • When: on a schedule (about every six hours) while connected to a plan that includes it.
  • What is sent: your licence key, your site’s URL, its timezone and its store currency, together with your existing daily rollup rows. A row is the search term, the day, and the counters, which include the revenue attributed to that term where conversion measurement is on. These are the same rows the dashboard already shows you locally, and no shopper identity is stored in them to send.
  • Why: so your history survives past the local 90-day retention window and can be read across several of your stores. The licence key identifies the account; the site URL, timezone and currency are what let the dashboard tell your stores apart and report their figures correctly.

Service terms: Terms of Service and Privacy Policy.

Source code and build

Everything that runs on your storefront is shipped as readable source. assets/js/ (the search box, the dropdown blocks, the block-editor script, the theme-search loader and the analytics beacon) is hand-written, commented, and unminified, and so is every PHP file under src/ and templates/. Nothing there is compiled, and nothing is fetched from anywhere at runtime.

One screen is built. The wp-admin settings app is a React application. Its source is the admin-src/ directory of this plugin, and it is compiled to assets/build/index.js, assets/build/index.css and assets/build/index-rtl.css. Both the source and the build configuration ship inside this plugin, so the compiled files can be regenerated and checked against their source without leaving the package:

  1. cd into the plugin directory (wp-content/plugins/storebolt-advanced-search-for-woocommerce).
  2. Run npm install to install the build tools declared in package.json (Node.js 18 or newer).
  3. Run npm run build, which rewrites assets/build/.

The build is @wordpress/scripts 27.9 (the official WordPress webpack and Babel configuration) with Tailwind CSS applied through PostCSS; postcss.config.js is the whole of the CSS configuration. npm start is the same build in watch mode. No build step is needed to install or run the plugin, because the compiled files are shipped.

Third-party libraries included in this plugin

  • Tailwind CSS 4.3.3 (MIT) is a CSS framework. It is not shipped as a library: it is compiled at build time into assets/build/index.css and assets/build/index-rtl.css, which carry its licence header. Source: https://github.com/tailwindlabs/tailwindcss
  • automattic/jetpack-autoloader 6.0.0 (GPL-2.0-or-later) is a PHP class autoloader, shipped as readable PHP in vendor/. It lets several plugins that share a library each load the newest copy of it rather than whichever loaded first. Installed with Composer from composer.json. Source: https://github.com/Automattic/jetpack-autoloader

The admin app uses React, wp.apiFetch, wp.element and wp.i18n from WordPress’s own bundled copies (declared in assets/build/index.asset.php); no copy of React, jQuery, Lodash, Moment or any HTTP library is bundled into this plugin.

  1. Install and activate the plugin. WooCommerce must be active, since the plugin declares it as a required dependency.
  2. Go to StoreBolt in wp-admin. On activation the plugin creates its index table and queues a full index of your catalogue in the background; Settings Search index shows progress.
  3. The search box your theme already renders gets the instant dropdown on its own. Theme search is on by default, on every theme. If your theme ships a live search of its own, shoppers may see two dropdowns on one box: turn one of them off, under the theme’s own options or under Settings Theme search, which names the theme when it recognises one. To place a search box of your own, add the StoreBolt Product Search block (or the [maswcas_search] shortcode, or the widget) wherever you want it.
  4. Optional: connect a StoreBolt subscription from Settings Hosted search for typo tolerance and synonyms.
  1. The instant dropdown: query completions, a matching category, and product rows with the searched words highlighted.

    The instant dropdown: query completions, a matching category, and product rows with the searched words highlighted.

  2. The settings list: every feature the plugin has, with the state it is in.

    The settings list: every feature the plugin has, with the state it is in.

  3. Relevance: per-field weight sliders.

    Relevance: per-field weight sliders.

  4. The dashboard: top searches, searches that found nothing, and the hand-offs into synonyms and trending.

    The dashboard: top searches, searches that found nothing, and the hand-offs into synonyms and trending.

  5. Hosted search: connecting a StoreBolt subscription.

    Hosted search: connecting a StoreBolt subscription.

  6. The dropdown's template part, open in the Site Editor.

    The dropdown's template part, open in the Site Editor.

Does it work without the paid service?

Yes, completely. The hosted subscription adds typo tolerance, synonyms and faceting, which plain MySQL cannot do. Nothing that MySQL can do is held back to sell you an upgrade.

Does it search posts, pages, or PDFs and other uploads?

No. This is product search. The index holds products and variations and nothing else, and the takeover of the search results page applies only to product searches. Searches for posts and pages go to WordPress’s own search exactly as before, so a general-purpose search plugin can run alongside this one without either fighting the other. Nothing inside a PDF, .docx or .xlsx is read or searched, wherever the file is stored.

Which product fields are searched? Can I add a custom field?

Title, short description and description, SKU, and the names of categories, brands, tags and attributes, each with its own weight slider. Price, stock status and visibility are indexed too, but to filter and order results rather than to match what a shopper typed. The field list is fixed, and no filter adds an arbitrary meta key to a document. Two lists are extendable, because stores legitimately keep that data elsewhere: maswcas_brand_taxonomies (the taxonomies treated as brands, WooCommerce’s own product_brand by default) and maswcas_attribute_facet_taxonomies (the attribute taxonomies indexed for search and facets).

Do I need to rebuild the index when products change?

No. Product, variation, stock and taxonomy changes are picked up automatically through background jobs (Action Scheduler, which WooCommerce already provides). The Rebuild index button under Settings Search index is there for the initial build and for after a large import.

Does it slow my store down?

Searches read one dedicated, FULLTEXT-indexed table and never join posts/postmeta, so search cost does not grow with your catalogue the way the default search does. Indexing always happens in background jobs, never inside a product save.

Is my shoppers’ search data personal data?

The analytics table stores a search term, a day, and counters. There is no ID, no IP, no session, and no timestamp finer than the day, so it cannot answer “who searched for this”. Terms that look like an email address, a credit card number (Luhn-checked) or a credential are dropped entirely rather than recorded. Conversion measurement, which is the one part that stores anything in a shopper’s browser, is off by default and additionally requires WooCommerce’s own tracking consent. Settings Privacy Policy Guide carries suggested policy text for the parts you do enable.

Can I customise the dropdown?

Yes. It is a template part (product-search-dropdown) built from blocks, editable in the Site Editor on a block theme, or overridable from a theme file. If you already override templates/search-dropdown.php, your override keeps working.

What happens if the hosted service goes down?

Your local MySQL index stays the canonical copy and stays warm, so search falls back to it automatically. A hosted outage costs typo tolerance, not search.

Does it work on WordPress multisite?

Yes, per site. Each site in a network gets its own index table, its own settings and its own analytics; nothing is shared across the network and there is no network-wide settings screen. Network activation activates the plugin normally, and only skips the one-time setup redirect, which would otherwise hijack the screen reporting what happened to every site. On each site, open Settings Search index and use Rebuild if the index has not built.

Does it support High-Performance Order Storage (HPOS)?

Yes. The plugin declares compatibility and reads orders only through WooCommerce’s own CRUD.

0.1.12

  • Fixed: the search dropdown’s recent searches, trending searches and suggestions could be restyled by the theme into full-width, centred, uppercase buttons. Reported on Woodmart and Electro; any theme with a general button style could cause it. Those rows are no longer buttons, and the two controls that must be (“Clear” and the remove x) now resist theme button styling.
  • Fixed: a theme’s list styling could space out, indent or bullet every row in the dropdown. The panel’s lists and rows now keep their own spacing whatever the theme does with lists.
  • Fixed: on a theme with a dark mode the dropdown was unreadable — a white panel showing the theme’s light text. The panel now sets its own text colour, and follows the theme into dark mode: it matches the search box it drops from, so a dark store gets a dark dropdown. Reported on Electro. Every colour is a CSS custom property, so a merchant can override any of it from their own stylesheet.
  • Fixed: on Woodmart, the search box showed two dropdowns at once — the theme’s own live search and StoreBolt’s. StoreBolt now switches the theme’s live search off for you while “Enhance the theme’s product search” is on, so there is one set of results. Turn that setting off and the theme’s search comes back exactly as it was.

0.1.11

  • First release on WordPress.org: a dedicated product index covering products and variations, an instant dropdown with recent searches, trending searches, query completions and category and brand suggestions, a block, a shortcode and a widget, an editable dropdown template part, the theme-search attach mode, the results-page takeover, product boosts, search analytics with optional conversion measurement, a cache warmer, and the optional StoreBolt hosted engine with typo tolerance, synonyms and faceted refinement chips.
Back to top