Group booking - group members must have the correct membership level - possible?

  • Roy Chappell
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #140780 by Roy Chappell
Hi

I'm building a website for a Dive center. To book a place on a dive boat the person must have purchased a boat bond. We have this part working using the Access & Registration Access settings and creating a boat bond membership in Membership Pro.

We would like to have this function in the group booking process. However, all in the group must also hold a boat bond. Can the system check if the other people in the group hold a boat bond? Or perhaps even better display a list of boat bond holders to select from? 

Or can you think of another solution?

thanks for any thoughts
Roy

 

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

More
3 years 3 months ago #140799 by Tuan Pham Ngoc
Hello Roy

We do not require username for each group member, so I'm afraid of it is hard

Assume that you collect email of group member, if so, how to check if that group member hold a boat bond as you said?

If there is clear instruction, customization could be performed (of course with some fees) to handle that requirement

Tuan

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

  • Roy Chappell
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 2 months ago #141319 by Roy Chappell
Hi

Is it possible to restrict access to Group Booking to a certain access level?

Currently the public can see the event listing, those that have a 'Boat Bond Holder' access level can see the Book button. We then want the Group Book button to be only visible to people that have the new access level 'Group Boat Bond Holder'.

Is there some code I can add to common/events_table.php to only show the Group Book button to those of a certain access level. I don't mind hard coding the access level required

thanks
Roy

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

More
3 years 2 months ago #141320 by Tuan Pham Ngoc
Currently, the code is:
Code:
if ($groupRegistrationAvailable && ($item->registration_type == 0 || $item->registration_type == 2) && !$config->multiple_booking && !$item->has_multiple_ticket_types)

Change it to
if ($groupRegistrationAvailable && in_array(8, JFactory::getUser()->getAuthorisedViewLevels()) && ($item->registration_type == 0 || $item->registration_type == 2) && !$config->multiple_booking && !$item->has_multiple_ticket_types)
[/code]

Of course, you need to replace 8 in the code above with ID of the access level you want to allow group registration

Tuan
The following user(s) said Thank You: Roy Chappell

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

  • Roy Chappell
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 2 months ago #141325 by Roy Chappell
Hi Tuan

thanks, works perfectly

have a good weekend
Roy

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

More
3 years 2 months ago #141328 by Tuan Pham Ngoc
Great. Happy to hear that it works as expected

Have a nice weekend

Tuan

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

Moderators: Tuan Pham Ngoc