Skip to main content
Design & customization

Using dynamic text variables

Dynamic text variables are placeholders you type into an offer's text fields, like {{saved_percentage}} or {{product_title}}. They fill in automatically with the right product name, quantity, price, and savings when the widget renders on your storefront, so one piece of copy works across every product the bundle applies to.

How variables work

Wherever a text field supports variables, you can type a placeholder by hand or insert it from the variable picker. The placeholder stays as-is while you edit, and resolves to a real value at render time, both in the dashboard preview and on the live storefront widget.

You don't need to memorize the syntax. Each supported field shows a code icon next to it. Click it to open a dropdown of available variables and pick one.

  1. Place your cursor where you want the value to appear in the text field.
  2. Click the code icon for that field.
  3. Choose a variable from the dropdown.

The variable is inserted at the cursor position, with a single space added before or after only when it would otherwise butt up against your text, and the cursor lands right after it so you can keep typing.

Available variables

These variables are available in the standard offer text fields. The example output column shows how a value typically renders.

VariableDescriptionExample output
{{product_title}}Product titleClassic T-Shirt
{{quantity}}Offer quantity threshold3
{{buy_quantity}}Buy quantity (for BOGO offers, the items the customer pays for)2
{{get_quantity}}Free quantity (for BOGO offers, the free items)1
{{saved_percentage}}Discount percentage20%
{{saved_per_item}}Savings per item$5.00
{{saved_total}}Total savings$15.00
{{price_per_item}}Discounted price per item$8.00
{{price_total}}Total discounted price$24.00
{{compare_price_per_item}}Original price per item$10.00
{{compare_price_total}}Total original price$30.00

The example values above are just illustrations. Prices and savings use your store's currency formatting automatically, and every value reflects the actual product and offer it renders against.

BOGO quantities

For a Buy X Get Y offer, {{buy_quantity}} is the number of items the customer pays for and {{get_quantity}} is the number of free items. For every other discount type, {{buy_quantity}} equals {{quantity}} and {{get_quantity}} is 0, so it's best to use the BOGO variables only on BOGO offers.

Where you can use each variable

Not every field supports every variable. Here's where each set applies.

Offer text fields

The offer title, discount label, subtitle, badge, and benefit bullets support all of the variables listed above, including the BOGO quantities.

  • Title: Buy {{quantity}}, save {{saved_percentage}}
  • Discount label: {{saved_percentage}} off
  • Subtitle: Only {{price_per_item}} each
  • Badge: Save {{saved_total}}
  • Benefit bullet: You save {{saved_total}}

Gift and cross-sell titles

The title field of a free gift or a cross-sell extra supports all the same variables except the BOGO ones ({{buy_quantity}} and {{get_quantity}}). One important difference: in these fields the variables resolve using the extra's own product and price, not the main product on the page. So Free {{product_title}} on a gift shows the gift's name, and {{saved_percentage}} off on a cross-sell reflects that cross-sell's own discount.

Sticky add-to-cart title

The sticky add-to-cart title supports all of the offer variables, resolved against the currently selected offer. For example: {{product_title}}, save {{saved_percentage}}.

Countdown timer

The countdown fields (compact title, full title, and full subtitle) all support the offer variables, resolved against the selected offer. The compact title also offers a special {{timer}} variable that renders the live countdown value, for example: Hurry! {{saved_percentage}} off expires in {{timer}}. The timer text updates every second on the storefront.

Low-stock alert

The low-stock alert message supports only one variable, {{stock}}, which shows the remaining stock count. For example: Only {{stock}} left in stock!

How values resolve on the storefront

On the live widget, the product title fills in immediately on first render. The price-based variables (per-item and total prices, savings, and percentage) fill in once the widget has loaded the product's prices, and they refresh whenever the shopper switches variant or selects a different offer tier. The countdown's {{timer}} updates on every tick. The dashboard preview resolves everything against the offer you're previewing, so you can confirm your copy reads correctly before publishing.

Tip: if a price variable looks blank for a moment in the dashboard preview or on first load, it's waiting on the offer's prices. Select an offer tier to see the resolved values.

Was this article helpful?

Your feedback helps us improve our docs.

Thanks - we'll keep improving this article.

Want to chat with our team? Still have a question?

Still need help?

Our team is one click away. Send us a message and we'll get back to you.

We use a few cookies to keep this site working, measure how it is used, and power our chat widget when you open it. See our cookie policy.