Skip to content

Add gift options to your Shopify theme

Choose where shoppers see gifting, match the trigger to your store, and connect it to your gift-options popup.

9 min readReviewed

1. Choose your setup

Start with the app embed for automatic placement. Use an app block when you want to choose the position in the theme editor. Use code when your theme or cart app does not offer a suitable block slot.

MethodBest forHow placement works
App embedMerchants who want automatic setupEnable product, cart page, and cart drawer surfaces; choose above or below purchase controls.
App blockMerchants who want manual editor placementAdd the PrepMyGifts block inside a section that accepts app blocks, then drag it into position.
Code snippetCustom themes, developers, and third-party drawersPlace a small marker in a Custom liquid block, theme file, or a cart app’s Liquid-capable integration slot.

2. Follow the setup checklist

When you open PrepMyGifts with storefront setup unfinished, a Finish storefront setup popup appears. Close it with Close, Not now, or Escape to continue using the app. You can continue the checklist in Settings anytime. It also opens during initial setup. Your progress is shared between the popup and Settings.

  1. Enable gift options

    Choose Enable in theme editor, turn on PrepMyGifts gift options, and click Save. Return to the app and choose Check again. Shopify checks the published theme, so saving a draft theme alone will not complete this step.

  2. Confirm placement

    Choose the product page, cart page, or cart drawer positions you want. Review the storefront, select the placement checkbox, and choose Confirm placement. An active embed does not prove that a trigger is visible in every position.

  3. Confirm your storefront test

    Choose Open storefront to test and follow the testing checklist below. Return to the app, select the test checkbox, and choose Confirm storefront test.

  • If activation cannot be verified, enable and save the integration in Shopify first, then use the manual activation checkbox. The checklist labels that confirmation as coming from your team.
  • If Shopify reports a different published theme, confirm placement and test again. After changing settings or code within the same theme, expand the completed checklist and choose Test again after a change.
  • The checklist checks an active app embed or app block. A code snippet is not an app block; keep the app embed enabled to load its popup. A successful activation check does not test your popup or complete a gift order.

3. Set up the app embed

The embed loads the popup runtime and supplies automatic placement. Keep it enabled when using the code snippets in this guide. Start in a duplicate theme so you can review the result before publishing.

  1. Open your theme

    In Shopify, open Online Store → Themes. Open Edit theme (called Customize in some Shopify versions) for the theme you want to configure.

  2. Enable the app embed

    Open App embeds in the editor’s left toolbar. Find PrepMyGifts gift options and switch it on.

  3. Choose your surfaces

    Expand the embed. Enable Show on product page, Show on cart page, and/or Show on cart drawer. Choose a position for each enabled surface.

  4. Match your store’s appearance

    Choose the appearance, wording, icon, and colors. These settings style automatically placed triggers.

  5. Save and preview

    Click Save. Open an eligible product and a nonempty cart in the theme’s storefront preview. Check that the trigger opens your gift options.

Product illustration: Shopify theme editor showing PrepMyGifts gift options app embed and its surface placement settings
Product illustration · Example theme. The embed loads the popup and controls automatic placement. Theme editor labels and layout can vary. Open full size

4. Place an app block

Use this for precise placement without editing theme files. A section must accept app blocks. Product sections commonly do; cart summaries and drawers vary by theme.

  1. Open the right template

    In the theme editor, open the product or cart template you want to change. Product templates can be shared by several products.

  2. Add the app block

    Expand the section where the trigger should appear. Choose Add block → Apps → PrepMyGifts gift options. Some editors show the app directly in the block picker.

  3. Configure the trigger

    Choose the Surface, or use Detect from placement where appropriate. Choose the appearance, text, colors, and spacing in the block settings.

  4. Position, save, and test

    Drag the block into the desired position within that section. Save and test the actual storefront.

  • A manually placed block takes priority over automatic placement on the same surface. It does not replace the embed’s cart or drawer triggers on other surfaces. Avoid adding two manual triggers to the same location.
  • If you cannot drag a block above Checkout, the checkout area may be inside a separate Summary block or section. The editor cannot move a block into a slot the theme does not expose. Use automatic placement or the code method below.
Product illustration: Shopify product information section showing the Apps block picker and PrepMyGifts gift options
Product illustration · Add the app inside the intended section. Drawer placement is available only when that theme exposes an app-block slot. Open full size

5. Build your code snippet

Choose the destination and customize the trigger. The preview uses the same button renderer as your storefront, with an example popup. Copy the generated Liquid code when you are happy with it.

The snippet controls its own appearance; changes to the embed’s appearance settings will not restyle it. The app embed still loads the JavaScript and popup.

Customize

Changes affect this trigger, not the popup.

Size and spacing

Preview

Try the trigger. No store data is used.

Uses the same trigger renderer as your storefront. Theme fonts and available width may change the trigger’s appearance; the actual popup keeps its own styling.

