plugin events

  • Francesco Reitano
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #109608 by Francesco Reitano
plugin events was created by Francesco Reitano
Hi, I'm studying your code, I found that you entered only two events. But, is it possible add other events (i can change your code, but I'd rather not have problems with updates), for examples:
to add product:
file components\com_eshop\helpers\cart.php function add()
JPluginHelper::importPlugin('eshop');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onAddProduct', array($key, $quantity));


Other question: you trigger event just from eshop folder, os it possible add other like system?
For example:
JPluginHelper::importPlugin('eshop');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterStoreOrder', array($orderRow));

to
JPluginHelper::importPlugin('eshop');
JPluginHelper::importPlugin('system');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterStoreOrder', array($orderRow));

thanks
:)

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

  • Giang Dinh Truong
  • Offline
  • Administrator
  • Administrator
More
6 years 1 month ago #109997 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic plugin events
Hello Francesco,

Thank you for suggesting these. I think they are useful. I will check more and add these into the next versions of EShop.

Sincerely, Giang

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

Moderators: Giang Dinh Truong