Mass add products to categories

  • Posts: 98
  • Thank you received: 2
11 years 9 months ago #89641

Is there a way to quickly add particular products to the categories? I now have 600+ products and the number will increase. If the HikaShop backend doesnt provide this feature, maybe I can edit some MySQL stuff? For example, there is a MySQL table which is responsible for the category, and there there list a list of products IDs which are added to this category.

So, maybe I can just fill in the IDs I want and that should be it? The only question is to find this MySQL table, or it is not that simple?

You know, adding products in categories 1 by 1 is extremely boring and monotonous. There gotta be a quicker way.

Well. I found this table:

fpcbr_hikashop_category

But as far as I can see, there is no field that concerns the products ID's that are included in the cateogry. I was adding new products to the category, but nothing changed in this table at all.

I found another one:
fpcbr_hikashop_product_category

As far as I understand, its a MySQL table responsible for list of products. There are 4 fields there:
"product_cateogry_id" , "product_id", "category_id" and "ordering"

The category_id field is responsible for the product's category. Well, again see no way of mass adding, since you have to edit this number by your hands 1 by 1 in each product, like in the back-end


Such a pity. =(

Last edit: 11 years 9 months ago by Shulha.

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

  • Posts: 2334
  • Thank you received: 403
11 years 9 months ago #89674

One solution would be to use the the export and import function of Hikashop.
You then just have to handle your csv file and import it each time you want to update your base.
The category adding is quite easier there since you just have to add the name of the category to the given products.

However, the SQL option is a solution. But you'll have to use request to create new entries in the table product_category since this one define the links between products and categories.

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

  • Posts: 98
  • Thank you received: 2
11 years 9 months ago #89683

The category adding is quite easier there since you just have to add the name of the category to the given products.


But this means that I have to do the following:
1) Go to the product-listing back-end menu
2) Click on the product
3) Click to add the category
4) Click on the desired category
5) Click "OK"
6) And then only click "Save and Exit"

thats 6 steps for one product. Of course I can do that. But is this really the only way?


---
SQL requests seem to be a nice solution.

Last edit: 11 years 9 months ago by Shulha.

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

  • Posts: 82796
  • Thank you received: 13356
  • MODERATOR
11 years 9 months ago #89685

You can use the hikashop_product_category table for now to add the products (you can mass import a CSV of the columns (do a CSV export of the table in phpmyadmin to see the format).

We already have high in our todo list a point to create a mass action system in HikaShop. I should be available in a few months.

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

  • Posts: 98
  • Thank you received: 2
11 years 9 months ago #89689

thanks for the explanations. will try.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum