feat: promotional and purchase vouchers
This commit is contained in:
@@ -504,6 +504,30 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
},
|
||||
];
|
||||
|
||||
// Purchase voucher field provider - redemption code for vouchers that apply to complete booking
|
||||
// Collected from all participants and aggregated into single <gutscheine> collection in booking payload
|
||||
$this->fieldOptionProviders['purchaseVoucherCode'] = fn (BookingDto $bookingDto, int $participantIndex, array $options = []) => [
|
||||
'label' => 'Gutschein-Einlösecode',
|
||||
'required' => false,
|
||||
'attr' => [
|
||||
'placeholder' => 'z.B. 1F7V6PADRZ',
|
||||
'maxlength' => 50,
|
||||
],
|
||||
'sanitize_html' => true,
|
||||
];
|
||||
|
||||
// Promo voucher field provider - promo code applied per participant in booking payload
|
||||
// Included in participant XML node as <aktionscode>
|
||||
$this->fieldOptionProviders['promoVoucherCode'] = fn (BookingDto $bookingDto, int $participantIndex, array $options = []) => [
|
||||
'label' => 'Aktionscode',
|
||||
'required' => false,
|
||||
'attr' => [
|
||||
'placeholder' => 'z.B. LW0705',
|
||||
'maxlength' => 50,
|
||||
],
|
||||
'sanitize_html' => true,
|
||||
];
|
||||
|
||||
// Future field providers would be added here, for example:
|
||||
//
|
||||
// $this->fieldOptionProviders['mealPreference'] = fn($bookingDto, $participantIndex) => [
|
||||
|
||||
Reference in New Issue
Block a user