With normal WooCommerce search, if someone searches for a ‘blue dress’ it *may* (or more likely may not!) match the blue dress but it will probably show the parent product image and not show the blue image.
With Super Speedy Search we have introduced something we like to call Smart Variation Search.
What is Smart Variation Search?
If a user includes search terms in their query which match only one child of a parent product, we show the first image available for that variation instead of showing the parent product.
That means if you have hats in many colours, and someone searches for a ‘red baseball cap’ they will see the red variations in their search results.
On top of this, when they hover over the product and when they ultimately click the product, it will take them to the product page with the red variation already selected.
Example of Smart Variation Search using Colours
Smart variation search works for ALL variations if you have images for those underlying variations. With the example below, you’ll see it working for colour searches.
The example shop below is configured with 6 variable products, each with red and yellow options.
Red Variation Search
You can see below that when the user of this store searches for ‘red’ they only see red items. This makes your store far more useful and far more beautiful.
Yellow Variation Search
Similarly, when the user of this store searches for ‘yellow’ (or anything else which matches uniquely yellow items, e.g. yellow SKUs), then only the yellow item images are shown.
How to enable and use Smart Variation Search
You do not need to do anything to enable Super Speedy Search Smart Variation Search – it is on by default.
The only time is does not apply is if you have the Super Speedy Filters option enabled to SHOW_SINGLE_VARIATIONS for these types of variations. e.g. if you have show single variations enabled for colour, then the original shop picture above would have shown 12 items instead of 6 and then the Smart Variation Search is just behaving like a normal search filter.
It is possible to switch off various aspects of our Smart Variation Search. These are advanced options so you have to edit your wp-config.php file to alter them.
To disable searching variations entirely add the following to your wp-config.php:
Smart Variation Search includes variation-rollup. That means if your search matches 2 or more variations against a parent product then the parent product will be shown. You can alter this behaviour so that the individual variations are always shown by adding the following to wp-config.php.
define( 'SSS_ROLLUP_VARIATIONS', false);