How to add a custom catalog promotion action?
1. Create the Price Calculator Service
Service Registration
# config/services.yaml
services:
App\Calculator\FixedPriceCalculator:
tags:
- { name: 'sylius.catalog_promotion.price_calculator', type: 'fixed_price' }FixedPriceCalculator Class
2. Build the Admin Configuration Form
Service Registration
FixedPriceConfigurationType Form
ChannelBasedFixedPriceActionConfigurationType Form
3. Configure Translations
Add Translation for Action Type
4. Custom Validation (Optional)
✅ Result


Last updated
Was this helpful?
