Global Variables Documentation
Global Variable Syntax
Global variables are accessed using the special Handlebars helper syntax throughout the application:
{{global 'domain'}}
- Site domain{{global 'site_name'}}
- Site name{{global 'currency'}}
- Site default currency
This templating syntax allows for dynamic access to system-wide properties in various parts of the application.
Basic Site Information
Core site settings that can be accessed via:
{{global 'domain'}}
: Site domain name{{global 'site_name'}}
: Site name/title{{global 'currency'}}
: Default currency code{{global 'currency_symbol'}}
: Currency symbol
Site Statistics
Access site-wide statistics:
{{global 'orders_count'}}
: Total number of orders{{global 'users_count'}}
: Total number of registered users
Display Settings
Site display configuration:
{{global 'price_round'}}
: Decimal precision for prices
Feature Settings
Access feature settings through the details object:
User Account Features
{{global 'details.name_field'}}
: Whether name field is enabled{{global 'details.phone_filed'}}
: Whether phone field is enabled{{global 'details.mail_verify'}}
: Email verification status{{global 'details.sms_verify'}}
: SMS verification status{{global 'details.two_factor'}}
: Two-factor authentication availability{{global 'details.two_factor_mandatory'}}
: Whether 2FA is mandatory{{global 'details.forgot_password'}}
: Password reset feature status{{global 'details.register_system'}}
: User registration status
API Settings
API configuration settings:
{{global 'details.api_status'}}
: Whether API is enabled{{global 'details.api_low_balance'}}
: Low balance notification for API
Order Settings
Order handling configuration:
{{global 'details.auto_refill'}}
: Automatic refill status{{global 'details.failed_order'}}
: Failed order handling{{global 'details.auto_complate'}}
: Auto-complete order status{{global 'details.service_list'}}
: Service listing configuration
Provider Settings
Provider management settings:
{{global 'details.provider_change'}}
: Provider change availability{{global 'details.provider_status'}}
: Provider status display{{global 'details.provider_price_change'}}
: Price change handling
Child Panel Settings
Child panel feature settings:
{{global 'details.cp_purchase'}}
: Child panel purchase status{{global 'details.is_cp_service'}}
: Child panel service status{{global 'details.is_cp_discount'}}
: Child panel discount availability
Payment Settings
Payment configuration:
{{global 'details.bank_payment'}}
: Bank payment status{{global 'details.online_payment'}}
: Online payment status
Support System
Support system configuration:
{{global 'details.support_system'}}
: Support system status{{global 'details.support_limit'}}
: Support ticket limits{{global 'details.new_support_ticket'}}
: New ticket notifications{{global 'details.share_support_data'}}
: Support data sharing settings
Security Settings
Security feature configuration:
{{global 'details.theft_prevention'}}
: Anti-theft measures status{{global 'details.user_tracking'}}
: User tracking capabilities
Content Settings
Site content configuration:
{{global 'details.extra_footer'}}
: Custom footer content{{global 'details.extra_header'}}
: Custom header content{{global 'details.description_share'}}
: Service description sharing{{global 'details.salse_agreement'}}
: Sales agreement status{{global 'details.register_agreement'}}
: Registration agreement status
Example Usage
Example of how global variables might be used in templates:
<h1>Welcome to {{global 'site_name'}}</h1>
<div class="price">
{{global 'currency_symbol'}}{{price}}
</div>
{{#if (global 'details.support_system')}}
<a href="/support">Contact Support</a>
{{/if}}
<footer>
{{global 'details.extra_footer'}}
© {{global 'site_name'}} {{currentYear}}
</footer>