| 开发者 | raintech357 |
|---|---|
| 更新时间 | 2026年11月15日 22:37 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/ or Ctrl/Cmd + K), the popup opens with the cursor already in the field, and matching products appear instantly as they type – with images, prices, stock status, categories, colour and size filters, price slider and sorting.
It is built for stores whose customers search by product name, SKU, batch number or LOT number, and for any shop that wants search that actually finds products – even when the visitor misspells a word, uses the plural, or leaves out an accent. Everything runs on your own server with a lightweight custom search index: no monthly fee, no external search service, no data leaving your site.
Support: raintech.pages.dev/contact
What is this plugin?
It is a complete product-search system for WooCommerce made of four parts that work together:
LIKE '%…%' queries over post content. Optional result caching./ and/or Ctrl/Cmd + Kbatch_number or lot_number). Type a code – or part of it – and the right product appears at the top.
Use your existing search field (no shortcode needed)
Enter the class or ID of any search input already on your site (for example .search-field or #site-search) under WooCommerce → Product Search → Integrations. Clicking and/or focusing that field opens the popup. Turn on Seamless integration to take over common theme search forms automatically.
Control what appears
/wp-json/rtps/v1/: search, suggestions, logmanage_woocommerce): settings, products, terms, index/*, cache/clear, analyticssrc/ (React + SCSS); compiled files are committed in build/[raintech_search_bar]
[raintech_search_bar placeholder="Find a product"]
raintech-product-search-bar-for-woocommerce folder to /wp-content/plugins/, or install the zip via Plugins → Add New → Upload Plugin.[raintech_search_bar] in a page, header template or widget area – or add the "Product Search Bar" block / Elementor widget – or enter your existing search field's class/ID under Integrations, or switch on Seamless integration.Use the shortcode [raintech_search_bar] in a page, header template or widget area, add the "Product Search Bar" block in the block editor, drag the Elementor widget, or use the classic widget. You can also make your theme's existing search field open the popup – see below.
Yes. Under WooCommerce → Product Search → Integrations, enter the CSS class or ID of your existing field (for example .search-field or #site-search; separate several with commas). Choose whether clicking, focusing or both should open the popup. Turn on "Seamless integration" to replace common theme search forms automatically.
SKUs are searched by default, including variation SKUs, which show the matching variation (or its parent product). You can raise or lower SKU importance under Search engine → Search in.
Go to Index and add the custom field key that stores the number (for example batch_number or lot_number) to "Custom fields (meta keys)". Re-index once and those values become searchable.
Build the search index once under WooCommerce → Product Search → Index. Until then a basic fallback search is used. If you change an index-related setting, a notice asks you to re-index.
Yes. Adding, editing, trashing, restoring or deleting a product updates the index automatically. After large imports or changes to index settings, use "Re-index all products".
Yes. If a search finds nothing, the plugin tries close spellings from your own catalogue and shows "Showing results for…". You can turn this off under Search engine.
Yes, single-word synonyms (for example sofa, couch). Add one group per line under Search engine → Synonyms. Phrase synonyms are not supported.
AND shows only products that match every word the visitor typed. OR shows products matching any word, ranked by how many words they match.
Yes. Variations are indexed by SKU and attributes. Turn "Show variations as separate results" on or off under Results.
Yes. Global product attributes (Products → Attributes) appear in the popup sidebar. For each attribute you choose how it is displayed – checkbox list (default), radio buttons (one value at a time), buttons, colour swatches or image swatches – under Sidebar filters → Attribute filters. Values within one attribute combine with OR, different attributes with AND, and counts update as filters change.
Under Sidebar filters → Attribute filters, set the attribute to "Colour swatches" or "Image swatches" and click "Set colours" or "Set images". For colours you can pick a custom colour per value (otherwise the value's name, such as "Red", is used). For images you choose a picture per value from the media library.
Yes. Use the switch next to each attribute in the mapping table. Only attributes that actually appear in the current results are shown to visitors.
Yes. "In stock only" and "On sale" quick filters appear in the sidebar when they would change the results. Each can be turned off under Sidebar filters.
Yes. Use the Filters tab to include or exclude categories and tags, limit by stock or sale status, respect catalog visibility, or hide individual products by name or SKU.
Yes. The Appearance tab lets you choose light, dark or automatic theme, popup width, corner roundness and backdrop darkness. The accent colour is on the Search bar tab.
Yes. Turn it on under Appearance: /, Ctrl/Cmd + K, or both. The / key is ignored while the visitor is typing in a field.
A short list of the visitor's own last searches shown before they type. It is stored only in their browser (localStorage), never on your server, and they can clear it with one click.
Pages that contain the shortcode, widget or block. If you set an existing-field selector, turn on Seamless integration or enable a keyboard shortcut, the script loads on every page so the popup is always available.
Yes. There is a "Product Search Bar" widget in the Elementor panel. You can also use the shortcode in an Elementor shortcode widget.
Yes. Add the "Product Search Bar" block, or place the shortcode in a Shortcode block, a template part or the Site Editor.
Yes. Results are filtered to the visitor's current language, and the index stores each product's language.
Yes. Search uses public REST endpoints that do not require a nonce, so cached pages keep working. You can also enable the plugin's own result cache for repeated searches.
Yes. Turn on Google Analytics events under Integrations. The plugin sends a search event with the search term using gtag, the GTM dataLayer or analytics.js, whichever your site already has.
Only the search term, how many times it was searched, whether the last search found products, and the date. No IP addresses, user IDs or cookies. You can delete any term, clear everything, set a retention period or switch logging off.
Look at "Searches that found nothing": each one is a product, synonym or spelling you are missing. Add a synonym, add the product, or add the term to Popular searches. Then check "Top searches" to see what customers want most and feature it.
No personal data is stored. Recent searches are kept only in the visitor's own browser and are never sent to your server.
Search runs on an indexed table and averages a few milliseconds per query on a typical catalogue. The popup script is small and loads only where needed.
The default search scans post content with slow queries, ignores SKUs of variations and custom fields, has no typo tolerance, no filters, and no live results. This plugin uses a dedicated index with relevance ranking, finds SKUs and batch/LOT numbers, fixes typos, and adds a live popup with filters.
No. Everything runs on your own WordPress and database. There are no external requests and no monthly fees.
Yes. Use Tools → Export settings and Import settings. The search index and analytics are not included in the export.
Deleting the plugin removes its settings and database tables (the search index and the analytics log).
Contact support at https://raintech.pages.dev/contact.
rtps/v1) replaces admin-ajax.