Email subscription

The Email subscription page and the values it reads.

Where newsletter links lead: confirming a sign-up, unsubscribing and subscribing again. Surface email_subscription.

States#

The step the page is on is page.State. The editor previews each state with sample data.

State

The page

confirm

Confirm a double opt-in sign-up.

confirmed

Subscription confirmed.

already_confirmed

Already confirmed.

unsubscribe

Confirm unsubscribing.

unsubscribed

Unsubscribed, with an offer to subscribe again.

resubscribed

Subscribed again.

invalid

An invalid or expired link.

What the code must keep#

The confirm, unsubscribe and resubscribe controls, <section class="subscription-controls" data-subscription-controls>. Keep it exactly as the default has it.

Keep {{ page.BrandingStyles }}, {{ page.PreviewNotice }} and {{ page.Heading }}, and the document's </head> and </body>. See the rules for all store pages.

Values#

Every value the page's code can read. [] marks a list item: read it inside {% for item in list %} as item.Name. A value that is empty in a particular case prints nothing; test it with {% if %} first.

Value

Type

Description

page.BrandingStyles

HTML

A <style> element with the page appearance: colours, font and corners as --co-* CSS variables. Required.

page.BrandName

Text

The brand name from the checkout appearance, or the store name when none is set.

page.Confirm

Object

The confirm form.

page.Confirm.Action

URL

page.Confirm.Button

Text

page.Confirm.CSRF

Text

page.Dir

Text

ltr or rtl, the writing direction of the language. Set it as the document's dir.

page.Email

Text

The subscriber's email, masked.

page.Error

Text

What went wrong with the last step, in the shopper's language. Empty otherwise.

page.Heading

Text

The page heading. Required.

page.HomeLabel

Text

page.Intro

Text

The text under the heading. Empty when the current step has none.

page.Locale

Text

The shopper's language as a locale code, such as en or de-CH. Set it as the document's lang.

page.LogoURL

URL

The checkout appearance logo. Empty when the store has no logo.

page.Message

Text

A confirmation of what just happened, such as a code being sent. Empty otherwise.

page.Portal

Object

The brand half of the page.

page.Portal.BackgroundSrcset

Text

A srcset of the background image in several widths.

page.Portal.BackgroundURL

URL

The order status page's background image, when the store set one. Empty otherwise.

page.Portal.Links

List

The store's checkout footer policies, as links.

page.Portal.Links[].Label

Text

The policy title.

page.Portal.Links[].URL

URL

The policy page.

page.Portal.Style

Text

Inline CSS custom properties for the brand half: --portal-logo (the checkout logo width) and --portal-dim (how much the background image is dimmed). Put it in a style attribute.

page.PortalStyles

HTML

A <style> element with the portal layout: the brand on one half and the page on the other on wide screens, the brand above the page on phones.

page.PreviewNotice

Text

In the editor preview, a notice that the page shows sample data. Empty on the storefront. Required.

page.Resubscribe

Object

The subscribe again form.

page.Resubscribe.Action

URL

page.Resubscribe.Button

Text

page.Resubscribe.CSRF

Text

page.Resubscribe.Note

Text

The consent wording, kept as the proof of consent.

page.RootURL

URL

The storefront home page (/). # in the editor preview.

page.State

Text

The step the page is on. See the states above.

page.Unsubscribe

Object

The unsubscribe form.

page.Unsubscribe.Action

URL

page.Unsubscribe.Button

Text

page.Unsubscribe.CSRF

Text