Import Category Replace for Magento 2 — Replace Product Categories on Import

SKU: AGENTIC-IMPORTCATEGORYREPLACE
In Stock

Magento’s native product Add/Update import appends categories — it adds the ones in your spreadsheet and never removes the old ones. Re-categorising a catalogue leaves products stranded in both the new and the stale categories. Import Category Replace adds a true replace behaviour: the categories in your CSV become the product’s complete category set, old assignments removed. You can update category assignments in the same product CSV import.

Perpetual licence — one payment. The version you buy is yours to keep and use for as long as you like, with 12 months of updates and priority support included. When the year ends your store carries on running exactly as it is — only updates and support stop. Renewal is optional and never billed automatically. A further 12 months paid before expiry or within 30 days afterward is 40% off the current list price. Contact us with your order number to arrange it.

Secure checkout

Import Category Replace is a Magento 2 module that adds a Replace behaviour to Magento’s native product import, using non-empty category cells in your CSV to replace previous assignments instead of only appending them. Blank category cells leave assignments unchanged.

You re-imported your catalogue to fix the categories. Magento kept every old one anyway.

Magento’s product CSV import has a behaviour that surprises everyone the first time: when you import a product with categories, it appends them. It adds the categories in your spreadsheet to whatever the product already has — and it never removes the ones you left out. So when you re-categorise your catalogue — a new taxonomy, a seasonal re-merchandise, a cleaned-up supplier feed — the import dutifully adds the new categories and leaves all the old ones in place. Now every product sits in two categories: the right one, and the one you were trying to remove.

The only native way out is to un-assign the old categories by hand, product by product, across the admin. On a catalogue of any size that is hours of click-work and a guaranteed crop of mistakes.

A real ‘replace’, built into the import you already use

Import Category Replace adds a replace behaviour to Magento’s standard product import. Switch it on and the categories column in your spreadsheet becomes the whole truth: the product is assigned to exactly the categories in the row, and any category it was previously in that is not in the row is removed. Set Category Handling to Replace under Stores → Configuration → AgenticEcom → Product Import Settings, then run Magento’s native Products → Add/Update import with the same CSV format.

Append vs. replace

ScenarioNative import (append)Import Category Replace
Product in “Old Range”, CSV says “New Range”Ends up in bothEnds up in “New Range” only
Move products to a new taxonomyHours of manual un-assigningOne Add/Update import; test a small batch first
Price, stock, attributesUpdated as normalUpdated as normal — only categories are replaced

How it works

  1. Prepare your product CSV as usual, with the categories column set to the exact categories each product should belong to.
  2. Set Category Handling to Replace in Stores → Configuration, then run the native Products → Add/Update import.
  3. Each product is assigned precisely the categories in its row — stale assignments are removed, everything else imports normally.

Who it is for

Anyone re-organising a catalogue at scale: re-taxonomies, re-platforms, merchandising overhauls, and especially teams running automated supplier or PIM feeds where a product’s categories should always mirror the source of truth. If your category tree is meant to be driven by a spreadsheet or a feed, this is the module that makes the import actually obey it.

FAQ

Does it change the import file format?

No. Use Magento’s ordinary product CSV format. Set the module’s category handling in Stores → Configuration before running Products → Add/Update in the native import screen.

What happens to a category not listed in a product’s row?

It is removed from that product. The row defines the complete, final set of categories.

Does it touch anything other than categories?

No. Price, stock, attributes and everything else import exactly as they normally would — only category assignment switches from append to replace.

Pairs well with

Import Category Replace is part of the AgenticEcom Suite and works naturally alongside Category Manager for shaping the tree and Bulk Product Operations for sweeping changes across products.

Frequently asked questions

Does it change the CSV format?

No — same columns, same categories path format as native import. You just set the behaviour to Replace in config.

What happens to a category I don't list for a product?

In Replace mode it's removed from that product. The row defines the complete, final set of categories.

Could an import accidentally wipe all my categories?

A blank categories cell leaves that product’s category assignments unchanged. Back up your catalogue and test a small batch before a broad import; review Magento’s validation errors for invalid category paths.

Which import path is supported?

The tested path is Magento Admin’s native Products → Add/Update CSV import. A separate CLI import path has not been qualified.

Pairs well with…

Category Manager for shaping the tree and Bulk Product Operations for sweeping product changes.

Latest release: Version 1.0.2