Mass Action to filter if product has images

  • Posts: 634
  • Thank you received: 16
8 years 6 months ago #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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
8 years 6 months ago #217480

Hi,

We already have that feature on our Todo list :)

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
2 years 1 month ago #340262

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 or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 1 month ago #340263

Hi,

You can use such MySQL query:

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

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
2 years 2 weeks ago #340663

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 or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 2 weeks ago #340666

Hi,

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

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum