[email protected] Posted June 7, 2016 Share Posted June 7, 2016 Hello, I have a problem with the file generated by Smarty value 'has_nocache_code' => "true" How to change this value to false because I can not retrieve the following values. I apologize for my English <?php /* Smarty version Smarty-3.1.14, created on 2016-06-07 10:45:38 compiled from "/var/www/dieunde/modules/bpostshm/views/templates/hook/before-carrier.tpl" */ ?> <?php /*%%SmartyHeaderCode:255710126575689b27f8bd6-11747744%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_valid = $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '6be64accb0b7feaa6d1448cfee28ffdd733443d2' => array ( 0 => '/var/www/dieunde/modules/bpostshm/views/templates/hook/before-carrier.tpl', 1 => 1465285552, 2 => 'file', ), ), 'nocache_hash' => '255710126575689b27f8bd6-11747744', 'function' => array ( ), 'variables' => array ( 'id_carrier' => 1, 'carriers_shm' => 1, 'l_messages' => 1, 'opc' => 0, 'version' => 1, 'no_address' => 0, 'debug_mode' => 0, 'url_carriers_js' => 1, 'url_carrierbox' => 1, ), 'has_nocache_code' => true, 'version' => 'Smarty-3.1.14', 'unifunc' => 'content_575689b2826831_74018532', ),false); /*/%%SmartyHeaderCode%%*/?> <?php if ($_valid && !is_callable('content_575689b2826831_74018532')) {function content_575689b2826831_74018532($_smarty_tpl) {?> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { var id_carrier = <?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo (($tmp = @intval($_smarty_tpl->tpl_vars[\'id_carrier\']->value))===null||$tmp===\'\' ? 0 : $tmp);?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> , carriers_shm = <?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'json_encode\'][0][0]->jsonEncode($_smarty_tpl->tpl_vars[\'carriers_shm\']->value);?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> , l_messages = <?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'json_encode\'][0][0]->jsonEncode($_smarty_tpl->tpl_vars[\'l_messages\']->value);?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> , opc = <?php if ($_smarty_tpl->tpl_vars['opc']->value){?>true<?php }else{ ?>false<?php }?>, version = <?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo floatval($_smarty_tpl->tpl_vars[\'version\']->value);?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> ; (function($) { $(function() { <?php if (isset($_smarty_tpl->tpl_vars['no_address']->value)){?> var msg = '<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['no_address']->value, ENT_QUOTES, 'UTF-8', true);?> ', sel_container = version < 1.5 ? '#carrierTable > tbody' : 'div.delivery_options', sel_radio = version < 1.5 ? '#carrierTable > tbody > tr' : 'div.delivery_option', elms = $(sel_radio).has($(':input').filter(function() { return this.value.replace(',', '') in carriers_shm })); elms.remove(); //elms.css('border', '1px solid red'); var elm_msg = $(document.createElement('div')); if (version < 1.5) { var tr = $(document.createElement('tr')), td = $(document.createElement('td')); td.attr('colspan', '4'); tr.append(td.append(elm_msg)); $(sel_container).prepend(tr); } else $(sel_container).append(elm_msg); elm_msg .addClass('no-address') .addClass('ps' + version.toString().replace('.', '')) .text(msg); <?php }else{ ?> <?php if (isset($_smarty_tpl->tpl_vars['debug_mode']->value)){?> var debug_sect = $('#dbg-bc'); if (0 === debug_sect.length) { var sel_container = version < 1.5 ? '#opc_delivery_methods' : '#carrier_area', debug_sect = $(document.createElement('div')), debug_src = "<?php echo strtr($_smarty_tpl->tpl_vars['debug_mode']->value, array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?> "; debug_sect .attr('id', 'dbg-bc') .html(debug_src); $(sel_container).before(debug_sect); } <?php }?> if ('undefined' === typeof(CarriersHandler)) { if ('undefined' !== typeof($.eonCacheScript)) { $.eonCacheScript('<?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo strtr($_smarty_tpl->tpl_vars[\'url_carriers_js\']->value, array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\\"" => "\\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\\n", "</" => "<\\/" ));?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> ', { success: function(content) { CarriersHandler.init( version, opc, id_carrier, carriers_shm, l_messages, '<?php echo '/*%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/<?php echo strtr($_smarty_tpl->tpl_vars[\'url_carrierbox\']->value, array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\\"" => "\\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\\n", "</" => "<\\/" ));?> /*/%%SmartyNocache:255710126575689b27f8bd6-11747744%%*/';?> ' ); }, error: function(jqXHR, textStatus, error) { debugger; console.log(textStatus); } }); } } else if (id_carrier in carriers_shm) CarriersHandler.refreshCarrierInfo(id_carrier); <?php }?> }); })(jQuery); }); // ]]> </script><?php [spam-filter] ?> Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now