# Objects

Objects available in the system allow you to easily build and customize themes. These objects come with methods and/or properties that facilitate handling settings, managing currencies, handling images, querying general system information, and accessing various routes. Below you'll find detailed descriptions of each object and how to use them.

These objects are globally accessible in every template file.

# config

# Description

Object representing the settings available in the admin interface.

# get() method

# Syntax

config.get(configName)

# Argument

configName: String representing the name of the configuration setting to retrieve.

# Return Value

Can return various types such as String, Boolean, or Integer. Returns NULL if the setting doesn't exist.

# Example Code:

Code: Output:
{% if config.get('config_show_header_phone') == 1 %}
    <div class="header-phone">{{ phone }}</div>
{% endif %}
<div class="header-phone">06-30-123-4567</div>

# currency

# Description

Contains information about currencies set in the online shop.

# Properties

Property Description Type
currencyId current currency ID, e.g., 4 String
currencyCode current currency code, e.g., HUF String
currencyTitle current currency title, e.g., Hungarian Forint String

# Usage

The Currency object can be accessed via the shop object through the currentCurrency and availableCurrencies properties.

# Example

Retrieve the title of the first active currency (HUF in this example):

Code: Output:
{{ shop.availableCurrencies[0].currencyTitle }}
HUF

# customer

# Description

The customer object provides access to the currently logged-in customer's data and state. It is available globally in every template file. If no customer is logged in, methods that return identity or account data will return empty values.

# Methods

Method Description Return Type
getId() Returns the unique identifier of the logged-in customer. Integer
getFirstName() Returns the customer's first name. String
getLastName() Returns the customer's last name. String
getEmail() Returns the customer's email address. String
getTelephone() Returns the customer's telephone number. String
getFax() Returns the customer's fax number. String
getNewsletter() Returns the newsletter subscription status of the customer. Integer
getCustomerGroupId() Returns the ID of the customer group the customer belongs to. Falls back to the default group ID from config if not set. Integer
getAddressId() Returns the ID of the customer's default address. Integer
getCountryId() Returns the country ID associated with the customer's default address. Integer
getZoneId() Returns the zone ID associated with the customer's default address. Integer
getPercentDiscount() Returns the percentage discount assigned to the customer's group. Float
getPercentDiscountSpecialPrices() Returns whether the customer's group discount applies to special/sale prices as well. Boolean
getCustomerGroupDiscountRate() Returns the calculated discount multiplier (e.g. 0.9 for a 10% discount). Used to compute final prices. Float
getDefaultAddress() Returns the customer's default address as an Address object. Fields can be accessed via getField('field_name'). See the available fields below. Address
isLogged() Returns true if the customer is currently logged in, false otherwise. Boolean
isRegistered() Returns true if the customer is logged in, or if they filled out the registration form during checkout. Boolean
hasOrder() Returns true if the customer has placed at least one order. For guests, checks by email from checkout data. Boolean
isFreeShipping() Returns true if the customer is entitled to free shipping based on their customer group settings. Boolean
isEnabledLoyaltyPoints() Returns true if the loyalty points system is enabled for the customer. Boolean
getRegistrationCheck() Returns the value of the registration check flag for the customer. Boolean

# Examples

# Check if the customer is logged in

Code: Output:
{% if customer.isLogged() %}
    <span>Welcome, {{ customer.getFirstName() }}!</span>
{% endif %}
<span>Welcome, John!</span>

# Display the customer's email address

Code: Output:
{{ customer.getEmail() }}
john.doe@example.com

# Show a free shipping badge if the customer qualifies

Code: Output:
{% if customer.isFreeShipping() %}
    <span class="badge">Free Shipping</span>
{% endif %}
<span class="badge">Free Shipping</span>

# Access default address fields

The getDefaultAddress() method returns an Address object. Its fields can be accessed using getField('field_name').

Available fields:

Field Description Type
firstname First name on the address String
lastname Last name on the address String
company Company name String
taxnumber Tax number (for business addresses) String
address_1 Primary address line String
address_2 Secondary address line String
postcode Postal code String
city City name String
country Country name String
country_id Country ID Integer
zone Zone / county name String
zone_id Zone ID Integer
Code: Output:
{{ customer.getDefaultAddress().getField('firstname') }}
{{ customer.getDefaultAddress().getField('lastname') }}
{{ customer.getDefaultAddress().getField('city') }}
{{ customer.getDefaultAddress().getField('postcode') }}
{{ customer.getDefaultAddress().getField('address_1') }}
{{ customer.getDefaultAddress().getField('country') }}
John
Doe
Budapest
1234
Main Street 1.
Hungary

# Display a loyalty points indicator

Code: Output:
{% if customer.isEnabledLoyaltyPoints() %}
    <div class="loyalty-points">You have loyalty points available!</div>
{% endif %}
<div class="loyalty-points">You have loyalty points available!</div>
## image

Used for handling images, the Image object currently only has an src property which stores the image source (URL). The src property is of type string. Available only in templates where passed.

# Example:

Accessing an image object within the content variable in news.tpl:

Code: Output:
{{ content.image_data.src }}
data/test.png

# page

The page object is a global object used for querying general system information.

# methods

Name Description Type
getRoute() Returns the current request route, returns an empty string if not available. String
getUrl() Returns the full URL of the current request. String

# Example Code for Product Page

Retrieve the current route on a product page:

Code: Output:
{{ page.getRoute() }}
product/product

# language

Global object for accessing language and localization information.

