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

#   Force onBeforeProductUpdate() with mass action

##

- **[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
-
-

11 years 8 months ago [\#193836](#193836) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Force onBeforeProductUpdate() with mass action](/forum/32-content-creation/875527-force-onbeforeproductupdate-with-mass-action#193836 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5  I created a plugin that triggers when onBeforeProductUpdate(&amp;$element,&amp;$do)  and I want to apply it massively to my 500 products without having to open them all and saving them+  I tried with mass actions by changing the value of a dummy field but looks like the changes are applied to the field without executing a whole update process.  How can I force the execution in mass actions of an update as it was made from the user?")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5

I created a plugin that triggers when onBeforeProductUpdate(&amp;$element,&amp;$do)

and I want to apply it massively to my 500 products without having to open them all and saving them+

I tried with mass actions by changing the value of a dummy field but looks like the changes are applied to the field without executing a whole update process.

How can I force the execution in mass actions of an update as it was made from the user?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 8 months ago [\#193865](#193865) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Force onBeforeProductUpdate() with mass action](/forum/32-content-creation/875527-force-onbeforeproductupdate-with-mass-action#193865 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5  I created a plugin that triggers when onBeforeProductUpdate(&amp;$element,&amp;$do)  and I want to apply it massively to my 500 products without having to open them all and saving them+  I tried with mass actions by changing the value of a dummy field but looks like the changes are applied to the field without executing a whole update process.  How can I force the execution in mass actions of an update as it was made from the user?")*

Hi,

When using the "Before a product is updated" trigger in the mass actions, it will affect only the product which will be updated, no the other ones.

So to update whole product values, it will require to execute a mass action manually.

Else, in your plugin, you have to execute a MySQL query in order to update all the products when one is updated.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODc1NTI3LWZvcmNlLW9uYmVmb3JlcHJvZHVjdHVwZGF0ZS13aXRoLW1hc3MtYWN0aW9uP3RtcGw9bWFya2Rvd24=) 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.044 seconds

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