Payment Form OSB Voucher Plugin

The Payment Form - OS Services Booking Voucher plugin (plug_pmform_osbvoucher, group pmform) lets customers pay for a form created with the Payment Form (com_pmform) extension and automatically receive a coupon code for OS Services Booking by email once the payment is completed.

Requirements

  • Joomla 4.x / 5.x
  • Payment Form (com_pmform) and OS Services Booking (com_osservicesbooking) installed
  • The plugin is located in third_party/plug_pmform_osbvoucher. Zip the folder, install it via System -> Install -> Extensions and publish it.

Parameters

Parameter Description
Number Days Number of days the coupon is valid. Start Date is the time the payment is completed and Expiry Date is Start Date + Number Days. Leave empty for no expiry.
Discount Type Percentage or Fixed amount.
Percentage discount amount Percentage discount of the coupon (used when Discount Type is Percentage).
Fixed amount When Discount Type is Fixed amount, the discount equals the amount the customer paid in the payment form.
Max total use Maximum number of times the coupon can be used (0 = unlimited).
Voucher Receive Email Field The form field (Text/Email) that contains the email of the person who receives the voucher.
Voucher Notification Email Subject Subject of the email sent to the receiver.
Voucher Notification Email Body Body of the email sent to the receiver.

Email tags

Besides the standard Payment Form tags, these tags can be used in the subject and body:

  • [VOUCHER_CODE] - the generated coupon code
  • [VOUCHER_AMOUNT] - discount amount (percentage or fixed amount)
  • [VOUCHER_START_DATE] - coupon start date
  • [VOUCHER_VALID_TO] - coupon expiry date
  • [VOUCHER_TIMES] - max total use

How it works

When a payment is completed, the plugin creates a published coupon in Components -> OS Services Booking -> Coupons (named PMForm Payment #<payment id>, so only one coupon is created per payment) and emails the code to the address entered in the selected field. The customer can then use the code when booking services.