Go to the theme template editing section: in the left menu, select Sales Channels → Online Store; on the
Themespage, click the button with three dots and select theEdit Codeitem.In the left list, under the Sections group, find the
main-register.liquidfile and click on it to edit.In the editor field, find the HTML code with the button tag and add an additional field before it.
<!-- accepts_marketing -->
<p style="text-align: left">
<input style="width: 20px;min-width: 20px;display: inline;" type="checkbox" name="customer[accepts_marketing]" checked="checked" value="true" id="acceptsMarketing" />
<span style="display: inline;">Keep me up to date on news and exclusive offers</span>
</p>
<!-- /accepts_marketing -->Click
Savebutton.
See the example here:
The structure of templates may vary from theme to theme - it depends on the theme developer. Therefore, this guide may not correspond to the theme used in the store, and you may need to contact our Support or make changes yourself using additional information from the Shopify documentation https://shopify.dev/docs/themes/customer-engagement/email-consent#customer-registration-form-checkbox .