All things Shopify and commerce
One of my products requires complex variant checks. For example, when option1 value3 is chosen, it cannot allow option 2 value4 or option3 value5, etc, and there are many of these rules I need to implement. Since this is client side, I would imagine I need to do it with javascript rather than liquid.
My issue is, I need to run my check when the user "adds to cart" or "buys it now". My questions are:
1. How would I trigger a javascript call back from those actions (add to cart or buy it now)?
2a. I would not want to disallow the order, just "flag" it (any way is fine, e.g. a note in the order)... is there a way for me to on top of the variant, add a text to this order?
2b. Alternative to product variant, I can just create my own options on the page itself using javascript, but again, is there a way for me to propagate the selection to the order object? (e.g. add information to the POST body of "add" and somehow handle it?)
Thanks, any suggestions/pointers will be appreciated
User | RANK |
---|---|
67 | |
46 | |
34 | |
32 | |
27 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022