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

#   Mass Action to filter if product has images

##

- **[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 4 weeks ago [\#217456](#217456) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Mass Action to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#217456 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4

Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?

Also would be interesting for non image files.

Thank you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUwLWZlYXR1cmUtcmVxdWVzdC84Nzk4ODMtbWFzcy1hY3Rpb24tdG8tZmlsdGVyLWlmLXByb2R1Y3QtaGFzLWltYWdlcz90bXBsPW1hcmtkb3du) 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 4 weeks ago [\#217480](#217480) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass Action to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#217480 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")*

Hi,

We already have that feature on our Todo list ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

4 years 7 months ago [\#340262](#340262) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Mass Action to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#340262 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")*

Hello,
Is there any news on this matter? I haven't found anything on the forum.
Would it be possible to make a sql query to be able to unpublish the products that do not have an assigned image? Thanks, best regard.

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

4 years 7 months ago [\#340263](#340263) 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 to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#340263 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")*

Hi,

You can use such MySQL query: Code:

UPDATE #__hikashop_product AS p LEFT JOIN #__hikashop_file as f on p.product_id = f.file_ref_id AND f.file_type='product' SET p.product_published = 0 WHERE f.file_id IS NULL;

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

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

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

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

4 years 7 months ago [\#340663](#340663) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[Mass Action to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#340663 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")*

Hello again Nicolas,

I don't know if I'm doing something wrong.
Although I put only main products in the filter, when the MySql qwery is executed, it also unpublishes all the variants, which do not have an image since they take it from the main product.
Could it be added to the MySql Query that only acts on main products?
Thank you very much.

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

4 years 7 months ago [\#340666](#340666) 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 to filter if product has images](/forum/50-feature-request/879883-mass-action-to-filter-if-product-has-images#340666 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Please could you add a filter in Mass Actions for which product would be selected or not depending on the fact they already have images assigned?  Also would be interesting for non image files.  Thank you.")*

Hi,

Yes. In that case, you can use this MySQL query: Code:

UPDATE #__hikashop_product AS p LEFT JOIN #__hikashop_file as f on p.product_id = f.file_ref_id AND f.file_type='product' SET p.product_published = 0 WHERE f.file_id IS NULL AND p.product_type='main';

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

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

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