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

#   mass action doesn't work as expected after using "process"

##

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

Less More

- Posts: 112
- Thank you received: 7
-
-

1 year 11 months ago [\#364414](#364414) by [karendunne](/forum/user/51903-karendunne "View karendunne's Profile")  *[mass action doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364414 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")* was created by *[karendunne](/forum/user/51903-karendunne "View karendunne's Profile")*

-- url of the page with the problem -- : [ antiqueswan.com/](https://antiqueswan.com/)
-- HikaShop version -- : 5.1.1
-- Joomla version -- : 5.2.1
-- PHP version -- : 8.2.25

Hello,

I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.

This is the same mass action that was discussed in this thread:
[ www.hikashop.com/forum/orders-management...s-automatically.html](https://www.hikashop.com/forum/orders-management/905416-remove-sold-items-automatically.html)

Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?

Thanks,

Karen

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86324
- Thank you received: 14286
-
-

1 year 11 months ago [\#364415](#364415) 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 doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364415 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")*

Hi,

Note that this mass action will only delete up to 10 (due to the "10" in the value field of the limitations section of your mass action) unpublished products each month.
If each month, you unpublish more than 10 products, then the unpublished products will start piling up.

Similarly, if you manually process the mass action, it will only delete up to 10 unpublished products. If you have hundreds of unpublished products, you might not notice that 10 of them have been deleted after the processing of the mass action.

On top of this, note that the mass action on the "product" type actually process both products and variants. So if you unpublish 100 variants of a product, then for just that product's variants to be processed by the mass action will require 10 months.

Because of all of this, I'm thinking that the mass action is actually working, but you just don't notice it because it's not processing enough products / variants often enough.

Also, you want to check that your cron task is running :
[ www.hikashop.com/support/documentation/5...cron-task.html#check](https://www.hikashop.com/support/documentation/55-hikashop-cron-task.html#check)
If the cron task is not running, then the mass action won't be called every month.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 112
- Thank you received: 7
-
-

1 year 11 months ago [\#364429](#364429) by [karendunne](/forum/user/51903-karendunne "View karendunne's Profile")  Replied by *[karendunne](/forum/user/51903-karendunne "View karendunne's Profile")* on topic *[mass action doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364429 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")*

OK, understood. Thank you for looking at it and providing the explanation. I'll make the adjustments so it performs the way I'd like it to.

One other related question: Is there a way to use a mass action to delete ONLY the images of an unpublished product? I'm trying to control the size of the site and it's the images that take all the bandwidth. It would be nice to still have a record of the unpublished products but eliminate their images.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86324
- Thank you received: 14286
-
-

1 year 11 months ago [\#364431](#364431) 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 doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364431 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")*

Hi,

There is no action available by default to delete the images of a product. However, you can use the "run PHP code" action with this code in order to do that: Code:

$fileClass = hikashop_get('class.file'); $fileClass-&gt;deleteFiles('product', {product_id});

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 112
- Thank you received: 7
-
-

1 year 11 months ago [\#364447](#364447) by [karendunne](/forum/user/51903-karendunne "View karendunne's Profile")  Replied by *[karendunne](/forum/user/51903-karendunne "View karendunne's Profile")* on topic *[mass action doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364447 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")*

I see what you mean. Thank you.

While I can make sense of php, I'm not a php developer. Does that code target only the unpublished products? I don't recognize anything that indicates it is for unpublished items.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86324
- Thank you received: 14286
-
-

1 year 11 months ago [\#364448](#364448) 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 doesn't work as expected after using "process"](/forum/44-mass-actions/908862-mass-action-doesnt-work-as-expected-after-using-process#364448 "-- url of the page with the problem -- :   antiqueswan.com/  -- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2.25  Hello,  I have a mass action set up to delete unpublished products each month. I recently discovered that it's not working. Please see attached screenshot to see the settings.  This is the same mass action that was discussed in this thread:   www.hikashop.com/forum/orders-management...s-automatically.html  Is this no longer set up correctly? Can you point me in a direction to determine a fix, please?  Thanks,  Karen")*

Hi,

No, this code targets the products filtered by the mass action.

So, you still want to have your filter on the product_published column in your mass action.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDg4NjItbWFzcy1hY3Rpb24tZG9lc250LXdvcmstYXMtZXhwZWN0ZWQtYWZ0ZXItdXNpbmctcHJvY2Vzcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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.118 seconds

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