Hi,
This happens because com_ajax uses a normal trigger, and to use a normal trigger Joomla does this:
- First, it loads all the plugins of the target group
- Then, it calls the trigger on all the plugins of the target group which implements the trigger
The issue you have is then caused by two things:
- We assumed that plugins from the "hikashop" group would only be loaded by HikaShop (or another of our extensions), which means that we assumed that HikaShop would always be already loaded when plugins of the "hikashop" group would be loaded.
- In that mass action plugin, hikashop_get is called directly in the constructor of the class (so directly when the plugin is loaded, and not only when a trigger is called.
We'll look in adding some code on our end to avoid such issue.
Note also that HikaShop actually has it's own system to allow plugins to be called in ajax (and actually much more). Our system will allow the plugin to have its own controllers and views so you could build complete frontend and backend interfaces from only a plugin with that.
I invite you to look at the plugins/hikashop/email_history/ plugin for an example. This plugins handles the Customers>Email history menu item in the backend. The controller and the views of that area are completely in that plugin and the code is not complex so it's a good example.