Check product options in code

I have a product page with 2 option selections. Is there a way to check that the options correspond with one another?

For example, If the Selection is “5 letters” i either want to disable the “Select crayon type (all mixed)” or check the value to ensure none is selected & check the character count of the input “Enter the text you would like” before adding to cart.

I can’t seem to find any examples or guides on if this is possible?

1 Like

Hey Scott,

You should be able to set up something like this using the wix-stores API. Specifically the getProductVariants() function.

Hope this helps!

Dara | Corvid Team

Thanks,

I can only seem to get the options themselves, not the value of the options when a user selects it. Is there anything that can get the value?