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

#   update database when product number decrease

##

- **[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")**
- [![lionel75's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11856-lionel75 "View lionel75's Profile") Topic Author
- [ Offline](/forum/user/11856-lionel75)

Less More

- Posts: 846
- Thank you received: 92
-
-

11 years 7 months ago -  11 years 7 months ago [\#197509](#197509) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  *[update database when product number decrease](/forum/31-development/876204-update-database-when-product-number-decrease#197509 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.8 -- PHP version -- : 5.5.8  Which is the best way to update some data in the table when a product has been buy and we want that event launch a php file to modify some data ? The mass action documentation say that mass action can be use after a product has been create . Does this occur automaticly ? Does it mean we can when a product has been buy use/call wit h dynamic parameter ( product properties) a precreate a php file ( I think it is a module ) that ll launch mass action ?  Does Mass action can be a handwriting php file instead create it using the mass action GUI backend ? Does the file generate by mass action is declarative or is a php file ?  I have some clue about the anwsers but ask to have confirmation . I think HKS and joomla are great for developper when need custom extension . regard's")* was created by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 2.5.8
-- PHP version -- : 5.5.8

Which is the best way to update some data in the table when a product has been buy and we want that event launch a php file to modify some data ?
The mass action documentation say that mass action can be use after a product has been create . Does this occur automaticly ? Does it mean we can when a product has been buy use/call wit h dynamic parameter ( product properties) a precreate a php file ( I think it is a module ) that ll launch mass action ?

Does Mass action can be a handwriting php file instead create it using the mass action GUI backend ? Does the file generate by mass action is declarative or is a php file ?

I have some clue about the anwsers but ask to have confirmation . I think HKS and joomla are great for developper when need custom extension .
regard's

Last edit: 11 years 7 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NjIwNC11cGRhdGUtZGF0YWJhc2Utd2hlbi1wcm9kdWN0LW51bWJlci1kZWNyZWFzZT90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

11 years 7 months ago [\#197524](#197524) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[update database when product number decrease](/forum/31-development/876204-update-database-when-product-number-decrease#197524 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.8 -- PHP version -- : 5.5.8  Which is the best way to update some data in the table when a product has been buy and we want that event launch a php file to modify some data ? The mass action documentation say that mass action can be use after a product has been create . Does this occur automaticly ? Does it mean we can when a product has been buy use/call wit h dynamic parameter ( product properties) a precreate a php file ( I think it is a module ) that ll launch mass action ?  Does Mass action can be a handwriting php file instead create it using the mass action GUI backend ? Does the file generate by mass action is declarative or is a php file ?  I have some clue about the anwsers but ask to have confirmation . I think HKS and joomla are great for developper when need custom extension . regard's")*

Hi,

I don't think that there is a need to use mass actions for what you want to do.
Simply create a plugin of the group "hikashop" and implement the "onAfterOrderUpdate" trigger. Check the $order-&gt;order_status variable and the $order-&gt;old-&gt;order_status variable so that the new one is confirmed and the old one is created and you'll know that the order has just been confirmed. At that point, just run your PHP and do whatever you need to.

The following user(s) said Thank You: [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")

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

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