Flair dynamic badge text

Overview

You can include dynamic product information as part of your Flair product badge text.

For example, you can create urgency by showing the actual remaining inventory available for a product by entering this in your Flair badge text:

Hurry only {{ flair_inventory_total }} left!

This will dynamically insert the total inventory available for your product like so:

Hurry only 3 left!

Working with prices

When you use any variables that deal with prices you will need to use a money filter to display them properly. Otherwise, the prices are displayed as cents.

You can see some examples of the money filter in the sections below.

Inventory variables

The flair_inventory_total variable is used to insert the total inventory across all variants.

Example

Hurry only {{ flair_inventory_total }} left!

Becomes:

Hurry only 3 left!

Price variables

The following price variables are supported:

  • product.price_min - the lowest price of the product
  • product.price_max - the highest price of the product

Example

Starting at {{ product.price_min | money }}

Becomes:

Starting at $19.99

Sale amount variables

The following sale amount variables are supported:

  • flair_sale_amount_min - the minimum savings dollar amount for this product (based on the compare at price)
  • flair_sale_amount_max - the maximum savings dollar amount for this product (based on the compare at price)

Example

SAVE {{ flair_sale_amount_min | money }}

Becomes:

SAVE $5.26

Sale percent variables

The following sale percent variables are supported:

  • flair_sale_percent_min - the minimum savings percentage for this product (based on the compare at price)
  • flair_sale_percent_max - the maximum savings percentage for this product (based on the compare at price)

Percents are rounded to two decimal places (e.g. - 25.49). You'll most likely want to round them to whole numbers as shown in the following example.

Example

SAVE {{ flair_sale_percent_min | round }}%

Becomes:

SAVE 20%

Have a suggestion for a dynamic variable?

If you'd like to see support for other dynamic variables that aren't listed here, feel free to contact us with more details.

Still need help? Contact Us Contact Us