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

#   Mass action filters

##

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

Less More

- Posts: 240
- Thank you received: 13
-
-

3 years 9 months ago [\#349036](#349036) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  *[Mass action filters](/forum/44-mass-actions/905851-mass-action-filters#349036 "-- HikaShop version -- : 4.7 -- Joomla version -- : 4.2.7 -- PHP version -- : 8.1  hi i tried to create a mass action but i didnt managed to i use mass actions to run a php script to send a sms message to customers when an order is created or updated.  now i want to create a mass action to run that script when an item is deleted from order. supose that the order has 5 items and admin deletes one of the products called &quot;XXX&quot;  I dont know how to get the name &quot;XXX&quot; of that specific product in my php script. can you help me with that ?")* was created by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")*

-- HikaShop version -- : 4.7
-- Joomla version -- : 4.2.7
-- PHP version -- : 8.1

hi
i tried to create a mass action but i didnt managed to
i use mass actions to run a php script to send a sms message to customers when an order is created or updated.

now i want to create a mass action to run that script when an item is deleted from order. supose that the order has 5 items and admin deletes one of the products called "XXX"

I dont know how to get the name "XXX" of that specific product in my php script. can you help me with that ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDU4NTEtbWFzcy1hY3Rpb24tZmlsdGVycz90bXBsPW1hcmtkb3du) 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: 86584
- Thank you received: 14325
-
-

3 years 9 months ago [\#349038](#349038) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mass action filters](/forum/44-mass-actions/905851-mass-action-filters#349038 "-- HikaShop version -- : 4.7 -- Joomla version -- : 4.2.7 -- PHP version -- : 8.1  hi i tried to create a mass action but i didnt managed to i use mass actions to run a php script to send a sms message to customers when an order is created or updated.  now i want to create a mass action to run that script when an item is deleted from order. supose that the order has 5 items and admin deletes one of the products called &quot;XXX&quot;  I dont know how to get the name &quot;XXX&quot; of that specific product in my php script. can you help me with that ?")*

Hi,

I suppose you'll want to use the same trigger "After an order has been updated" in your mass action.
In your action's code, you could look at the values in $_REQUEST.
There, you'll find the controller with the key "ctrl", the task with the key "task", etc
I would recommend you start with this PHP code in your mass action: Code:

&lt;?php var_dump($_REQUEST);

That way, you'll get a list of all the data passed by the browser to the server when an order is being modified and you can then adapt your code to get the information you need for your checks etc.
For example, when a product is deleted from an order, the ctrl key will have the value "order", the task key will have the value saveproduct. Then, you'll have Code:

$_REQUEST['data']['order']['product']['order_product_id']

with the order_product_id of the product being deleted and you also need to check that Code:

$_REQUEST['data']['order']['product']['order_product_quantity']

is set to 0. If it's not 0, then the quantity of the product might be changing (or not).

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

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

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

Less More

- Posts: 240
- Thank you received: 13
-
-

3 years 9 months ago [\#349065](#349065) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[Mass action filters](/forum/44-mass-actions/905851-mass-action-filters#349065 "-- HikaShop version -- : 4.7 -- Joomla version -- : 4.2.7 -- PHP version -- : 8.1  hi i tried to create a mass action but i didnt managed to i use mass actions to run a php script to send a sms message to customers when an order is created or updated.  now i want to create a mass action to run that script when an item is deleted from order. supose that the order has 5 items and admin deletes one of the products called &quot;XXX&quot;  I dont know how to get the name &quot;XXX&quot; of that specific product in my php script. can you help me with that ?")*

this was exactly the code i was looking for.

thank you very much

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

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