List product variants narrowed down to specific option

Highlighted
New Member
2 0 0

Hi!

 

Need you help Shopify experts!

 

My product structure contains two options: size & colour.

On my product page, I want User to select colour first and after that I'll show a table with variants information (stock availability, price and quantity User want to purchase).

 

I've managed to display colors available for given product and after selecting I'm populating variant.id to url = ?variant={{var.id}}. Not sure, how I can use this parameter to show all sizes and information for variant (size+colour).

 

Example:

Product name: Product A

color: white, silver;

size: S, M, L

 

User selects one of the colour (white or silver) and the table will display for the selected colour:

 

SizesSML
Available Stock1010
Price100075
Quantityinputinputinput
BUTTON TO ADD TO CART
0 Likes