Language & Templates

Language
ALL files related to the default language are found in the following directory:

content/language/*
Charset
Character encoding preferences are found in the following file:

content/language/global.php
RTL Support
Maian Music supports rtl languages, set the value in the following file:

content/language/global.php
General Language
ALL general language is found in the PHP files in the above folder:

content/language/admin.php (Admin)
content/language/global.php (Global)
content/language/js.php (Javascript)
content/language/checkout.php (Checkout)
content/language/public.php (Frontend)
content/language/lang2.5.php (Updates for v2.5)
content/language/lang2.9.php (Updates for v2.9)
content/language/lang3.0.php (Updates for v3.0)
content/language/lang4.0.php (Updates for v4.0)

Use a good text editor to edit, such as VSCode. DO NOT edit in a word processor.

All apostrophes MUST be escaped. Example:

'it\'s christmas time',
Time zones
Time zone text is editable in the following file:

control/timezones.php

DO NOT remove the array keys. Example: Europe/London. If you remove these, the system will fail.
Email Template Language
All the language in the emails is in the email template txt files:

content/language/email-templates/*.txt

Again, use a good text editor to edit. The html wrapper is "content/language/email-templates/html-wrapper.html" for HTML emails.
Language Packs
Available language packs can be found on the Maian Music website.

If you would like to submit a new language pack, please email it to us here.
Templates / Integration
Maian Music uses the Bootstrap Web Framework and Font Awesome v5.0+. You can find more information and tutorials on the relevant website.You'll need a working knowledge of Bootstrap if you want to make extensive template changes.

Maian Music can be adapted into any existing web layout. DO NOT use PHP includes or iframes, it's bad practice. Edit the templates correctly.
Latte Template Engine
Maian Music utilises the Latte template engine from Nette. This make integrating the layout into your existing site relatively easy compared with none templated systems. The advantage of Latte is that it uses PHP style syntax, which you may already be familiar with. Unlike other template engines that basically require you to learn a new language.

The Latte templates for the system are located in the content/*theme*/ folder.

Where you see variables in the .tpl files, these should NOT be removed. Example: {$CODE}. See comments in templates for certain variables.

In most cases, the code in the .tpl files parse standard HTML. The HTML templates are located in the content/*theme*/html/. folder. The HTML template files have variable braces. eg: {brace}. These should NOT be removed. Also note that these should not be confused with the Latte variables. The {vars} in the html folder are parsed at runtime by the system, not by Latte.

To integrate Maian Music into your existing site design is going to require some basic knowledge of HTML and a good understanding of the Latte syntax. You'll start by looking at your current HTML structure and comparing it to that of Maian Music. Generally work with the header and footer first. If you don't understand HTML, integrating into another site layout is NOT recommended.

To understand the Latte Template Engine more, refer to the Latte website:

Main Latte Guide
PHP2Latte (useful PHP conversion tool)
Responsive / Mobile Detection
Besides the built in bootstrap classes to hide / show elements on small screens, Maian Music also utilises the Mobile Detect class. In any root .tpl template file, you can use the following variable:

{$PLATFORM}

This will have one of three values based on the user agent you are viewing the website in. The values are:

pc = Desktop
mobile = Mobile phone (as supported by Mobile Detect)
tablet = Tablet computer (as supported by Mobile Detect)

Examples of usage (Latte syntax):

{switch $PLATFORM}
  {case pc}
    // Code here for desktops only..
  {case mobile}
    // Code here for phones only..
  {case tablet}
    // Code here for tablets only..
{/switch}

{if $PLATFORM == 'tablet'}
  // Do something on tablets only..
{/if}
etc

You can of course also use CSS media rules to determine the viewing pane.
Themes
Maian Music is theme based. Each theme is located in the 'content' folder and is prefixed '_theme'. The default theme is '_theme_default'. So that upgrades don't break your layout, you should copy this folder and update the admin settings for the new theme. Your theme MUST start '_theme' for the system to pick it up. More default themes may be added in future versions.
Colours & Appearance
For many people, changing the colours and a few default images is good enough. Maian Music utilises Cascading Stylesheets for colour display. ALL of the colours you see for the default design are in the stylesheets. Maian Music has the following stylesheet locations and all the stylesheets can be edited in a good text editor.

content/*theme*/assets/css/*.css (Frontend)
admin/content/css/*.css (Admin)

Edit these and choose whichever colours you want.
Images
Images are located in the following folders:

content/*theme*/assets/images/ (Frontend)
admin/content/images/ (Admin)

Note that most images are rendered via the Font Awesome class.
Composer and Vendor Packages
If you need to use a composer supported vendor package you can install it by navigating to the following folder:
control/lib/

Packages will be stored in the 'control/lib/vendor' folder. Once added they are automatically available in Maian Music via the autoloader. Refer to the package info for usage.

View available packages at:
https://packagist.org/