Arrodonir decimals descomptes prestashop

modificando en el archivo src\Adapter\Presenter\Product\ProductLazyArray.php las siguientes líneas:

            // TODO: add percent sign according to locale preferences
            $this->product['discount_percentage'] = Tools::displayNumber($presNegativeReduction) . '%';
            $this->product['discount_percentage_absolute'] = Tools::displayNumber($presAbsoluteReduction) . '%';

Añado round(..., 0)

            // TODO: add percent sign according to locale preferences
            $this->product['discount_percentage'] = Tools::displayNumber(round($presNegativeReduction, 0)) . '%';
            $this->product['discount_percentage_absolute'] = Tools::displayNumber(round($presAbsoluteReduction, 0)) . '%';

¿Le ha resultado útil este artículo?