Your snippet

Keep the app embed enabled.

{% if request.page_type == 'product' %}
<div
  style="width: 100%; align-self: stretch;"
  data-pmg-gift-block
  data-surface="product"
  data-ui-type="link"
  data-button-text="Make this a gift"
  data-description="Explore gift options"
  data-show-icon="true"
  data-accent-color="#B83F32"
  data-text-color="#252A32"
  data-button-text-color="#FFFFFF"
  data-background-color="#FFFDFB"
  data-border-color="#E7E5E4"
  data-font-size="15px"
  data-corner-radius="8"
  data-full-width="true"
  data-spacing="10"
></div>
{% endif %}

Includes your current snippet and instructions to find its insertion point. It does not grant access to your store.

Customize → preview → copy. Nothing is saved to your store from this page.

Read the ChatGPT / Claude installation prompt

6. Put the code in your theme

  1. Keep the runtime enabled

    Keep the PrepMyGifts app embed enabled. Remove any earlier manual trigger you are replacing.

  2. Use Custom liquid where available

    If your target section offers Custom liquid, add that block, paste the snippet, and position it there. A standalone Custom liquid section does not give access to positions inside another section.

  3. Find the purchase controls

    For a position inside the cart summary or drawer, open Online Store → Themes → ⋯ → Edit code on your duplicate theme. Ask your developer to locate the actual purchase controls.

  4. Insert the snippet

    Insert the snippet on its own row just above the checkout action group, outside the checkout button and its form controls. Preserve the existing buttons, form attributes, and event handlers. Save.

  5. Test cart updates

    Open the storefront preview, add an eligible product, and test the trigger. Update cart quantities and reopen the drawer to confirm placement survives cart refreshes.

  • The generated Liquid conditions limit product and cart-page snippets to their intended pages; drawer snippets require a nonempty cart. A shared summary file may render on more than one surface, so preserve those conditions.
  • A cart app’s HTML field may not evaluate Liquid. Use its documented integration point or ask its developer where to mount the marker; do not paste Liquid conditions into a plain HTML-only field.
  • To undo code placement, remove the inserted snippet and save. Automatic placement can resume if enabled in the embed. Custom theme-file edits may need to be reapplied after a theme upgrade.

7. Get placement help from ChatGPT or Claude

In the builder, choose Copy ChatGPT / Claude prompt. Paste it into your assistant, then provide your theme name, desired location, and the relevant Liquid file contents when asked. The prompt includes the snippet you just configured.

  1. Identify the insertion point

    Ask the assistant to identify the exact insertion point before changing code. A theme’s file names and block structure differ, so a guessed cart-summary file is not enough.

  2. Review and apply the change

    Review the proposed change. It should add our marker and keep Checkout, Add to cart, payment buttons, and their wiring intact. Apply it to your duplicate theme.

  3. Preview and verify

    Save, preview, and run the checks below. If your assistant cannot identify the right location, contact PrepMyGifts support with your theme name and the relevant code.

The assistant helps you edit your theme; it does not install or activate PrepMyGifts. Do not share passwords, access tokens, customer details, or private order data.

8. Check before publishing

Publish the theme only after testing. If you switch themes later, enable the embed and configure placement in that theme too.

  • Desktop and mobile: one trigger appears in the intended location, and long text stays readable.
  • Product page: the popup uses the selected variant and quantity. Try a different variant if the product has options.
  • Cart and drawer: gift options reflect the current cart. Change a quantity, remove an item, and reopen the drawer.
  • Checkout and Add to cart remain visible and usable. Opening the popup should not submit either action.
  • The popup opens, scrolls, closes, and reopens. Complete a separate test gift order before launch.

9. Troubleshooting

This guide covers Shopify theme-based storefronts. Headless storefronts need a separate integration. Automatic placement depends on the theme and cart markup; we have verified Dawn and Horizon setups, not every theme or cart app.

What you seeWhat to check
The snippet is blankThe empty marker needs our JavaScript. Enable the app embed in the same theme, save, and reload the storefront.
Two gift triggersRemove an extra manual app block or snippet. Manual placement suppresses automatic placement on its surface, but does not suppress another manual trigger.
The link is centeredKeep the generated width: 100% and align-self: stretch on the outer div. The theme may center children in its summary.
The popup is missing optionsCheck Home feature switches, active catalog options, product eligibility, and merchant service switches. Placement does not enable services.
Checkout appears missing only in previewCheck whether Shopify’s preview toolbar covers the bottom of the drawer. Hide the preview bar and inspect the actual storefront.
The theme has no drawer block slotUse the embed’s automatic drawer placement or ask a developer to insert the snippet in the drawer’s actual Liquid markup.

Related guides

Was this helpful?

Still need a hand? Contact support below.

Get help with this guide