Related Variants (Link Separate Products)
Sometimes you want to sell different colors of a T-shirt as completely separate products (for SEO or inventory reasons), but you still want customers to be able to switch between them easily. This feature lets you do that.
How it Works
Instead of using Shopify's standard variants, you link separate products together. When a customer clicks "Blue", it takes them to the "Blue T-Shirt" product page.
Step-by-Step Setup
1. Create the Metafield
- Go to Shopify Admin > Settings > Custom data > Products.
- Click Add definition.
- Name: Related Products
- Namespace and key:
custom.related_products - Type: Select Product and choose List of products.
- Save.
2. Link Your Products
- Go to your "Red T-Shirt" product in Shopify Admin.
- Scroll down to the Metafields section.
- Click on Related Products.
- Select the "Blue T-Shirt" and "Green T-Shirt" (and the "Red T-Shirt" itself if you want it to appear in the list).
- Repeat this for the Blue and Green shirts so they all link to each other.
3. Add the Block
- In the Theme Editor, go to the Product Page.
- Add the Related Variants block.
- Result: You will see color swatches that link to the other products.
