Skip to main content
Custom discount types can be registered to add additional discount logic beyond the built-in types.

Overview

If you want to add additional functionality to Discounts, you can register your own custom discount types.

Registering a discount type.

Adding form fields for your discount in the admin panel

If you require fields in the Lunar admin for your discount type, ensure your discount implements Lunar\Admin\Base\LunarPanelDiscountInterface. You will need to provide the lunarPanelSchema, lunarPanelOnFill and lunarPanelOnSave methods.