Hi everyone,
I am working on the Alchemy theme and I want to add a checkbox to the cart page.
My goal is:
- The checkout button is disabled by default.
- If the user checks the checkbox, the checkout button is enabled, allowing the user to proceed.
The issue I’m facing is: After adding the checkbox and checking it, the button gets enabled correctly. However, the cart page refreshes automatically, causing the checkbox to become unchecked again and the button to be disabled. This behavior occurs even if I remove my JavaScript code. Why does the page refresh automatically?
Here is the code I added to theme.liquid:
CONSENT TO THE DISCLOSURE OF MY DATA