Only when valid code entered is allowed to register for the event

  • bumble
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 7 months ago #158600 by bumble
I would like to set it such as only users with a valid code is allowed to register for the event.
Anyone with this code can use it.
Only able to use this code 1 time.

Was trying to use the coupon code but it is not a required field & also appears only in the payment info & this is a free event.
Is there a way to do this?
Your advice would be very appreciated. Thank you!

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #158601 by Tuan Pham Ngoc
Hi

There is no built-in feature which can be used to handle this requirement. In this case, the only way is customize code of the extension to use coupon solution which you mentioned

Tuan

Please Log in or Create an account to join the conversation.

  • bumble
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 7 months ago #158602 by bumble
Thank you for your reply..
I should be able to work around the current functionality...
All I will need to figure out is how to make the coupon field a required field.
Can you let me know how to do this please?

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #158609 by Tuan Pham Ngoc
Hi

If you have coupon code field show on the form already, you can edit code in the file components/com_eventbooking/themes/default/register/register_payment_amount.php , change code to:
Code:
<input type="text" class="<?php echo $inputMediumClass; ?> form-control validate[required]" name="coupon_code" id="coupon_code" value="<?php echo $this->escape($this->input->getString('coupon_code')); ?>" onchange="<?php echo $onCouponChange; ?>" />

The added validate[required] will make coupon code become required

Please remember to move the modified file to template override PATH_TO_TEMPLATE/html/com_eventbooking/register folder so that the change won't be lost when you update Events Booking

Tuan
The following user(s) said Thank You: bumble

Please Log in or Create an account to join the conversation.