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 variation products of a base product. The method returns true if any variation products 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 Base Products

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

  • A product set is found in a keyword search if the search text is contained in the product set, the base product or any of the variation products.
  • A product set is contained in a refined search result if the refinement attribute is defined for any of the variation products.
  • A product set is sorted based on the attributes defined at the variation products, unless the product set or the base product defines own values for these attributes (such as for aggregated active data metrics).

Variation Product Name Contains Search

For storefront display purposes, a variation product that does not have an explicit name inherits its display name from the associated variation base product. Because the variation product name is inherited, a name contains search only returns the variation base product. For example, product id 008884304030, Platinum Blue Stripes Easy Care Fitted Shirt in size 6, is a variation product that inherits its name from variation base product id 25050736, Platinum Blue Stripes Easy Care Fitted Shirt. A storefront name contains search for "Platinum Blue Stripes Easy Care Fitted Shirt" returns product id 25050736, the base product, not the variation product. On the storefront, the search result shows the variation base product with the variation options.