Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Checkout Marketing Options

Checkout Marketing Options

RCDeveloper
Shopify Partner
2 0 0

I am looking to add a custom email and phone subscription option to the checkout (On Shopify Plus) but at present, I haven't been able to connect it to the customer's Marketing Status, so it changes when the customer completes the checkout process

 

<div class='checkbox-wrapper'>
	<div class='checkbox__input'>
		<input name='checkout[buyer_accepts_marketing]' type='hidden' value='{% if customer.accepts_marketing %}1{% elsif customer.orders_count == 0 %}1{% else %}0{% endif %}' autocomplete='off'>
		<input class='input-checkbox' data-email-marketing='true' data-backup='buyer_accepts_marketing' type='checkbox' value='{% if customer.accepts_marketing %}1{% elsif customer.orders_count == 0 %}1{% else %}0{% endif %}' name='checkout[buyer_accepts_marketing]' id='checkout_buyer_accepts_marketing'{% unless customer.accepts_marketing or customer.orders_count == 0 %} checked{% endunless %}>
	</div>
	<label class='checkbox__label' for='checkout_buyer_accepts_marketing'>
		{{ 'shopify.checkout.marketing.accept_marketing_checkbox_label' | t }}{{ customer.accepts_marketing }}{{ customer.orders_count }}
	</label>
</div>

 

The following code is being used. I would appreciate any guidance on resolving this issue

 

Replies 0 (0)