Forum

Thread tagged as: Question, Shop

Filter variants by option

I have 3 "Options" for products; Size (sm, md, lg, xl), Color (black, White) and Style (Short Sleeve, Long Sleeve, Sleeveless).

I would like to have 3 different select boxes; one that lists Sizes, one that lists, Colors and the last to select Style.

My current code shows all the variants in one select box

<perch:input id="product"  type="hidden" env-autofill="false" value="<perch:shop id="productID" type="hidden" env-autofill="false" />" />

How can I filter the variants and separate out my variants by each option into 3 seperate select boxes?

Justin Jojola

Justin Jojola 0 points

  • 3 years ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Justin,

Try this example: Add to Cart with Options