Jump to content

Message D'erreur Sur La Page Produit


Recommended Posts

J'ai ce message dans la page de détails de mes produits : (version de prestashop 1.6.0.9)

 

Warning: round() expects parameter 2 to be long, string given in /var/www/html/domains/monsite.be/www/classes/Tools.php on line 1592 Warning: round() expects parameter 2 to be long, string given in /var/www/html/domains/monsite.be/www/classes/Tools.php on line 1592

 

est-ce que quelqu'un a une solution ?

D'avance MERCI

 

voici le code :

public static function ps_round($value, $precision = 0)
    {
        static $method = null;

        if ($method == null)
            $method = (int)Configuration::get('PS_PRICE_ROUND_MODE');

        if ($method == PS_ROUND_UP)
            return Tools::ceilf($value, $precision);
        elseif ($method == PS_ROUND_DOWN)
            return Tools::floorf($value, $precision);
        return round($value, $precision);
    }

nous avons mis comme ceci pour ne plus avoir d'erreur...

Mais est-ce que quelqu'un sait d'ou cela vient, j'aime pas trop aller dans le code natif de prestashop ...

public static function ps_round($value, $precision = 0)
    {
        static $method = null;

        if ($method == null)
            $method = (int)Configuration::get('PS_PRICE_ROUND_MODE');

        if ($method == PS_ROUND_UP)
            return Tools::ceilf($value, $precision);
        elseif ($method == PS_ROUND_DOWN)
            return Tools::floorf($value, $precision);
        return round($value, 2);
    }
 

Edited by valetco (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...