Install a New Template

  • Please note that michael_s has released a new template system using an HTML format - if you want to investigate this approach please read the file here.
  • When designing your store you can either purchase a template or create your own.
  • The template system in osCMax is designed to as simple as possible - however, it does still cause people quite a lot of problems.

BTS Basics and the fallback directory

  • The structure of BTS (Basic Template System) is such that osCmax will go to the template folder that you have defined in the admin panel under Configuration → Templates → Template Setup and looks for the files it needs to display any given page of your store.
    • If it finds the page in <your template>/content directory then it will use it
    • If it can not find the page then it will try to locate the file within the fallback directory

Put another way. You only need to add files to your content directory, where it differs from what is produced by the fallback template. In this way, you do not make changes to the core fallback files, so that any future upgrades will not change your custom template. It is much easier just to update your customised files to match any new features; you may only have changed a couple of page styles from the default.

So where do all the files go?

  • All of the files need to go into a sub-folder of templates. For example: aabox, Close, CSS-fluid-1, etc. (See the image)

  • Create a new folder and name it something memorable. (It is also cAsE SeNsItIve)
  • Copy the files (not directories) found in /catalog/templates/fallback to your new directory. These will form the basis of your new template.
  • Go to Admin → Configuration → Templates → Template Setup → Default Template Directory → and select the name of your new template from the drop down list.
  • Your store should now be using your new template!

What about the files in the template folder?

  • Within your template folder you should find:
    • dynamic_mopics.css :: controls the look and feel of the extra images
    • main_page.tpl.php :: This is main template file which provides the framework into which all the content for your store is loaded
    • popup.tpl.php :: nearly obsolete file, used to control product image enlargement, where javascript hasn't been enabled in the end users browser.
    • stylesheet.css :: This is the main file for controlling the look and feel of your site. Almost every aspect of your colours, fonts, etc. is control from here.

What about the sub-folders in my template folder?

  • Within your template folder you will find a number of different sub-folders which contain different parts of your template.
    • Boxes :: This is where any code used to create the small info boxes in the template are stored. eg. categories.tpl.php. (It only creates the box and does not put in any content.)
    • Content :: This is the most important folder which contains all of the content for the pages of your store. In these files you will find most of the HTML/PHP that standard osCommerce has in the catalog/ directory. You may only have a few files in here, or none at all, depending how much you want to change the default pages. If you wish to change the look of the login page, then copy login.tpl.php from /catalog/templates/fallback/content/ to your template structure and alter the copied file.
    • images :: Contains images specific to your template.
  • Bookmark at
  • Bookmark "Install a New Template" at Reddit
  • Bookmark "Install a New Template" at Google
  • Bookmark "Install a New Template" at Facebook
  • Bookmark "Install a New Template" at Twitter
  • Bookmark "Install a New Template" at Slashdot
v2.5/install_a_new_template.txt · Last modified: 2013/02/19 13:47 by ejsolutions
You are here: startv2.5install_a_new_template