Variation Product Display

You control how different variations of a product appear in the search results and category pages. You can show variations as separate products or as a single product, by creating variation groups or slicing. For example, if you want to show results for every color of a sweater, you can make color a slicing attribute. If you do not, then only one sweater appears in the search results and you must show the color options on the product details page.

In the example below, the unsliced sweater appears as a single product, though you can see alternate images by hovering over the swatches. The sliced images appear as separate products. While color is the most common slicing attribute, you can slice on any variation attribute. However, it's only possible to slice by one variation attribute at a time.

If you slice on an attribute, customers can see an image that is specific to the variation in the search results. For example, if a customer searches on "red shirt", then the red variation is included in the search results, with the appropriate image.

Create variation attributes by selecting site > Products and Catalogs > Variation Attributes > catalog. To make the variation attribute a slicing attribute, click the attribute name, such as Color to see its attributes and click the Slicing Attribute box.

If you want to create searches across categories, such as allowing a customer to search for "red" in both pants and shirts, you must make the slicing attribute searchable, so that the values for the attribute given to the slicing attribute are used site-wide.

A method in the ProductVariationModelclass enables a page template to query the availability status for variants of a master product. The method returns true if any variants have the specified value for the passed attribute, and have the matching value for all other currently selected attributes. Otherwise, the method returns false. This method can be used along with the existing method getFilteredValues() to prevent selection of unavailable combinations on product pages.

Product Sets That Contain Master Products

The search feature drills down to the variant level for product sets that contain master products, as follows: