Manually Add Afterpay Site Messaging to Theme
How can I add Afterpay Site Messaging to my Shopify product and cart pages?
The Afterpay Code Snippet allows you, the merchant, to manually add Afterpay messaging to the product and cart pages. You do this by copy-pasting a code snippet into your Shopify liquid template file. This is a short procedure that consists of a few steps.
This page shows you how to do the following:
Configuration
Do the following to position the Afterpay site messaging onto the product and cart pages of your Shopify website:
- Copy the code below to your clipboard, a Copy to Clipboard icon in the top right corner makes this easy.
-
Login to Shopify Admin
-
Navigate to Themes. To do this, go to Sales channels > Online Store > Themes.
-
Navigate to the current theme, then go to Actions > edit code.
-
Under the Layout folder, click theme.liquid.
-
Scroll to the bottom of the
theme.liquid
file: -
Paste the copied text (Step 1), at the bottom of the
theme.liquid
file: -
Click Save, and go to the website to review the product and cart pages for Afterpay assets.

Add an Afterpay Banner to Shopify
To add an Afterpay Banner to your Shopify page, follow the instructions here.
Add messaging to the dynamic or drawer cart
To add messaging to the dynamic or drawer cart, do the following:
-
Follow all the Configuration steps above from step 1 to step 8.
-
Navigate to your
theme.liquid file
. -
Find the required selector on the drawer cart.
-
Add the selector to the code and enable the dynamic cart integration.