Import assumes unique category

  • Posts: 113
  • Thank you received: 18
11 years 4 months ago #80999

It appears that the import (and export) assumes that all category names throughout the hierarchy are unique.
For product sites, this assumption seems too limiting, and in my view...flawed.

For example, we group products by their type into categories for presentation on the front-end.
One product type we offer is "Flags", another is "Windless Flags". The intended use, cost and prospective customers are unique, so this type of grouping is needed.

Within each of these categories are child categories for the applicable industries as shown below:

Flags
-> Automotive Repair
-> Car Sales
-> Food Service

Windless Flags
-> Automotive Repair
-> Car Sales
-> Food Service

The export does not create a fully-qualified path in the hierarchy. For example, the categories column exported might contain "Car Sales", which could apply to either parent, "Flags" or "Windless Flags".

When I assign categories, export, then import, all flags that were in "Windless Flags \ Car Sales" are moved to "Flags \ Car Sales".

To the point, it would seem that the export and import should reference a fully-qualified category, rather than assume that all children within the category hierarchy are unique.

Last edit: 11 years 4 months ago by csymmonds.

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

  • Posts: 81566
  • Thank you received: 13075
  • MODERATOR
11 years 4 months ago #81308

In the import, you can specify both a categories column, where you can specify the name of the category and the parent_category where you can specify the name of the parent category. That way, you can avoid the case where you have twice the same child category in two different categories.
Of course, instead of the category name, you can also specify in the categories field the namekey of the category (which is unique for each category) or the id of the category (which is of course also unique) and thus avoid any mistake with the import.

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

  • Posts: 113
  • Thank you received: 18
11 years 4 months ago #81312

Thanks Nicolas.
The namekey sounds like the best approach since the parent category name could potentially exist elsewhere in a category hierarchy.

The parent_category for products isn't being exported.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum