- Posts: 21
- Thank you received: 0
plugin events
- Francesco Reitano
- Topic Author
- Offline
- Junior Member
Less
More
6 years 10 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
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
6 years 9 months 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
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
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.