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)