From 48f00b2367fd750a8c9e86f202f7e542939a8090 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 30 Oct 2013 18:28:17 +0100 Subject: [PATCH] [-] BO : FixBug #PSCFV-10882 - Add json encode and decode smarty modifier via tools class --- config/smarty.config.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php index b4b7b66aa..f21ff2bdc 100644 --- a/config/smarty.config.inc.php +++ b/config/smarty.config.inc.php @@ -70,7 +70,8 @@ smartyRegisterFunction($smarty, 'function', 'd', 'smartyDieObject'); // Debug on smartyRegisterFunction($smarty, 'function', 'l', 'smartyTranslate', false); smartyRegisterFunction($smarty, 'function', 'hook', 'smartyHook'); smartyRegisterFunction($smarty, 'function', 'toolsConvertPrice', 'toolsConvertPrice'); - +smartyRegisterFunction($smarty, 'modifier', 'json_encode', array('Tools', 'jsonEncode')); +smartyRegisterFunction($smarty, 'modifier', 'json_decode', array('Tools', 'jsonDecode')); smartyRegisterFunction($smarty, 'function', 'dateFormat', array('Tools', 'dateFormat')); smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice')); smartyRegisterFunction($smarty, 'function', 'convertPriceWithCurrency', array('Product', 'convertPriceWithCurrency'));