Mass action export product with variants with filter manufacturer_id

  • Posts: 344
  • Thank you received: 3
7 years 4 months ago #256525

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 7

When I use Mass action to export products with variants into a csv. Using the filters Product type: "all" and 2nd filter product manufacturer_id it only export the main products and NOT include the variants.

Please see the Mass action settings I use on image below.



Note: If I keep using filter: Product type: "all" and as 2nd filter switch to Category columns: Cantegory_id. It works fine and export main products with all variants.

But It does not work when I use manufacturer_id as 2nd filter.

Any advice ?

Attachments:

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
7 years 4 months ago #256529

Hi,

That's normal.
The filter product type set to all is actually useless.
So whether you remove it or keep it in your mass actions it won't change anything.

The thing is that the product_manufacturer_id column is only filled for the main product, not for variants.
So you can't have variants as results if you add a filter on that column since it's always equal to 0 for all the variants.

You would have to run such MySQL query in your database to set the value from the main product to the variants:
UPDATE #__hikashop_product as parent, #__hikashop_product as variant SET variant.product_manufacturer_id = parent.product_manufacturer_id WHERE product.product_id = variant.product_parent_id AND variant.product_parent_id != 0

(replace #__ by your table prefix)

And then your mass action will work.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum