Template Variables
Template Variables Reference
Tebex supports a wide range of template variables for use within custom templates (written in Twig). These variables allow you to access and display dynamic content such as store details, basket contents, package info, and checkout status.
Template variables are only available when you're using Custom Templates, which require a Tebex Plus subscription.
Global Variables (Available Across All Pages)
Store Variables
store.plan
The ID of the plan the store is subscribed to.
store.branding
Whether Tebex branding should be displayed.
store.name
The name of the store.
store.currency
The currency used by the store.
store.googleAnalytics
Google Analytics code (if set).
store.theme
The ID of the active theme.
store.css
The CSS for the active theme.
store.logo
The URL of the store logo.
store.allowFreeBaskets
Whether free baskets are allowed.
store.categories
Array of categories in the store.
store.currencies
Array of enabled currencies.
store.userMessage
Message shown to the user (e.g., success/error).
store.pages
Array of custom pages on the store.
store.locales
Available language/locale options.
Basket Variables
basket.username
Username of the logged-in player.
basket.ign
Alias of basket.username
.
basket.uuid
UUID/ID of the logged-in player.
basket.currency
Currency code used in the basket.
basket.price
Total price of the basket.
basket.packages
Array of packages added to the basket.
basket.coupons
Array of coupons applied.
basket.id
ID of the basket.
basket.copy_link
Shareable basket URL.
Miscellaneous
modules
Raw HTML of the sidebar modules.
Package Modal Variables
Used within the package modal popup context.
package.id
ID of the package.
package.name
Name of the package.
package.description
Package description.
package.price
Price of the package.
package.type
Type: single purchase or subscription.
package.customPrice
Whether the customer can enter a custom price.
package.purchasable
If the package can be purchased by the player.
package.basket
Whether the package is already in the basket.
package.disable_gifting
Whether gifting is disabled on this package.
package.storeGiftingEnabled
Whether gifting is enabled store-wide.
package.image.url
URL of the package image.
package.image.uploaded
If a custom image was uploaded.
package.discount
Array of applicable discount data.
package.reason
Reason the package cannot be purchased (if applicable).
Checkout Flow Variables
checkout.requiredFields
Array of required fields in the checkout process.
checkout.gateways
Array of available payment gateways.
checkout.unavailableGateways
Array of disabled or unavailable payment gateways.
Tips
These variables can be used inside your Twig templates with double curly braces:
twigCopyEdit{{ store.name }} {{ basket.price }}
Always check for availability before outputting optional data (e.g.
package.discount
) using Twig conditionals:twigCopyEdit{% if package.discount %} <p>Discount applied!</p> {% endif %}
Last updated
Was this helpful?