Skip to product information
1 of 1
Published:2024.09.15

Example of setting up Shopify's cart screen to display a check box for whether you want to receive email newsletters and mark your email subscription as "Registered"

Example of setting up Shopify's cart screen to display a check box for whether you want to receive email newsletters and mark your email subscription as "Registered"

Applications

  • Cart Edit

How to implement

  • LIQUID
  • HTML/CSS
View full details

There are a lot of things you can do using Shopify Flow's "Send Admin API Request" action, but in this example we'll use it to obtain permission to receive email newsletters on the cart screen rather than the checkout screen, and have that information reflected in the customer's status after the order is completed.


Example of setting to display a check box for whether to receive email newsletters on the cart screen and mark email subscriptions as "Registered"


[(For the Dawn/Rise theme) Setup step 1] Edit "sections/main-cart-footer.liquid" so that you can add customized Liquid to the "Subtotal" block on the cart screen.


[(For the Dawn/Rise theme) Setup Step 2] Add the custom Liquid block added in Step 1 to the subtotal section of the cart template and insert the checkbox code to indicate whether you want to receive the newsletter into the cart attributes.


[(For the Dawn/Rise theme) Setup step 3] If the check on the cart screen is OK, create a Flow that reflects "email newsletter consent" in the customer data.


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Edit "sections/main-cart-footer.liquid": ① Add code to draw customized Liquid

Edit "sections/main-cart-footer.liquid": ② Add a schema that allows you to add customized Liquid

Related Post