Shortcodes

Learn how to use the shortcodes to add more advanced features to your discount promotions

Bart Coppens avatar
Written by Bart Coppens
Updated over a week ago

Shortcodes can be used in the title and message of your popup and notification messages.

Access them using the magic wand icon (on the right of the toolbar), available on the text fields for the pop-up and notifications:

Each shortcode is replaced by a useful value when the message is displayed to the visitor of your shop.

Here are some example on how you would use them:

Providing visitors with the Discount code

You may want to disclose the discount code to your visitors. To do so use the following code:

  • {{CODE}}: is replaced with the discount code. 

Example: You are eligible for a discount. Click Apply to activate the coupon {{CODE}}.

Letting your visitors know what discount they will get

Want to display a message similar to: "Get 15% OFF" or "Grab you 20$ discount"?

Discount Ninja allows you to leverage the percentage or amount of discount configured in Shopify. So, the actual discount calculated by Shopify during checkout will always match what you display to your visitors.

In fact, Discount Ninja does even more. It calculates the amount if a percentage was configured and vice versa. This allows you to use both shortcodes, regardless of how you configured your Discount in Shopify.

There are two codes that help you achieve this:

  • {{PERCENTAGE}}: is replaced with the percentage of the discount, including the percentage sign. Example: 15%

  • {{AMOUNT}}: is replaced with the amount of the discount.

  • {{AMOUNT_NO_DECIMALS}}: is replaced with the amount of the discount (with no decimals, rounded down and no currency).

  • {{AMOUNT_NO_CURRENCY}} and {{AMOUNT_NO_DECIMALS_NO_CURRENCY}} are similar to the above, except without currency information

  • {{CURRENCY}}: is replaced with the currency of your store: USD, GBP, EUR...

  • {{CURRENCY_SYMBOL}}: similar to {{CURRENCY}}, but replaced with the symbol: $, £, €...

Examples

  • "Get {{PERCENTAGE}} OFF, that's a {{AMOUNT}} discount!" becomes "Get 15% OFF, that's a $24.65 discount!"

  • "Save {{AMOUNT_NO_DECIMALS_NO_CURRENCY}}{{CURRENCY_SYMBOL}}" becomes "Save 25€"

Show the discounted price to your visitor

You can show the price after discount as well as the original price (or original Compare At price) of the product as it is configured in Shopify.

Note that the currency configured in your Discount Ninja app settings will be used here (by default it is the same as your Shopify settings).

  • {{DISCOUNTED_PRICE}}: is replaced with the product price after the discount has been applied.

  • {{ORIGINAL_PRICE}}: is replaced with the list price of your product (configured in the Products section of the Shopify Admin).

  • {{ORIGINAL_COMPAREAT_PRICE}}: is replaced with the 'Compare At'' price of your product (configured in the Products section of the Shopify Admin).

Example: "Now only {{DISCOUNTED_PRICE}} (was {{ORIGINAL_COMPAREAT_PRICE}})!"

Hurry. Only 5 left!

You can let your visitors know how many coupons are left to be claimed.

The following codes help you do that:

  • {{USAGE_LIMIT}}: is replaced with the number of times this discount code can be used in total.

  • {{TIMES_USED}}: is replaced with the number of times the linked discount code has been claimed so far.

  • {{USAGE_LEFT}}: is replaced with the remaining number of times the discount code can be claimed.

  • {{INVENTORY_LEFT}}: is replaced with the remaining number of items in stock of the current product.

Example: "Already {{TIMES_USED}} coupons claimed. Hurry, only {{USAGE_LEFT}} left!"

Act now. Only 3 hours and 15 minutes left!

You can show your visitor when the discount code will expire. Two shortcodes can be used for this, one for the day and one for the time:

  • {{ENDS_AT_DAY}}: is replaced with the day of the date the promotion ends (Example: Sunday, January 7th). You can change the format of the day in the settings of your promotion (Discount Code tab). Note: the date is displayed in the visitor's time zone.

  • {{ENDS_AT_TIME}}: is replaced with the time the promotion ends (Example: 09:00 am). You can change the format of the day in the settings of your promotion (Discount Code tab). Note: the time is displayed in the visitor's time zone.

Example: "This coupon code expires on {{ENDS_AT_DATE}} at {{ENDS_AT_TIME}}"

There's an additional shortcode that is available for you: {{TIMER}}. The timer settings are configured on the Timer tab of your promotion.

Here's what the shortcode does:

  • {{TIMER}}: The shortcode {{TIMER}} is replaced with a timer indicating when the discount expires (expressed in days, hours, minutes and seconds). Example: 15 minutes, 35 seconds.

Example: "This coupon expires in {{TIMER}}"

Did this answer your question?