# getActLangName() method

Returns the full name of the current language.

# Szintaxis

language.getActLangName()

# getActCode() method

Returns the code of the currently set language.

# Syntax

language.getActCode()

# getLanguages() method

Returns the list of available languages.

# Syntax

language.getLanguages()

# Return Value

Returns an array with the below properties.

Property Description Type
language_id Unique identifier of the language String
name Name of the language String
code Short language code (ISO-style) String
locale Comma-separated list of locale identifiers for the language String
image Full URL of the flag image representing the language String
image_path Relative path to the language flag image String
image_file Filename of the language flag image String

# routes

The routes object is an associative array where keys are route names and values are URLs associated with those routes. Always of string type.

# Example

Code: Output:
{{ routes.login_url }}
/customer/login

# Full list

Key: Value:
account_url/index.php?route=account/account
account_edit_url/index.php?route=account/edit
account_insert_url/index.php?route=account/address/insert
account_password_url/index.php?route=account/password
account_address_url/index.php?route=account/address
account_waitinglist_url/index.php?route=account/waitinglist
account_history_url/index.php?route=account/history
account_invoice_url/index.php?route=account/invoice
account_download_url/index.php?route=account/download
account_newsletter_url/index.php?route=account/newsletter
account_registration_contribution_url/index.php?route=account/registration_contribution
account_affiliate_url/index.php?route=account/aaffiliate
account_affiliate_commissions_all_url/index.php?route=account/aaffiliate_commissions/all
account_affiliate_commissions_month_url/index.php?route=account/aaffiliate_commissions/month
cart_url/cart
cartpresent_url/index.php?route=checkout/cartchildren/cartpresent
checkout_url/checkout
contact_url/index.php?route=information/contact
forgotten_url/index.php?route=account/forgotten
login_url/customer/login
logout_url/index.php?route=account/logout
personaldata_url/index.php?route=information/personaldata
register_url/customer/register
manufacturer_list_url/index.php?route=product/manufacturers
search_url/index.php?route=product/list
sitemap_url/index.php?route=information/sitemap
style_guide_url/index.php?route=information/style_guide
wishlist_url/index.php?route=wishlist/wishlist
checkout_cart_urlindex.php?route=checkout/cart

🔴 Avoid hardcoding system routes directly in templates. Use the routes object instead.


# settings

Used for managing color settings defined in config.data.json for themes.

# get() method

# Usage

{{ settings.get('key', 'default_value') }}

Returns the value of the setting named key if it exists. If key doesn't exist, returns default_value. Returns as a string.

# Example

Retrieve the "global-color" setting from config.data.json:

Code: Output:
{{ settings.get('global-color', '#000') }}
#364270

# shop

The shop object can be used to request general information about the online store.

# Properties

Property name Description Type
name Returns the name of the shop Sztring
title Returns the title of the shop. Sztring
needCountdown Returns a Boolean indicating whether there's a countdown active on the page. Boolean
currency Returns the current currency of the shop, its properties can be found in the currency object Currency
availableCurrencies Returns a list of currencies available in the shop. Array

# Example

Output the name of the shop:

Code: Output:
{{ shop.name }}
Demo

# viewHelper

# viewHelper.loadModule()

Used to insert enabled or dynamic modules. If a module is assigned to a position and is also pulled in using viewHelper.loadModule, it will appear both in its assigned position and where loadModule is used.

# Szintaxis

viewHelper.loadModule(moduleRoute)

# Argumentok

moduleRoute: The module path as referenced in the admin interface.

# Return Value

Returns the HTML code of the referenced module.

Code: Output:
{{ viewHelper.loadModule('module/headerlinks') }}
<ul class="list-unstyled headermenu-list d-flex">
    <li class="headermenu-list__item d-flex nav-item">
        <a href="[BOLTNEV]/test" target="_self" class="nav-link" title="Test">
            test
        </a>
    </li>
</ul>
{{ viewHelper.loadModule('sections/section-name') }}

<div id="section-section-name" class="section-wrapper module-editable">
    ...
</div>

# viewHelper.loadPosition()

Displays all modules enabled for a given position. Positions are defined in the theme's config/settings.json file.

# Syntax

viewHelper.loadPosition(positionName)

# Arguments

positionName: Name of the position to load.

# Return Value

Returns the HTML of all modules that can appear in the specified position.

Example:

Code: Output:
{{ viewHelper.loadPosition('home') }}
<div id="section-section-name" class="section-wrapper module-editable">...</div>
<div id="module_news_wrapper" class="module-news-wrapper">...</div>
<div id="module_latest_wrapper" class="module-latest-wrapper">...</div>
<div id="module_kickerimage_wrapper" class="module-kickerimage-wrapper">...</div>

# viewHelper.isPositionEmpty()

Checks if a given position has any modules assigned to it.

# Syntax

viewHelper.loadPosition(positionName)

# Arguments

positionName: Name of the position to check.

# Return Value

Returns a Boolean: true or false.

Example:

Code: Output:
{% if viewHelper.isPositionEmpty('home') %}
    {{ viewHelper.loadPosition('home') }}
{% endif %}
<div id="section-section-name" class="section-wrapper module-editable">...</div>
<div id="module_news_wrapper" class="module-news-wrapper">...</div>
<div id="module_latest_wrapper" class="module-latest-wrapper">...</div>
<div id="module_kickerimage_wrapper" class="module-kickerimage-wrapper">...</div>
© 2011 - 2026 Shoprenter Kft.