JuliusB Posted August 17, 2020 Share Posted August 17, 2020 Hi folks, Thank you for time in advance ! Prestashop 1.6.1.0 PHP : 7.1 I have a recuring error in my server's log : [Mon Aug 17 11:25:08.553613 2020] [:error] [pid 21242:tid 139880573372160] [client 92.184.112.15:50971] FastCGI: server "/.fpm/php5.external" stderr: PHP message: PHP Warning: A non-numeric value encountered in /cache/smarty/compile/66/d2/5f/66d25fe169f180ec3efa80bf39d13c4d7386e01f.file.product.tpl.php on line 1684 This file is compiled by Smarty so even when I take a look at the file I just don't get how I can fix this error : <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('productBasePriceTaxExcluded'=>floatval(($_smarty_tpl->tpl_vars['product']->value->getPrice(false,null,6,null,false,false)-$_smarty_tpl->tpl_vars['product']->value->ecotax))),$_smarty_tpl);?> After searching here and there I wasn't able to find something Can someone help me please ? Thank you for your time ! Link to comment Share on other sites More sharing options...
JuliusB Posted August 18, 2020 Author Share Posted August 18, 2020 It seems that the problem come from the product.tpl file in thoses lines : {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|default:'null' - $product->ecotax)|floatval} {addJsDef productPriceTaxIncluded=($product->getPriceWithoutReduct(false)|default:'null' - $product->ecotax)|floatval} Maybe the "default:'null'" ? Link to comment Share on other sites More sharing options...
JuliusB Posted August 18, 2020 Author Share Posted August 18, 2020 Okay so changing the two line from previous post by thoses ones seems to do the trick : {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|floatval - $product->ecotax|floatval* (1 + $ecotaxTax_rate / 100))|floatval} {addJsDef productPriceTaxIncluded=($product->getPriceWithoutReduct(false)|floatval - $product->ecotax|floatval * (1 + $ecotaxTax_rate / 100))|floatval} 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