Templates
Maian Cart`s front end store can be adapted into any existing web layout. This should be accomplished by editing the template files, NOT by using include files. This will require a knowledge of HTML. Read the instructions below carefully.
Before You Begin
Before you start to update the Maian Cart templates or colours, its a good idea to have the following:
[1] A good search program/utility. Sometimes you are looking for a specific div name and you can`t find it. A quick search on the 'content/*theme*/' folder should find you things quicker. There are a few
great free programs around, a few recommendations are as follows:
Super Finder XT
File Locator Lite
File Seek
Index Your Files
UltraFileSearch
[2] Colours are the next problem. Knowing what the hex code is and where its located in any CSS or template file. ColorCop enables you to pinpoint a colour area pretty quickly, just drag the eyedropper over the colour you are looking for. Its also free.
[3] Patience. Any developer will tell you this is paramount. If you are getting frustrated, come back to it later.
[4] Backup the original installation first in case you need to revert back to it later.
Note that where *theme* is used, this refers to the theme folder you are using, whether it be the default theme or your own custom theme.
Template Integration
Maian Cart utilises the Savant2/3 template engines. These make integrating the layout into your existing site relatively easy compared with none templated
systems. The templates for the system are located in the content/*theme*/ folder. Other HTML has been separated from the PHP code and can be found in the
content/*theme*/html/ folder.
Where you see PHP variables, these should NOT be removed. Example: <?php echo $this->CODE; ?>. See comments in templates for certain variables. The .htm
template files have variable braces. ie: {brace}. These should NOT be removed either.
To integrate Maian Cart into your existing site design is going to require some basic knowledge of HTML. You`ll start by looking at your current HTML structure
and comparing it to that of Maian Cart. Generally work with the header and footer first. If you don`t understand HTML, integrating into another site layout is NOT
recommended. It is also NOT recommended you integrate the layout using PHP includes.
Left Menu Box Controller
Left menu boxes can be re-ordered on the general settings page in your admin area. You can also add custom boxes if you wish to.
More info on the general settings info page. Custom boxes can contain PHP or HTML and load any content you want via your
theme folder.
Header & Footer Files - Free v Commercial
The main difference between the commercial and free version footer files is that the closing area of the commercial version footer is encoded in the script. You should NOT
attempt to bypass the loading of the footer file by using PHP code. Doing this may return unexpected results and cause the system to fail.
If you have been kind enough to pay for the commercial licence, you can edit the footer html via the following file:
content/*theme*/html/footer-commercial.htm
Or you can simple specify your copyright code in the settings instead of editing the html.
The header template file (header.tpl.php) is the same for both versions.
E-Mail Templates
Besides HTML templates, Maian Cart also makes it easy to modify e-mail data. The e-mail templates are located at:
content/language/english/email-templates/*
admin/templates/language/english/email-templates/* (admin e-mail templates can be edited)
You can open these templates and add whatever text you want. You should be very careful NOT to remove any code between braces. ie: {name} Removing these variables
will cause some data not to be included in e-mails. If you want to use HTML in emails, enable the option in the "control/defined.inc.php" file and use
HTML code in the .txt files.
define('ENABLE_HTML_IN_EMAILS', 1);
Relevant gateway template files are separated into individual folders. More info on the email templates here.
Colours, Appearance & Images
For many people, changing the colours and a few default images is good enough. Maian Cart utilises Cascading Stylesheets for colour display. ALL of the colours you
see for the default design are in the stylesheets. Maian Cart has several stylesheets located in the following directories:
content/*theme*/css/ (Frontend Stylesheets)
admin/templates/css/ (Admin Stylesheets)
Images are located in the following folders:
content/*theme*/images/ (Frontend)
admin/templates/images/ (Admin)
LOGO: If you want to update the main Maian Cart logo update the 'content/*theme*/images/logo.gif' file. OR use the file upload option in the admin settings.
CSS3: The new CSS3 spec allows elements to have rounded corners. You may find that a few elements appear square in older browsers. Older browsers do not support CSS3. In most cases
rounded images are used for compatibility.
Admin Invoices & Packing Slip Layouts
Change the appearance of the invoice and packing slip layouts in the admin area. Template files are located at:
admin/templates/windows/invoice.php
admin/templates/windows/packing-slip.php
Stylesheets are located at:
admin/templates/css/invoice.css
admin/templates/css/packing-slip.css
ColorBox
Maian Cart utilises the excellent jQuery plugin colorBox for certain display options. For example, when viewing a fullsize product image or description.
More info here.
MP3 Preview Player
Maian Cart utilises the Open Source Music Flash Player software for mp3 previews. This is a free
player and I`m truly grateful for the authors hard work in making this great player available.
More info here.
References & Reading