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.plan - The ID of the plan which this store is subscribed to.
- store.branding - If Tebex branding should be displayed on the store.
- store.name - The name of the store.
- store.currency - The currency of the store.
- store.googleAnalytics - The google analytics code setup for the store.
- store.theme - The ID of the theme enabled on the store.
- store.css - The CSS of the theme enabled on the store.
- store.logo - The URL of the store logo.
- store.allowFreeBaskets - If this store allows free baskets.
- store.categories - An array of the store categories.
- store.currencies - An array of currencies enabled on the store.
- store.userMessage - Used for displaying success/error messages to the user.
- store.pages - An array of pages on the store.
- store.locales - Associative array of available locales.
- basket.username - The username of the player who is logged in.
- basket.currency - The currency code of the basket.
- basket.price - The current price of the basket.
- basket.packages - An array of packages added to the basket.
- basket.coupons - An array of coupons redeemed against the basket.
- basket.ign - The username of the player who is logged in.
- basket.uuid - The UUID/ID of the player who is logged in.
- basket.id - The ID of the basket.
- basket.copy_link - A URL the player can use to copy/share their basket with other players.
- modules - The raw HTML of the modules sidebar.
Variables Related To The Package Modal Popup
- package.id - The ID of this package
- package.name - The name of this package.
- package.description - The description of this package.
- package.price - The price of this package.
- package.type - The type of this package (Single / subscription purchase).
- package.customPrice - If the user is allowed to choose how much they pay.
- package.purchasable - If this package is purchasable by the logged in player.
- package.basket - If this package is currently in the players basket.
- package.disable_gifting - If gifting is disabled on this package.
- package.storeGiftingEnabled - If gifting is enabled on the entire webstore.
- package.image - The image URL of this package.
- package.discount - An array of discount information.
- package.reason - The reason why this package is not purchasable.
Variables Related To The Checkout Flow
- checkout.requiredFields - An array of fields which are required on the checkout flow.
- checkout.gateways - An array of available gateways to checkout with.
- checkout.unavailableGateways - An array of unavailable gateways that are not possible to checkout with.