Sitebuilder +

Case study 5: Importing store categories

This article is part of the catalog import and export section and tells you how to manage your store categories in bulk with a CSV file.

You can import both new root categories and subcategories, and you can also update the categories that already exist in your store.

In this section, you’ll learn how to import new categories into your store.

Let’s say you want to import two categories:

  • A new root category “New arrivals” that must be enabled and has a “This season's newest arrivals” description. This category also has an image.
  • A new subcategory “Dresses” that is added to a root “Women’s apparel” category. You want the "Dresses" category to be disabled and have no image.
You can compile your file in any spreadsheet editor (or in a plain text editor). In our example, we’ll use Google Sheets.

To create an import file:

  1. Open your spreadsheet editor.
  2. Enter “type” in the first cell. Then enter “category” in the row below it:

    Import categories.png

    Now you’ve specified that the second row is about a store category (and not a product or a product file).
  3. In the next column, enter “category_path” and the path to the first category – “New arrivals” – as its value for the “category” row:

    Catalog import case studies (26).png

    It’s a root category, so the path to it in your store corresponds to its name.
  4. Then add the “category_is_available” column to the file header and “TRUE” as its value for the “category” row:

    Catalog import case studies (20).png

    This way, you specify that this category is enabled.
  5. Next, similarly, add “category_description” and enter “This season's newest arrivals”.
  6. Then add the “category_image” column to the file header and enter the link to this image on the web (in our example, it’s https://d2j6dbq0eux0bg.cloudfront.net/images/37497010/2950331322.jpg).
  7. Congrats! You have entered all the data you need for the “New arrivals” category.
    Now add a new “category” row. It will be dedicated to the “Dresses” subcategory:

    Catalog import case studies (25).png

  8. In the “category_path” column, enter the path to this subcategory – “Women’s apparel/Dresses”. This way, you specify that the “Dresses” category is placed inside the root “Women’s apparel” category.
    If categories/subcategories from the subcategory path do not exist in your store, they will be created automatically after import. If they already exist, the subcategory will simply be added into them.
  9. In the “category_is_available” column, enter “FALSE”. This way, you specify that this subcategory must be disabled.
  10. Now save/download the file as .csv to your device. In Google Sheets, you can do it by going to File → Download → Comma Separated Values (.csv)

That’s it! You’ve compiled an import file for two store categories: “New arrivals” and “Dresses” (you can find the “store_categories” file in the article attachments):

Catalog import case studies (36).png

After you upload this file on the Catalog → Data Import & Export page, categories will be added to your store. Here’s how they will look on the Catalog → Categories page in your store admin:

Categories (1).gif

Refresh the page to see the changes.

Now you can choose any categories from your catalog and follow these instructions step by step to compile your own CSV file.

See the list of available category columns

If later you need to update your categories, you can do it by importing a new file with data. In this file, “category_path” and/or “category_internal_id” columns must be present along with the columns for category attributes that you want to update.

Was this article helpful?
0 out of 0 found this helpful