X-Cart:Editing Skin Files

From X-Cart 4 Classic
Revision as of 14:59, 1 February 2010 by Admin (talk | contribs)
Jump to: navigation, search


An X-Cart skin typically includes PHP Smarty templates, CSS files, JavaScript files and, in some cases, HTML files.

The PHP Smarty templates of your store's skin are files out of which your store's pages are built. Each template file defines how a specific element of the site appears. Template files are made up of HTML/CSS and Smarty; all of them have the .tpl file extension.

The screenshot of the customer area below provides an example of how a page is created using templates:

Manual scheme for 4 2.gif

The CSS files of your store's skin are style sheets that define the presentation of your store's pages. They use the extension .css.

The JavaScript files of your store's skin are files that contain JavaScript code which can be called on your store's pages. They use the extension .js.

If you wish to change the look of a specific element of your store site, you need to edit the skin files that control this element. Most typically, you will need to edit X-Cart's template and CSS files. To be able to edit X-Cart's template and CSS files, you must possess substantial knowledge of HTML, CSS and Smarty. Here is a list of online resources that might be helpful:




All the files of your X-Cart skin are stored in the directory /xcart/skin1, where /xcart stands for the X-Cart installation directory. Your store's Admin area provides a section that allows you to view and manage the contents of this directory (see the section #Managing Skin Files).

The number of skin files in X-Cart is really large, so finding out which file controls what elements may require a great deal of effort. We recommend you begin by studying the chapters #Overview of Templates and #Overview of CSS Files. When you begin working on the skin files more closely, we also recommend you use the Debugging Console, a tool that will help you to find out the skin files for each page of the your X-Cart based store (See the section #Using X-Cart's Debugging Console).

X-Cart's skin files can be edited in X-Cart's built-in template editor (see the section #Using Template Editor), or in any decent external text editor.

Managing Skin Files

Overview of Templates

Overview of CSS Files

Using Debugging Console

Using Template Editor

See also