Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page


Responsible for creating form for price reduction

Type options

Option Type Default value Description

Code example

$builder->add('reduction', PriceReductionType::class, [
    'constraints' => [
        new Reduction([
            'invalidPercentageValueMessage' => $this->translator->trans(
                'Reduction value "%value%" is invalid. Allowed values from 0 to %max%',
                ['%max%' => ReductionVO::MAX_ALLOWED_PERCENTAGE . '%'],
            'invalidAmountValueMessage' => $this->translator->trans(
                'Reduction value "%value%" is invalid. Value cannot be negative',