diff --git a/src/Adapter/Presenter/Product/ProductLazyArray.php b/src/Adapter/Presenter/Product/ProductLazyArray.php index 95eae701..ab1e2a1e 100644 --- a/src/Adapter/Presenter/Product/ProductLazyArray.php +++ b/src/Adapter/Presenter/Product/ProductLazyArray.php @@ -461,9 +461,15 @@ class ProductLazyArray extends AbstractLazyArray if ($show_price && $this->product['reduction']) { if ($this->product['discount_type'] === 'percentage') { + $discountLabel = $this->product['discount_percentage']; + $num = floatval(str_replace(',', '.', preg_replace('/[^0-9,.-]/', '', $discountLabel))); + $rounded = round($num); + $discountLabel = sprintf('-%d%%', abs($rounded)); + $flags['discount'] = [ 'type' => 'discount', - 'label' => $this->product['discount_percentage'], + // 'label' => $this->product['discount_percentage'], + 'label' => $discountLabel, ]; } elseif ($this->product['discount_type'] === 'amount') { $flags['discount'] = [