Adding a custom Liquid section lets you input custom Liquid or HTML into your Shopify Email messages
- Liquid is Shopify's simple, easy-to-use programming language, and is the same programming language that themes from the Shopify Theme Store are built with
- You can use the custom Liquid section to display custom assets such as side-by-side images, custom buttons, custom sized images, and custom section sizes
Considerations
Review the following considerations before you start adding custom Liquid into your Shopify Email messages:
- The variables that you include in your code need to be supported by the custom Liquid section
- The code that you enter can't exceed 50 KB in size
- You can only use a desktop device to create a custom Liquid section
Adding a Liquid Section
- To add a Liquid section, when creating an email, simply click on the Add Section button in the bottom right corner of the screen

- In the menu of different section types that appears, click Custom Liquid

Liquid Variables Supported in the Custom Liquid Section
abandoned_checkout
This variable gives access to the following properties of an abandoned checkout:
-
urldisplays the URL of the abandoned checkout -
line_itemsdisplays the first five line items of the abandoned checkout. Additionally, eachline_itemsobject contains the following properties about each product:product_titlevariant_titlequantity
-
remaining_products_countdisplays the remaining line items count, if there are more than five line items in the abandoned checkout
The abandoned_checkout variable populates only if an email is part of an abandoned checkout marketing automation, otherwise, the variable will be null
abandoned_visit
This variable gives access to the following properties of an abandoned cart or browse:
-
urldisplays the URL of the abandoned checkout -
products_added_to_cartdisplays the first five product line items added to the cart of the abandoned visit. Additionally, eachproducts_added_to_cartobject contains the following properties about each product:titleimage_urlvariant_titlequantity
-
products_vieweddisplays the first five products viewed during the abandoned visit. Additionally, eachproducts_viewedobject contains the following properties about each product:titledescriptionimage_urlurl
-
remaining_cart_products_countdisplays the remaining line items count, if there are more than five line items in the abandoned checkout
The abandoned_visit variable populates only if an email is part of an abandoned cart or abandoned product browse marketing automation, otherwise, the variable will be null
data.customer.*
This variable gives access to the following customer data properties:
first_namelast_nameemailcitystatecountry
These properties can't be used inside Liquid filters, or Liquid conditions
email.*
This variable gives access to the following email properties:
-
subjectdisplays the subject line of the email -
preview_textdisplays the preview text of the email
shop.*
This variable gives access to the following shop properties:
-
namedisplays the shop name. -
domaindisplays the shop primary domain. -
urldisplays the shop URL. -
shopify_domaindisplays the shop Shopify domain. -
addressdisplays the shop address, which exposes the following address properties:address1address2citycountryphoneprovincezip-
brandingdisplays the shop branding, which includes the following properties:accent_section_colorbackground_primary_colorbackground_border_colorbody_text_colorbutton_background_and_link_colorbutton_label_colorfooter_link_colorfooter_text_colorfooter_background_colorsocial_link_facebooksocial_link_twittersocial_link_instagramsocial_link_pinterestshop_name-
logo, which is rendered as animgtag directly.
Comments
0 comments
Please sign in to leave a comment.