Template Variables

When creating custom templates you can use variables to display certain types of information. Below is a list of variables available for you to use.

Variables Available Across All Pages

Store

  1. store.plan - The ID of the plan which this store is subscribed to.

  2. store.branding - If Tebex branding should be displayed on the store.

  3. store.name - The name of the store.

  4. store.currency - The currency of the store.

  5. store.googleAnalytics - The google analytics code setup for the store.

  6. store.theme - The ID of the theme enabled on the store.

  7. store.css - The CSS of the theme enabled on the store.

  8. store.logo - The URL of the store logo.

  9. store.allowFreeBaskets - If this store allows free baskets.

  10. store.categories - An array of the store categories.

  11. store.currencies - An array of currencies enabled on the store.

  12. store.userMessage - Used for displaying success/error messages to the user.

  13. store.pages - An array of pages on the store.

  14. store.locales - Associative array of available locales.

Basket

  1. basket.username - The username of the player who is logged in.

  2. basket.currency - The currency code of the basket.

  3. basket.price - The current price of the basket.

  4. basket.packages - An array of packages added to the basket.

  5. basket.coupons - An array of coupons redeemed against the basket.

  6. basket.ign - The username of the player who is logged in.

  7. basket.uuid - The UUID/ID of the player who is logged in.

  8. basket.id - The ID of the basket.

  9. basket.copy_link - A URL the player can use to copy/share their basket with other players.

Misc

  1. modules - The raw HTML of the modules sidebar.

Variables Related To The Package Modal Popup

  1. package.id - The ID of this package

  2. package.name - The name of this package.

  3. package.description - The description of this package.

  4. package.price - The price of this package.

  5. package.type - The type of this package (Single / subscription purchase).

  6. package.customPrice - If the user is allowed to choose how much they pay.

  7. package.purchasable - If this package is purchasable by the logged in player.

  8. package.basket - If this package is currently in the players basket.

  9. package.disable_gifting - If gifting is disabled on this package.

  10. package.storeGiftingEnabled - If gifting is enabled on the entire webstore.

  11. package.image.url - The image URL of this package.

  12. package.image.uploaded - If a custom image has been uploaded for this package.

  13. package.discount - An array of discount information.

  14. package.reason - The reason why this package is not purchasable.

Variables Related To The Checkout Flow

  1. checkout.requiredFields - An array of fields which are required on the checkout flow.

  2. checkout.gateways - An array of available gateways to checkout with.

  3. checkout.unavailableGateways - An array of unavailable gateways that are not possible to checkout with.