简体   繁体   中英

Module creation prestashop

sorry for my bad English For personal use I develop a module compatible with any prestashop version. To display the config page on the admin and especially for the page to be compatible with all versions I use this method

'option1' => Configuration::get('option1')));
$smarty->display(_PS_MODULE_DIR_ . 'monmodule/option.tpl');

in the option.tpl page

<div class="options"><i class="icon-cogs"></i> {$option1}</div>

***{$option1}*** is well received but I have several errors one for each variables show example on prestashop 1.6 and for each received variable ***{$option1}*** ***{$option2}*** ***{$option3}***

Notice à la ligne 28 du fichier H:\Installation_Soft\xampp\PHP56\htdocs\prestashop_16123\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: Settings

Do you have a solution to stay in this principle but without errors?

thanks in advance.

try in tpl :

{if isset($option1)}{$option1}{/if} 
{if isset($option2)}{$option2}{/if}
{if isset($option3)}{$option3}{/if}
....

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM