Skip to content

Variant Redirect

If you do not want to add Phantom Variants you might be interested in the "Other Colors" and "Color" Metafields for products.

Most products have different variants. Those could be different sizes, colors and so on.

Shopify allows you to define Options and Variants for a product.

This is enough most of the time however using a variant is always a second class citizen in comparison with a whole different product. For example variants usually can only define one image to customize, directly linking to them is tricky and only one of them shows up in the product recommendations.

So sometimes you want two products which only differ in one option (like color). This theme supports a way to redirect users to the correct product when selecting the option.

Example:

Example showing two products, one in color black and one in red

Metafield

For this we defined a metafield for variants. If you set a product in the "Redirect to" metafield of a variant, a user will be redirected to the product when they select this variant.

Instructions

Here is how to do it:

  1. Create two products in this example one for the color black and one for the color red.
  2. Go to one of the products and create a new Option (in this example we create the Option "Color" with the variants "Red" and "Black"). Make sure that the variant you want this product to represent comes first (in the red product "Red" is the first variant, "Black" is the second one).
  3. Save you changes.
  4. For all variants that are not representing the current product do the following:
    (In this example we are on the red product, so we will edit all "Black" Variants) Screenshot where all black variants are selected
    Note: You have to do this hy hand for every variant, I could not figure out how to do this in the bulk editor.
  5. Click on Edit.
  6. Scroll down to the Metafields section
  7. Set a product for the "Redirect to" metafield Screenshot of the metafield section
  8. Save and repeat until you are done.
  9. Do the same to the other product but vice-versa.