Trying to override Admin EventbookingModelCommonEvent store

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 days 18 hours ago #172737 by Jeff Dun
Hi,
i'm trying (unsuccessfully) to override the store function in administrator/components/com_eventbooking/model/common/event.php, as its not sending mail to superusers 
            if (MailHelper::isEmailAddress($eventCreator->email) && !$eventCreator->authorise('core.admin'))
                 EventbookingHelper::callOverridableHelperMethod('Mail', 'sendEventApprovedEmail', [$row, $config, $eventCreator]);
and i'd like it to!

I've tried creating a event.php under administrator/components/com_eventbooking/model/override but I haven't been able to get it to work.
What should i be overriding?
admin EventbookingModelEvent, or EventbookingModelCommonEvent (which the site model seems to extend?)
If its the common event, do i need to do it under a model/common/override folder?
Thanks
Jeff

 

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

More
6 days 17 hours ago #172738 by Tuan Pham Ngoc
Hi Jeff

You cannot override EventbookingModelCommonEvent . Please override the EventbookingModelEvent class instead and it will be fine

Regards,

Tuan

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

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 days 17 hours ago #172740 by Jeff Dun
Got it working - had to override in Site rather than in admin.
Thanks
Jeff

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

More
6 days 6 hours ago #172746 by Tuan Pham Ngoc
Great. I'm glad you got it working

Regards,

Tuan

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