Hi guys, how can I achieve this type of buttons?
I’d like to know what is the structure of the liquid and js code states only and I’ll be the one to implement it. Thank you ![]()
Hi, in your browser, click the right mouse click, then “View code” there everything will see
Thanks for responding @Dizisi , I really appreciate it. But I was the one who created those buttons, yet I want the functionality itself.
I am just wondering how the javascript and liquid works on this. When the customer 1 piece it will show the price for it, while if he chooses 200 piece it will show the total price for 200 pieces.
What I’m worried about is that if I do it with my own code, it won’t be sent right at checkout.
You can replace it as variants, so when creating 2 variants like above, it will work fine for its own price.
If you want to use Quantity you can create 2 options, after catching click event you just need to change Quantity of product.
With Quantity, you just need to create a hidden input with name=“quantity” in the add to cart form, it will work fine.
Ex:
Hope it helps!
@LitExtension Thanks ![]()