- Importing with separate fields per category and subcategory
- Importing with the same field for category and subcategory
- Removing all existing categories from a product.
Our import tools provide several methods of importing Categories to your OpenCart store. Categories are imported by name, not by category ID.
If a category from your CSV or XML file does not already exist in your OpenCart store, it will be created.
If it already exists, and the name of the category in your store matches exactly the name in your CSV or XML file, then the existing category will be used.
If you find your categories are being duplicated, check to see that there are no extra spaces in the category column of your product file.
Each top level category can also have unlimited sub categories. An example of a sub category from "accessories" would be "wristwatches".
Categories and sub categories can be mapped in one of two ways.
You would use this method if your categories each have their own separate field. You can see in the example below, the field that contains 'cat1' is the top level category (i.e. "Office"). 'Cat2' is a subcategory (i.e. "Hardware"), and 'cat3' is a subcategory again (i.e. "Laptops").
To import these as a chain in the correct order (Office > Hardware > Laptops), you would use the mapping below.
This image is taken from the CSV Import PRO, but the take-home point is that subcategories are mapped horizontally. This is the same for the Total Import PRO.
In the next example, these fields marked 'cat1', 'cat2' and 'cat3' are each separate "equal" top-level categories (that is, cat2 is not a subcategory of cat1). They would all be applicable to the same product.
In this case, we want to keep these as three separate top level categories. This would be mapped as follows.
Multiple top level categories are mapped vertically.
If we had multiple top level and subcategories, it is possible to map these using a combination of the vertical and horizontal mappings.
You would use this method if your category and subcategory structure is contained in a single column and separated by a consistent delimiter (in this case, you will see we have used the character ">" as a delimiter).
You can import this structure as category and subcategories using the Category Delimiter field.
This field is supported by all of our product import tools, including XML Import PRO.
Here is an example of a CSV file which uses a category delimiter to separate its categories and subcategories.
Here, the import tools will use the delimiter to separate each category and subcategory into separate entities for import.
Note: Be careful of spaces between words! These can cause your categories to appear as duplicates. If there are spaces either side of your delimiter, you will need to express this in your Category Delimiter selection.
For example, if your category field looks like:
Office > Hardware > Laptops
as opposed to
Then you need to set your delimiter to ' > ' rather than just '>'.
You can only use vertical expansions if you input a category delimiter. The use of a category delimiter then renders any horizontal subcategory "mappings" in other separate fields redundant. The import tools will therefore ignore all horizontal expansions.
Categories can be removed from a product by mapping an empty "category" field in our module.
If you map the category "cat1", and "cat1" has no data in it, the import tool will remove the product's existing categories.
If you map "cat1" and "cat1" does have a category in it, then the import tool will replace all existing categories with the ones that you have mapped.
You can do this with most fields, and it works the same way. Mapping a field as empty or blank in the module, will cause it to be removed.