Smarty is the programming language used for templates in PrestaShop. To find more information on SMARTY, you can go here: http://smarty.net. The following article explains the use Smarty per the ADVANCED PARAMETERS section of PrestaShop 1.5.
Understanding the use of Smarty in PrestaShop 1.5
- To get to the Performance section of the Advanced Parameters for Prestashop, first login to the Administrator as an Administrator
- Hover over menu bar where it says ADVANCED PARAMETERS - click on PERFORMANCE when it appears in the drop-down menu.
- You will see the following screen:
Smarty is a template engine that makes it possible for programmer to separate their roles from the role of the designer. In other words, programmers can concentrate on their tasks while designers can concentrate on the presentation of the page. Smarty works within PHP and is a free an open source solution.
- The first item in the SMARTY section is the TEMPLATE CACHE. Per the Prestashop documentation, template cache improves front-end performance by caching HTML pages. You have the following options that require you select a radial button to activate:
|Never compile cache
||enable only editing theme; changes are seen when page is reloaded
|Compile cache if templates are updated
||changes to theme file in Prestashop seen when file is changed; noted that this may not always work as expected
||normal behavior - when changes to the theme are complete, PrestaShop compiles these changes and caches the pages
Select the option that meets your needs. Click on the green SAVE button in the top right hand corner to save your entries.
- PrestaShop warns that you should always leave this option enabled. Disabling it turns OFF caching and should only be used to debug themes or modules.
Set this option by carefully, and only when necessary. Click on the green SAVE button in the top right hand corner to save your entry.
- The last option in the SMARTY section are the Debug Console options:
|Do not open console
||default setting; if active, console cannot be viewed
|Open console with URL parameter(SMARTY_DEBUG)
||console is only displayed if you add "?SMARTY_DEBUG" to tail end of URL; advised that you disable this option once debugging is complete in order to avoid possible hacks
|Always open console
||EVERYONE has access to your shop console - only use for maintenance
Select the option which best meets your needs for viewing the debug console. Remember to use ONLY for the purpose of debugging your installation. Set the option back to default when debugging is complete. Click on SAVE in the top right hand corner to save your selection.
The use of SMARTY for the templates of PrestaShop allows for great flexibility between a programmer and a designer. It is free open source code, works to compliment PHP, and allows for separation between the tasks of the designer and that of the programmer while unifying their efforts. The options in PrestaShop allow you to debug modules and themes that may be under development. Use these options carefully and primarily under the direction of a programmer or designer working with your PrestaShop installation.