gift_card.liquid template renders the gift card page, which displays the gift card issued to a customer upon purchase.
Unlike other pages in your store, gift card pages are hosted on the
checkout.shopify.com domain. Gift card URLs contain unique identifiers for your store and gift card:
The following image is an example of how Dawn's
gift_card.liquid template renders the gift card page.
gift_card template is located in the
templates directory of the theme:
This template can't be a JSON template.
You can include the following in your gift_card template or a section inside of the template:
The gift_card objectAnchor link to section titled "The gift_card object"
You can access the Liquid
gift_card object to display the gift card details.
When working with the
gift_card template, you should familiarize yourself with the following:
- Adding a QR code link to the store
- Including Apple Wallet passes to the template
- Displaying only the gift card details
To learn how to personalize gift card templates with a custom image, refer to the Shopify Help Center.
<body> elements of the page, respectively:
Apple Wallet passesAnchor link to section titled "Apple Wallet passes"
You can include Apple Wallet passes by adding the following snippet to the
<body> element of the page:
Display only the gift card detailsAnchor link to section titled "Display only the gift card details"
If you don’t want to include theme elements, like the header and footer, you can choose to render the
gift_card.liquid template with no layout or with a custom layout, using the Liquid
Preview the templateAnchor link to section titled "Preview the template"
You can preview the gift card's appearance by navigating to the gift card template from the theme editor.
- From the theme editor, open the drop-down menu at the top of the page.
- Under Templates, click Others. Then click Gift card.