parent_category in import/export

  • Posts: 223
  • Thank you received: 1
13 years 1 month ago #32271

having a problem with categories...

i notice that when i export a list of products, the csv has a column named "parent_category" which is empty for all products.

what is this column for/do?

also, is there a way to remove products from a single category in bulk?

thanks

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

  • Posts: 83103
  • Thank you received: 13413
  • MODERATOR
13 years 1 month ago #32294

This column is for specifying the parent category of the categories of the product. But that column is optional. It's useful when you have two categories with the same name so that the system knows which one you're talking about.

Do you want to remove the products ? Or do you want to remove the link of these products to that category ?
If you want to remove the products of a category, it's easy, you can do that on the listing products with the delete button after selecting all the products of a category.
If you want to remove the link between them the easiest is to use phpmyadmin and run a query like that:
DELETE FROM jos_hikashop_product_category WHERE category_id=XX

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

  • Posts: 223
  • Thank you received: 1
13 years 1 month ago #32602

that is the problem i am running into....

example....i have a main category 181 whose parent is 2

181 has a sub of 182, which has a sub of 187

which one would go in the parent_category column?

thanks...

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

  • Posts: 83103
  • Thank you received: 13413
  • MODERATOR
13 years 1 month ago #32632

If your categories are already created, do not use the parent_category column and directly put the id of the category you want in the "categories" column.

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

  • Posts: 223
  • Thank you received: 1
13 years 1 month ago #32635

yeah, i figured that out.

unfortunately i have made a mess of my categories!

question...

if i upload a csv with corrected categories, will that overwrite the existing categories?

second question...

is it better to use category name or number when uploading products?

thanks!

oh...one more question...

i deleted some products due to this mess, can i upload them using the old product id number, or should i leave this column blank for these products when adding them back?

Last edit: 13 years 1 month ago by plumbingdeals.

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

  • Posts: 83103
  • Thank you received: 13413
  • MODERATOR
13 years 1 month ago #32659

No categories cannot be overwritten with the CSV import.

It's better to use the id, especially if you have several categories with the same name :)

The product_id will be ignored. However, if you set the product_code of your products in your CSV, the information of the products will be updated.

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

  • Posts: 223
  • Thank you received: 1
13 years 1 month ago #32661

i apologize, but now i'm a bit confused...

what then is the best way to recategorize a large number of products?
should i just delete them completely and start over, or is there a better way?

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

  • Posts: 83103
  • Thank you received: 13413
  • MODERATOR
13 years 1 month ago #32683

You can just create such CSV:

product_code,categories
my_prod1,18
my_prod2,20

That will reassign my_prod1 to the category 18 and the my_prod2 to the category 20

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

Time to create page: 0.063 seconds
Powered by Kunena Forum