[Skip to main content](#vessel-content)

#   To force saving related triggers

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

9 years 11 months ago [\#258290](#258290) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[To force saving related triggers](/forum/32-content-creation/888051-to-force-saving-related-triggers#258290 "-- 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?")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODg4MDUxLXRvLWZvcmNlLXNhdmluZy1yZWxhdGVkLXRyaWdnZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

9 years 11 months ago [\#258296](#258296) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[To force saving related triggers](/forum/32-content-creation/888051-to-force-saving-related-triggers#258296 "-- 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?")*

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-&gt;trigger('onBeforeProductCreate', array( &amp; $element, &amp; $do) ); if(!$do) return false; // your code to store the data $dispatcher-&gt;trigger( 'onAfterProductCreate', array( &amp; $element ) );

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODg4MDUxLXRvLWZvcmNlLXNhdmluZy1yZWxhdGVkLXRyaWdnZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.045 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
