Reference

Text variables

Every variable a deal's texts can show, such as the saved percentage and the quantity, what each one prints, where it works, and how to do simple sums like a price per day.

Applies to: TreStack Bundles, every plan
Updated: 5 November 2026

At a glance
  • Insert one: Insert variable, beside a text field
  • Prices: In the shopper's currency, with your money format
  • Unknown variable: Prints nothing

What a variable does

A variable is a word in double braces, such as {{saved_percentage}}, that the widget replaces with a real value for the bar the shopper is looking at. Buy 3, save {{saved_percentage}} shows as "Buy 3, save 15%" and changes by itself when you change the discount or the product's price.

Texts that take variables have an Insert variable button beside the field. It opens a menu of the variables that field can use and puts the one you choose where your cursor is. You can also type a variable by hand. Bar titles, subtitles and labels, badges, highlights, gift and upsell texts, the savings summary, the sticky bar, subscription texts and the pop-up subtitles all take them.

Every variable

VariableIn the menu asPrints
{{saved_percentage}}Saved percentageThe saving as a percentage, rounded to a whole number
{{saved_total}}Saved $ totalWhat the whole bar saves: the price before the discount minus the price after
{{saved_amount}}Saved $ per itemWhat one item saves
{{product}}Product titleThe product's title, or the titles of the products in the set
{{variant_title}}Variant titleThe chosen variant, such as Red / M, or 2× Red, 1× Blue for mixed variants
{{new_total}}New total priceThe bar's total after the discount
{{new_price}}New price per itemOne item's price after the discount
{{new_price / 30}}New price per dayOne item's price after the discount, divided by 30
{{original_total}}Original total priceThe bar's total before the discount
{{original_price}}Original price per itemOne item's price before the discount
{{new_unit_price}}New unit priceThe price per unit of measure after the discount
{{saved_per_unit}}Saved $ per unitThe saving per unit of measure
{{original_unit_price}}Original unit priceThe price per unit of measure before the discount
{{unit_quantity}}Unit quantityThe unit of measure the unit prices count in
{{quantity}}QuantityThe number of items in the bar
{{buy_quantity}}Buy quantityThe items bought in a Buy X, get Y bar
{{get_quantity}}Get quantityThe free or discounted items in a Buy X, get Y bar
{{gifts_count}}Number of free giftsThe number of free gifts on the bar
{{selling_plan}}Selling plan nameThe subscription plan's name
{{selling_plan_discount}}Selling plan discountThe subscription plan's discount, as a percentage or an amount
{{timer}}Remaining timeThe countdown, in the timer's title only
{{stock}}Items left in stockThe stock left, in the low stock message only

Where some variables work

  • Variant title is offered in the titles, subtitles and labels of quantity break and Buy X, get Y bars, in highlights and in the sold-out label.
  • Buy quantity and Get quantity have a value only on Buy X, get Y bars.
  • Unit prices have a value only when the variant has a unit price measure set in Shopify, and they keep their decimals.
  • Remaining time works only in the countdown timer's title, and Items left in stock only in the low stock message. Those two fields offer nothing else.
  • The discount name at checkout keeps {{quantity}}, {{buy_quantity}} and {{get_quantity}}, filled in, and drops every other variable. See How the discount is applied at checkout.

Simple sums

A variable can take one operation with a number: add, subtract, multiply or divide. New price per day is the built-in example, {{new_price / 30}}. You can write your own, such as {{new_price / 7}} for a price per week or {{quantity + 1}}.

With a price, adding and subtracting count in whole units of the currency, so {{new_total - 5}} takes 5 dollars off in a store that sells in dollars. Dividing keeps decimals. Dividing by zero prints nothing.

Prices, translations, and mistakes

Prices print in the shopper's currency with your store's money format, and Show prices without decimals in the deal's Pricing settings applies to them too. Numbers round to two decimals.

When you translate a deal, write the variables in the translation exactly as in the original. The Translations page warns when they do not match but saves anyway. See Translations, currencies and markets.

A misspelt variable, or one with no value on that bar, prints nothing rather than the braces. If a word disappears from a bar on your store, check the spelling of the variable in its place first.

Adding a variable, in three steps.

Open the text

In the deal editor, open the bar, gift, upsell or setting whose text should change.

Insert the variable

Put the cursor where the value goes, choose Insert variable and pick it from the menu.

Check it in the preview

The preview fills in real values for the bar you select. Select each bar once, since every bar has its own numbers.

If this does not work

The failures most likely on this procedure, with the check that resolves each one.

Copyright © 2026