CubeCart uses the Smarty template engine. Smarty separates your store’s presentation layer (HTML, CSS, JavaScript) from its application logic (PHP), so you can customise the look and feel of your store without touching any PHP code.

Where Templates Live

  • skins/{skin_name}/templates/ — HTML template files (.html)
  • skins/{skin_name}/css/ — stylesheets
  • skins/{skin_name}/js/ — JavaScript files
  • skins/{skin_name}/images/ — skin images and icons

The default skin is called foundation and is fully responsive, built on the Foundation CSS framework.

Smarty Basics

CubeCart controllers assign data to Smarty variables which you access in templates:

  • Variables: {$variable_name}
  • Conditionals: {if $condition}...{/if}
  • Loops: {foreach from=$items item=row}...{/foreach}
  • Modifiers: {$variable|modifier}
  • Includes: {include file="templates/element.html"}

Customising Templates

  1. Copy the foundation skin folder and rename it.
  2. Enable your new skin in Admin > Settings > Skin.
  3. Edit the template HTML files, CSS, and JavaScript as needed.

See our article How do I create a custom skin or template? for a step-by-step guide.

Using PHP in Templates

While Smarty does support embedding PHP, we strongly recommend using CubeCart’s hooks and plugin system instead. Plugins keep your customisations upgrade-safe and maintainable.