smarty-plugins

Where to register global smarty modifier in PrestaShop?

南楼画角 提交于 2019-12-10 10:15:57
问题 I'm creating a store based on PrestaShop (v 1.6), and I want to register my custom modifier plugin to be accessible from any templates (includinf front and back-officetemplates). The question is where to place the registration code? Now I use a Tools class override to add function to handle modifier (that is acceptable practice in case of store-specific functionality, afaik), and smarty.config.inc.php to register plugin (because all PrestaShop plugins are registereg here), but this file

Where to register global smarty modifier in PrestaShop?

安稳与你 提交于 2019-12-06 02:49:42
I'm creating a store based on PrestaShop (v 1.6), and I want to register my custom modifier plugin to be accessible from any templates (includinf front and back-officetemplates). The question is where to place the registration code? Now I use a Tools class override to add function to handle modifier (that is acceptable practice in case of store-specific functionality, afaik), and smarty.config.inc.php to register plugin (because all PrestaShop plugins are registereg here), but this file contains a warning about "not to modify file directly" and, as far as I understand, will be overwritten when