Skip to main content

To force saving related triggers

More
9 years 9 months ago #258290 by PeterChain
-- HikaShop version -- : 3.6.4
-- Joomla version -- : 3.6.5

I build an alternative method of editing products for a very certain procedure so I edit some fields from the product list via a from.

When the changes are saved the update related triggers are not called probably because my coder is notusing a standar HikaShop saving method.

Is there a way to force those triggers related with a saving process to be called?

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

More
9 years 9 months ago #258296 by nicolas
Hi,

Sure. You can just use the same code that is used in the save function of the class.product file so that it triggers the triggers the same way:
Code:
JPluginHelper::importPlugin('hikashop'); $dispatcher = JDispatcher::getInstance(); $do = true; $dispatcher->trigger('onBeforeProductCreate', array( & $element, & $do) ); if(!$do) return false; // your code to store the data $dispatcher->trigger( 'onAfterProductCreate', array( & $element ) );
The following user(s) said Thank You: PeterChain

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

Time to create page: 0.135 seconds
Powered by Kunena Forum