Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
We need to add a checkbox on create an account form so that user can subscribe to news by default just as we have an option to add it on checkout form. Thank you
Solved! Go to the solution
This is an accepted solution.
Hi,
Please add the code below to the location you want show the checkbox.
<label for="marketing">
<input type="checkbox" name="customer[accepts_marketing]" value="true" id="marketing" /> I agree to receive promotions and coupons.
</label>
Change the label text per your needs.
Hope it helps.
Thanks.
This is an accepted solution.
Hi,
Please add the code below to the location you want show the checkbox.
<label for="marketing">
<input type="checkbox" name="customer[accepts_marketing]" value="true" id="marketing" /> I agree to receive promotions and coupons.
</label>
Change the label text per your needs.
Hope it helps.
Thanks.
Where can you find where to add this code? I want to make it appear when our customers create an account and not do it at checkout only.
Hi,
To make the marketing consent box show when your customers create an account, please go to Template > Customers/register.liquid file (if you are using Dawn theme). If you use a different theme and register.liquid file is not there, the register (create an account) code could be in account.liquid. However, the register.liquid file will be available for most themes.
Before the <button> for submit button, please add the above code.
Hope it helps.
I cannot switch and see the liquid file. It only will allow me to see .json file. Can I do it from that file format?
I have the same issue, only .json file with customer and register
This is fantastic advice. I have been trying to do this for over 6 hours today! As I have no coding experience, I had no idea where to start until I saw this post. You have saved my life! Thank you. 🙂
Thank you
Thanks for sharing!
Could you please help me with how can I add more margin on the left size?
Thank you in advance
If you add the code before the submit button, it will fit your need. Note: It should be placed before the submit button to work the marketing acceptance.
Hope it helps.