Skip to main content

Mass Action to filter if product has images

11 years 4 weeks ago #217456 by PeterChain
-- 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.

11 years 4 weeks ago #217480 by Xavier
Hi,

We already have that feature on our Todo list :)

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

4 years 7 months ago #340262 by dvddvd
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.

4 years 7 months ago #340263 by nicolas
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

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

4 years 7 months ago #340663 by dvddvd
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.

4 years 7 months ago #340666 by nicolas
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

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

Time to create page: 0.066 seconds
Powered by Kunena Forum