Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Hey, I am making a theme for shopify, and i wanna add a radio button to change the quantity of the item when i wanna buy, i tried doing this, but it didn't work, when i click add to cart, the number always adds 1 only.
Solved! Go to the solution
This is an accepted solution.
Hi MohammadAL,
I believe the issue could be due to the value
attribute for each of your radio buttons. You have the value
attribute of all your radio buttons set to "1". This means no matter which option you select, you're only adding 1 item to the cart. You'll need to change this to correspond to the value that each option requires.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hi MohammadAL,
I believe the issue could be due to the value
attribute for each of your radio buttons. You have the value
attribute of all your radio buttons set to "1". This means no matter which option you select, you're only adding 1 item to the cart. You'll need to change this to correspond to the value that each option requires.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog