Shopify themes, liquid, logos, and UX
Hi,
Recently, we display the checkbox in checkout to get customers permission to receive SMS offers.
Is there away to make this checkbox checked by default?
document.queryselector("input#abc[type=checkbox]").setAttribute("checked", true)
Replace abc with the id of the field element. Or do you need even more help to make the change.
Thanks 🙂
And where should I add this code?
Will this be applied on checkout?
Did you figure out where to put the code?
Unfortunatly, not yet.
And I hope that this can be done from settings (just as email subscription box)
You need to have access to shopify plus to do this, presumably you dont have that. Come August nothing like this will be possible on the new checkout, all this functionality is removed to prevent people doing things like this, which protects shopify.
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025