boxcart.dev

Search

How the search box on your shop page finds products, how to help it find the ones customers mean, and how Search Insights shows you what people searched for and which searches found nothing.

How customers search

Since 1.8.0, the search box above your products looks in four places:

  1. the product's name;
  2. the words you add under Also found by;
  3. the product's description;
  4. the names of the product's categories.

Results come in that order, best matches first. A product only shows when every word of the search is in it somewhere, so "red onions" finds Red Onions but not every red thing in the shop. Plurals find singulars and the other way round: "potatoes" and "potato" find the same products, and "berries" finds Blueberries.

Search works the same in the card view, the table view (BoxCart Pro) and on phones. It's part of the free plugin. You can turn the search box off under BoxCart → Settings → Styling → Product Display (see Product Display).

Also found by

Customers don't always use your names for things. Someone looking for your sourdough might type "bread" or "loaf". Under the description on the product screen, the Also found by box takes words or phrases customers might search for, one per line (commas work too). They count as much as the product's name, and customers never see them.

Product Details on the product screen: the Also found by box under the description, with bread and loaf on separate lines

A product can hold up to 500 characters of words. With BoxCart Pro you can also fill them in from a spreadsheet: the product CSV has a Search Words column (see Import / Export).

Tip

You don't have to guess which words to add. Turn on Search Insights and add the ones customers actually use, straight from the list of searches that found nothing.

Typos and near misses

When a search finds nothing, BoxCart looks for the closest word your shop uses, in product names, Also found by words and category names.

The shop page after searching breed: Showing results for bread, a Search for breed instead link, and the Sourdough Loaf and Seeded Loaf

Category matches and similar names

A search can match a category name rather than a product. Say you have a category called "Bread & Dairy" and a customer searches "bread":

Whole words come first. A word found only inside a longer name ("butter" in Butternut Squash) is listed last, under Similar names, and Search Insights counts that search as finding nothing, so it shows up for you to fix.

Search Insights

Search Insights shows you what customers type into the search box, and which searches find nothing. It's free, and it's off until you turn it on.

  1. Turn it on

    Go to BoxCart → Settings → General → Products and tick Search Insights. Until you do, the BoxCart Searches dashboard widget and the Searches screen show a Turn on Search Insights button instead.

  2. Let customers search

    A search counts once the customer has finished typing: about two seconds after the results show, or when they press Enter, click away or leave the page. Half-typed words never count, and each search counts once per page view.

  3. See what they searched for

    Open BoxCart → Searches, or look at the BoxCart Searches widget on your WordPress dashboard.

Searches by you and your shop staff while signed in don't count, so trying the search yourself won't skew the figures. Neither do searches from bots and crawlers.

The Searches screen

BoxCart → Searches shows the last 4 Weeks, 12 Weeks or 26 Weeks. Administrators and shop staff can open it.

BoxCart Searches screen: figures for searches, found nothing, led to a basket add and different searches, a week-by-week chart, and the Most searched and Found nothing lists

Searches are grouped as typed, lower case, with plurals folded together, so "Potatoes" and "potato" count as one search.

Add as a search word

When a search found nothing but you do sell it, add the search to the right products in a couple of clicks:

  1. Choose Add as a search word

    Next to the search, on the Searches screen or in the dashboard widget. A product picker opens under it.

  2. Tick the products

    Start typing a product name and tick the products the search should find. Tick all ticks every product the list shows (up to 50), and you can untick any you don't want. Ticks stay while you search again, so for "pickling onions" you could tick every onion, untick the onion marmalade, then search "shallot" and tick those too.

  3. Add

    The button says how many products you've ticked, for example Add to 5 products. The search goes into each product's Also found by words, and the message lists the products. A product that has no room for more words is skipped and named.

Add as a search word open under pink onions: onion typed in the picker, five onion products ticked, Red Onion Marmalade unticked, and an Add to 5 products button

From then on the search finds those products, and it leaves the widget's Found nothing list (it comes back only if a later search for it finds nothing again).

Searches that found nothing also have Remove, for typing mistakes you don't want in your lists. BoxCart asks first, then the search comes off your lists and figures for good. Only the days it found nothing are removed: if the same search found something on other days, those stay, so a real search can't be wiped by mistake.

The BoxCart Searches dashboard widget

The BoxCart Searches widget on your WordPress dashboard shows the last 30 days at a glance: how many searches there were and how many found nothing, then one list with a Most searched | Found nothing switch. Searches that found nothing have Add as a search word and Remove, as on the Searches screen. Open Searches takes you to the full screen.

BoxCart Searches dashboard widget showing 30 days of searches, a now-in-stock note for honey, and the Found nothing list with Add as a search word and Remove

Shop staff see the widget once Search Insights is on. Only administrators can turn it on.

More on the Searches screen Pro

With an active BoxCart Pro licence, the Searches screen adds:

Searches also feature in the Pro Shop Report email. If you bookmarked Reports → Searches while trying a 1.8.0 test version, that link now opens BoxCart → Searches.

Privacy: what's kept

Search Insights keeps only the search words (lower case), the day, how many times they were searched and how many products they found, plus basket adds on Pro. Nothing links a search to a person, and it sets no cookies. Searches are deleted after 180 days.

These are never kept:

To stop one visitor flooding the lists, each visitor can add up to 30 searches in ten minutes. For that count BoxCart keeps a scrambled (hashed) form of the visitor's IP address for ten minutes, separately from the searches.

For developers

Searches are stored in the {prefix}boxcart_search_log table (see Database Schema). The hooks and AJAX actions are listed under Hooks & Filters and AJAX Endpoints.