Sibling product swatches

Product pages

Cornerstone's Sibling products feature lets you set up variants as individual products with their own images and product details. Sibling products appear as variant swatches that link to separate product pages.

Customers will see product details only for the selected variant; when shown in collections, sibling products will appear as individual products.

After setting up sibling products, you can choose display either product images or custom colors for the swatches.

See the Artisan demo to see how it works.

Unlike Variant swatches, Sibling swatches will not appear on collection pages or product listings. All sibling products will appear as individual products. Sibling swatches display on product pages only as links to other sibling products.

Watch video tutorial

Set up sibling products

To set up sibling products you will need to add individual products to a new collection, then add and update two metafields for each sibling product.

1. Add individual products to siblings collection

To create a group of sibling products, you need to add individual products and add them to a new collection. The collection is used to group your sibling products together as variant options.

Shopify | Products and collections are managed in the Shopify admin. To learn more, see Shopify's guide to Adding and Updating Products ↗.

STEPS

In your Shopify admin:

  1. Click Products in the side panel. Click Add product to create the individual products for your siblings collection.

    We recommend using the same product title that includes the different option names (eg. color). For example: "Green Running Shoes", "Blue Running Shoes", etc.

    Tip: Create the first product then duplicate it to keep them consistent and save time from having to re-write and set up the details for each product.

  2. Go to Products > Collections to Create collection. Add your products to the collection to group them together as "siblings".

    You can name your collection anything you like.

    Note: By default, your sibling collection will appear on the Collections List page. To hide the sibling collection from the collection list page, you can choose selected collections to display in the theme editor.

  3. Click Save.

2. Set up metafields for sibling products

Once your sibling products are added to a collection, you need to add two metafields to your products. Sibling products use metafields to (a) display sibling products as swatches and (b) give each product a variant option name.

The steps below are for adding metafields to your product pages. In a later step, you will update the content of these metafields for each sibling product.

Shopify | Metafields are custom fields added to your products in the Shopify admin. The steps below will cover all you need to know, but if you'd like to learn more, see Shopify's guide to metafields ↗.

2a. Define metafield for siblings collection

Create a single Collection metafield that will let you select the collection of sibling products that you want to display as swatches.

Follow the instructions below to create a metafield named "Siblings collection" with the exact Namespace and key: cornerstone.siblings_collection.

Note You only need to create one metafield. Do not add additional words to the metafield name or create multiple metafields for different collections. The metafield must be exactly cornerstone.siblings_collection to work.

STEPS

In your Shopify admin:

  1. Go to Settings > Custom data (or Settings > Custom data). Click the Products tab.

  2. Click the Add definition button in the top-right.

  3. Enter "Siblings collection" in the Name field. Note that "Siblings" is plural.

    The Namespace and key field will automatically update to custom.siblings_collections

  4. In the Namespace and key field, replace the word "custom" with "cornerstone".

    The Namespace should now be cornerstone.siblings_collection. This namespace must match exactly or the siblings swatches will not work.

    Do not add additional words or multiple metafields for different sibling collections.

  5. (Optional.) Enter a Description to help you remember what this metafield is for.

    Example: "Collection with sibling products"

  6. Click + Select content type and select Collection under Reference.

  7. Click Save.

2b. Define metafield for sibling option name

Create a Text metafield to add option names to your sibling products (e.g. "Red" or "Wood"). The option name will appear above the swatch and can be used to set custom swatch colors.

Follow the instructions below to create a metafield named "Sibling option name" with the exact Namespace and key: cornerstone.sibling_option_name.

STEPS

In your Shopify admin:

  1. Go to Settings > Custom data (or Settings > Custom data). Click the Products tab.

  2. Click the Add definition button in the top-right.

  3. Enter "Sibling option name" in the Name field. Note that "Sibling" in the name is singular and not plural.

    The Namespace and key field will automatically update to custom.sibling_option_name

  4. In the Namespace and key field, replace the word "custom" with "cornerstone".

    The Namespace should now read as cornerstone.sibling_option_name. Note that "sibling" is singular, not plural. This namespace must match exactly or the siblings swatches will not work.

  5. (Optional.) Enter a Description to help you remember what this metafield is for.

    Example: "Option name for sibling products"

  6. Click + Select content type and select Single line text.

    This field will be used to label each sibling product with an option name (e.g. "Red" or "Wood").

  7. Click Save.

3. Update metafields for each sibling product

Now that your product pages have the custom metafields needed for sibling products, you can update them in your Shopify admin.

Once those metafields are updated, the sibling product swatches will automatically display on the product pages.

STEPS

In your Shopify admin:

  1. Click Products in the side panel and open the products in your sibling collection.

  2. Click the Siblings collection metafield and select the collection with your sibling products.

    Make sure the metafield name is exactly "Siblings collection", or the swatches will not work. "Siblings" is plural in this metafield name. Go to your Shopify Admin Settings and click Custom data (or Metafields) to update the metafields.

    The products in the selected collection will be displayed as swatches on each sibling product page.

  3. Click the "Sibling option name" and enter text for the swatch label.

    Make sure the metafield name is exactly "Sibling option name", or the swatches will not work. "Sibling" is singular in this metafield name. Go to your Shopify Admin Settings and click Custom data (or Metafields) to update the metafields.

    This is for the name of the product variant (Eg. "Green" or "Wood"). This variant name is also used to display custom swatch colors when product images are not enabled.

  4. Update these metafields for each product. Click Save.

Change swatch style and label

In the theme editor, you can change the Option label and Swatch style in the product template. Click Variant selector under Product overview to find the Sibling product swatches settings.

Note Custom styles are also available for the size and shape of swatches, which apply to all swatches in the theme.

Show product swatch image or custom color

By default, Product sibling swatches display the first product image. Instead of product images, you can choose to display swatch colors.

In the Theme settings, you can override the default colors and assign custom colors to swatches by adding a hex code color (eg. #00b300).

To find the hex code for the color you want, you can use a HTML color picker like this one. When you choose your color, select and copy the six-character hex code, including the hashtag symbol.

STEPS

In your theme editor (Customize):

  1. Go to your Product template and click Variant selector under Product overview

  2. Under Product sibling swatches, uncheck the Show product image option.

  3. Click to open the Theme settings and open the Product tab.

  4. In the Custom swatch colors field add the exact Option name used for your sibling product (ex. "Green") followed by a colon and your hex code color (ex. #00b300).

    The Option name should match the name you entered in the "Sibling option name" metafield for your product.

  5. Click Save.


Related links

Variant options Variant swatches Product pages Collection list page

Last updated