Swift Commerce
Menu
Features

Your next store tool is here.

Explore 16 store features. Unlock their full capabilities with Pro.

Sell & personalize

Product Bundles

Sell complementary products together.

Product Addons

Offer extra choices and personalisation.

Subscriptions

Offer products on a recurring schedule.

Product Quantity Limits

Set minimum and maximum quantities.

Shopping experience

Ajax Search

Show products as shoppers type.

Wishlist

Give saved products a place to wait.

Currency Switcher

Display prices in a familiar currency.

Add to Cart Popup

Confirm additions and the next step.

Customer relationships

Cart Recovery

Follow up on unfinished purchases.

Back In Stock

Notify interested shoppers when stock returns.

Shipment Tracking

Share tracking details for orders.

Email Customizer

Customize supported customer emails.

Security & checkout

Registration & Access

Build forms, verify emails and review accounts.

reCAPTCHA

Add checks to supported forms.

Cookie Consent

Offer preferences and managed integration gating.

Checkout Field Editor

Adapt supported checkout fields.

View all features · See Pro plans

Solutions

Built around the way you work.

Store owners

Tools for the everyday work of running a store.

Freelancers

Build and hand over a more consistent setup.

Agencies

Bring a familiar toolkit to client projects.

Integrations

Explore supported connections and compatibility.

Resources

A little help goes a long way.

Documentation

Setup guides and feature reference.

Blog & updates

Product news and store ideas.

Contact us

Talk to the Swift Commerce team.

About Swift Commerce

The people and thinking behind the suite.

Affiliate program

Earn commission by referring new customers.

Request a feature

Tell us what your store needs next.

Report a bug

Help us investigate a problem.

← Back to articles

How to Add Live Product Search to WooCommerce

Add live product search to WooCommerce with Swift Commerce. Place the search form, choose search behavior and test results on desktop and mobile.

Live product search illustration with a running-shoes query and matching shoe suggestions.

Live product search shows matching products while a customer types. Instead of submitting a search, waiting for a new page and starting again, they can open a result directly from the search box.

This guide uses Swift Commerce Ajax Search. We will enable it, add a working search box to a page and test it against real catalog items. Basic live product search is available in Free. Pro adds controls such as additional search fields, synonyms, typo tolerance and relevance weights.

What you need

  • An active WooCommerce store with Swift Commerce installed and activated.
  • Several published products with descriptive names. Add images and correct prices so the results are useful.
  • Access to edit a WordPress page or the template where you want the search form.
  • A staging site if you are replacing an existing search integration.

Use a straightforward catalog example for testing. If you sell running shoes, have at least one published product with “running shoes” in its name. Start with a known match before testing broader terms or spelling mistakes.

1. Enable Ajax Search

  1. Open Swift Commerce → Products → Ajax Search.
  2. Turn on the feature in the header.
  3. Click Save Changes.
Swift Commerce Ajax Search dashboard with the feature enabled and search behavior controls visible.

Enabling the feature and displaying its search form are separate steps. A search box built by a theme or page builder is not necessarily the Swift Commerce form.

2. Set the search behavior

Open the General tab. In Search Behavior, choose a starting configuration such as:

  • Minimum Characters: 2. Search begins after the second character.
  • Maximum Results: 6. This limits the dropdown, not the number of products in your catalog.
  • Search Delay: 300ms. This waits briefly after typing instead of sending a request on every keystroke.
Ajax Search General settings for minimum characters, maximum results, search delay and caching.

These values are suggestions, not requirements. Try them with your catalog and hosting. A one-character search can produce broad matches and extra requests; a very long delay can make the search feel unresponsive.

Under Performance & Caching, review Enable Search Cache and Cache Duration. Repeated searches can use cached results. If you are investigating a product that was just edited, account for both this cache and any page/CDN cache instead of assuming the product was never found.

Click Save Changes after choosing the behavior.

3. Add the search box to a page

The most direct way to confirm the feature is working is to place its shortcode yourself.

  1. In Ajax Search, open Appearance and find the Shortcode card.
  2. Copy the shortcode shown below.
  3. Open the WordPress page where you want the search box.
  4. Add a Shortcode block and paste it.
  5. Save or update the page, then open its front-end URL.
Swift Commerce Ajax Search shortcode with a Copy button for adding the search form to a page.
[swift_commerce_search]

Use a Shortcode block rather than a Code block. A Code block displays the characters as text; it does not render the search form. In a block theme, the same approach can be used in an editable template part that supports a Shortcode block, such as a header. Check the front end after saving the template.

Swift Commerce can also replace supported WooCommerce product search forms in shop contexts. It does not automatically replace every WordPress, theme or page-builder search field. If your existing header still shows its old search, use the shortcode in a supported placement rather than adding a second search plugin.

4. Review the results and appearance

  1. Return to Ajax Search → Appearance.
  2. Choose a design preset and review the search input and results preview.
  3. Check that the input fits the available width and its text is readable.
  4. Save the settings and inspect the real page again.
Ajax Search Appearance tab with design presets and controls beside a live product-search results preview.

The preview uses sample content. Your storefront uses your own product names, prices and images. Advanced Product Information controls in Pro let you choose more of the details shown in results. Do not make the dropdown so busy that customers cannot identify the product.

In the Search tab, review the stock settings. Decide whether out-of-stock products should appear. A missing product may be excluded by stock or catalog visibility, even if its name matches the query.

5. Expand matching with Pro, if needed

Once basic name searches work, use the Search tab’s Pro controls for the catalog problems you actually have:

  • Search Fields: include relevant fields such as SKU, descriptions, categories, tags or attributes.
  • Enable Synonyms: add a group such as “sneakers” and “trainers” if customers use both terms.
  • Typo Tolerance: test common small spelling mistakes rather than expecting unrelated words to match.
  • Field Weights: give an important field more influence when ordering results.
Ajax Search settings for search suggestions, excluded categories and advanced search options.

Add changes one at a time and search again. Enabling every field can make results broader without making them more useful. Only test SKU matching after enabling the SKU search field in Pro; a title-only search is not an SKU search.

6. Test the search as a customer

  1. Open the page in a private browser window.
  2. Type the beginning of a published product name and pause.
  3. Confirm the dropdown opens after the configured minimum characters.
  4. Open a result and check that it leads to the right product.
  5. Search for a term that should have no matches and check the empty result state.
  6. Repeat on a phone-sized screen and check that results remain usable without horizontal scrolling.
  7. If you enabled Pro matching controls, test an SKU, synonym and small typo separately.

If no results appear at all, first confirm you are using the Swift Commerce shortcode, the feature is saved as enabled and the page is not showing an old cached copy. Check the browser for blocked requests and test a published, visible, in-stock product before changing relevance rules.

Frequently asked questions

Does this search blog posts too?

This walkthrough adds product search for the WooCommerce catalog. It is not a replacement for every type of site-wide content search.

Do I need another Ajax search plugin?

No additional search plugin is required for this setup. On staging, avoid having two plugins modify the same search form so you can tell which one is producing the results.

Can I put it in my header?

Yes, when the header editing method supports the shortcode or an appropriate integration. Placement depends on your theme or builder. Test the actual saved header on desktop and mobile.

For the full settings reference, see the Ajax Search documentation.

Check the Swift Commerce listing on WordPress.org for Free installation requirements and downloads.