I’m trying to connect a dropdown (for product variants like size) to an “Add to Bag” button in a dynamic page. The dropdown is populated from my Variants dataset, and I want the selected variant to be added to the cart when the button is clicked.

Issue:
No matter what option I select in the dropdown, the same (default) product gets added to the cart. The variant doesn’t change. I’ve tried both dataset bindings and code. Still, it doesn’t work.

I hope somebody can help me out with this