Variant option facets
A variant option is not a taxonomy. It is part of the product in SureCart: the Colour and Size a shopper chooses before adding to the cart. Filters can offer those as facets, which is usually what a shopper means by “show me the blue ones”.
Taxonomy or variant option - which do you have?
If you tag products with terms in WordPress, that is a taxonomy facet. If the choice appears on the product page as a variant selector, it is a variant option. Many stores have both, and a colour can legitimately be either.
How they appear in a URL
?ks_vopt_color=Navy,Sand| Difference | Taxonomy facet | Variant option facet |
|---|---|---|
| Parameter | ks_{taxonomy} | ks_vopt_{option} |
| Values are | Term slugs - lowercase, hyphenated | The exact display text, as SureCart stores it |
| Source | WordPress taxonomy terms | SureCart variant option values |
Values are display text, so they are case and space sensitive
Navy Blue is not navy-blue. A hand-written link has to use the value exactly as SureCart holds it, which is why deep links to variant facets are easier to copy from the storefront than to type.A plus sign has to be encoded
A literal
+ in a URL decodes to a space, so a value like 3+2 seater would arrive as 3 2 seater and match nothing at all. The filter writes it as %2B; a link you write by hand has to as well.Where the options come from
The values offered are enumerated from your products rather than configured. Add a product in a new colour and that colour becomes filterable; retire every product in a colour and it stops being offered.
The list is cached for five minutes
A newly published variant can take that long to appear in the facet. It is the same timer as facet counts and price bounds, and it is filterable in PHP if five minutes is wrong for your store.
What it needs
- Products with variant options in SureCart. A catalogue of single-variant products has nothing to enumerate, and the facet renders empty.
- Consistent values. “Navy”, “navy” and “Navy Blue” are three separate options as far as the facet is concerned, because they are three separate values in SureCart.
Inconsistent values are the usual disappointment here
The facet is only as tidy as the catalogue. A store where the same colour was typed three ways gets three entries, and no setting can merge them - the fix is in SureCart, on the products.
Was this page helpful?
Thanks for your feedback.
There was a problem submitting your feedback. Please try again later.