Add Product to cart when a Product option is selected

Add Product to cart when a Product option is selected

dustyballco
Visitor
2 0 1

I have set up a selection of custom product options through a custom liquid section, such as customizable text and a logo upload. I want to be able to  add a product to the cart along with the main product if either of those two options are selected when pressing the add to cart button.

Replies 2 (2)

MayaZach1
Visitor
2 0 1

Hey, I totally get the frustration you’re dealing with! My cousin actually ran into the same issue a little while ago. He wanted to add related products to the cart based on custom options like text input or logo uploads, and it wasn’t working smoothly.

What ended up working for him was getting a little custom solution in place that used JavaScript to automatically add the related product when those custom options were selected. It wasn’t a huge fix, but it made a big difference in streamlining the process.

If you're interested, I can share the details of how it worked for him. It might be something you can try, or if you’d rather not dive into the code, I can point you in the right direction for someone who helped him get it sorted.

dustyballco
Visitor
2 0 1

Yes I would love to see what JavaScript you came up with to make this work!