Posts

Showing posts with the label php

Update Environment Variable in IIS Process

If you've updated your environment variables and want to reflect your changes in an IIS process or app pool, e.g. the php process, use the command iisreset.  Using the GUI to restart the process wont work as expected. #1

Show errors in prestashop

From the installation directory of prestashop, edit the file config/config.inc.php and modify the following line : @ini_set('display_errors', 'on');

use include in tpl files with smarty in prestashop modules

The smarty version included in prestashop seems to be slightly different than the offical release. If you want to use the include instruction in a tpl file, you have to be aware of these limitations inside the instruction: you cannot concat strings you must use full path One easy way I've found to achieve this is to use the following code in your .php file: // Get the full path of the mytpl template [...] $smarty->assign('one_var', dirname(__FILE__).'/mytpl.tpl'); return $this->display(__FILE__, $this->name.'.tpl'); And the following code in your .tpl file: [...] {include file=$one_var} [...]