Is there a way to have a rounded % rate with the reduced price sticker?
If the discount is for example 25,2% or 25,8% I would like to show 25% instead in front office but still the price should be calculated based on 25,2 or 25,8% in back office.
Hi,
Please modify Prestashop core file \src\Adapter\Presenter\Product\ProductLazyArray.php, change “$presNegativeReduction” to “floor($presNegativeReduction)”, see the enclosed screenshot.
Best regards.
Thanks for your feedback. I did a research on floor() thanks to your suggestion. And I found the function ceil() wich is more correct for me as the discount is displayed in negative. With ceil(), -25,2 rounds to -25 with floor it rounds to -26 (because of the negative)