Reveal and hide variants using query parameters

This article shows you how to reveal and hide variants using query parameters

You may wish to only show certain variants or variant options to some of you customers.

If you'd like to show a variant group (that has many variant options) to some customers, follow the steps below.

Hide variant group

To reveal variant groups using query parameters, you must first hide the variant group visually from your checkout page.

  • Open the variant group Settings and select "hide variant"
  • You can still pre-select the hidden variant
  • You can then display and pre-select hidden variant groups by adding query parameters at the end of the checkout pages' URL
  • You will need to copy the reference of the variant group and paste it in the query parameter
  • The structure of the query parameter that shows hidden variant groups is:
    ?show_variants=reference
  • For example, for the "Discounted Packages" variant that has a reference of "discounted-packages", the query parameter is:
    ?show_variants=discounted-packages

Variant group reference

The reference value of your variant group:

  • Is automatically created when saving your variant group
  • Used a reference value in integration or when using query parameters
  • Can be changed at any time