How to Add Variant Selector in Shopify on Collection Pages?

How to Add Variant Selector in Shopify on Collection Pages?

A step by step guide to add variant selectors in Shopify on collection pages.

A variant selector is a tool that allows you to create multiple versions of the same product with different attributes. You can use this feature on collections, sales, and cart pages.

In this article, we will discuss how you can add variant selector on your collection page using Shopify builder tool. We are going to use the "Noise canceling headphones" example for this purpose.

To add a variant selector to your collection pages in Shopify, you must edit your collection template.

Here are the steps you can follow:

  1. From your Shopify admin, go to "Online Store" and then click on "Themes".
  2. Find the theme that you want to edit and click on the "Actions" button. From the dropdown menu, select "Edit code".
  3. In the "Templates" directory, click on the file called "collection.liquid". This is the template that controls the layout and content of your collection pages.
  4. Find the place in the template where you want to add the variant selector. This is typically done near the top of the page, above the product listings.
  5. Add the following code to your template to display the variant selector:

    Copy code

    {% for variant in product.variants %} <label for="variant-{{ }}"> {{ variant.title }} </label> <input type="radio" id="variant-{{ }}" name="variant" value="{{ }}" {% if variant == product.selected_or_first_available_variant %} checked="checked"{% endif %}> {% endfor %}

    This code will loop through all the variants of the product and create a radio button for each variant. The selected variant will be the one that is checked by default.

  6. Save your changes and publish your theme to make the variant selector visible on your collection pages.

Benefits of Using Product Variant on Your Shopify Website

Increased product discoverability: By offering different variations of a product (such as different sizes or colors), customers can more easily find the specific product they are looking for, which can lead to increased sales.

Improved organization: Product variants can help you keep your product catalog organized and easy to browse, as customers can filter their search results by variant.

Simplified inventory management: If you are using a system that allows you to track inventory at the variant level, you can more easily manage your stock and avoid selling items that are out of stock.

Increased upselling opportunities: By offering related product variants, you can present customers with additional options that they may be interested in purchasing, potentially leading to increased sales.

Enhanced customer experience: Offering product variants can improve the overall shopping experience for customers by giving them more options to choose from and making it easier for them to find the products they are looking for.


After reading the complete article, you can add variant selectors in Shopify on the collections page. If you need help from Shopify designers and developers to update, change and add features and functionalities to your Shopify store contact us today.

You can show the variant selector based on product material, sizes, and colors. Below are the different variant selector options you can add to your Shopify store with the help of our Shopify web designers and developers.