I have developed an extension for opencart and I have added an event using 'addEvent' method. The event is triggering properly but the issue is that upon uninstalling the extension I am getting some fatal error . this is the error I am getting "Fatal error: Uncaught Error: Call to a member function deleteEventByCode() on null"
My uninstall function is
public function uninstall() {
$this->load->model('setting/event');
$this->model_settings_event->deleteEventByCode('EVENTCODE');
}
Any help will be much appreciated
My uninstall function is
public function uninstall() {
$this->load->model('setting/event');
$this->model_settings_event->deleteEventByCode('EVENTCODE');
}
Any help will be much appreciated
Well, no wonder.
It should be:
(1 s too much)
It should be:
Code: Select all
$this->model_setting_event->deleteEventByCode('EVENTCODE');
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Error message usually tells you, what's wrong. In your case the model (class) wasn't properly called and initiated.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
No, not correct.
He called the model correct with:
Code: Select all
$this->load->model('setting/event');
Code: Select all
$this->model_settings_event->deleteEventByCode('EVENTCODE');
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 15 guests