Export Import Categories Module for Magento 2

€71.52 €58.15
COMPOSER Installation
M2-EXPORT-IMPORT-CATEGORIES
PayPal PayPal
Przelew Przelew

Magento Modules: Clear Guidelines

You purchase the module once, with no domain restrictions

Tooltip

Free installation and updates via Composer

Tooltip

Affiliate Program

Tooltip

Technical support for Magento

Tooltip

Clear guidelines for licensing Magento modules

Tooltip

Magento Module Code Security

Tooltip

Kowal_ExportImportCategories is a Magento 2 module that enables the export and import of category attributes in CSV format for a selected store view. The extension was created for stores that operate in multiple languages, use multiple store views, or need to update category data in bulk without manually editing each category in the admin panel.

The module lets you export categories to a CSV file, modify selected attributes outside Magento, and then import the data back in either update mode for existing categories or insert mode for creating new categories. Import runs for the specified store view, making it convenient to prepare translations of names, descriptions, meta tags, URLs, and other category attributes.

Who this module is for

The module is designed for:

  • Magento 2 stores with multiple language versions,
  • content teams working with CSV spreadsheets,
  • agencies deploying category catalogs between environments,
  • administrators who need to update category names, descriptions, metadata, and URLs in bulk,
  • stores that have custom category attributes and want to manage them in bulk,
  • projects where category data is prepared outside Magento, such as by translators, SEO teams, or a PIM system.

Key capabilities

  • Export categories to CSV for a selected store view.
  • Import categories from CSV for a selected store view.
  • Existing category update mode: update.
  • New category creation mode: insert.
  • Select attributes exported to CSV.
  • Select attributes imported from CSV.
  • Automatic system columns required to identify categories.
  • CSV header validation before import.
  • Column name validation against actual Magento category attributes.
  • Support for custom category attributes added in Magento.
  • Support for text values for all attributes.
  • Support for select and multiselect attributes by option labels.
  • Ability to work with values visible in the store view or only with store view overrides.
  • dry-run mode, meaning full import validation without saving data.
  • Empty values policy.
  • url_key handling strategies.
  • Optional permanent redirect creation when a category URL changes.
  • Support for category image paths.
  • Batch processing for larger files.
  • Error handling policies.
  • CSV import report.
  • Import history in the admin panel.

Category export

Export lets you generate a CSV file with categories for the selected store view. The administrator selects the store view and the category attributes to include in the file. The module automatically adds the system columns required to identify categories and preserve the tree structure.

Export can be used to:

  • prepare category translations,
  • audit category data,
  • correct SEO metadata in bulk,
  • compare values between store views,
  • prepare a file for import into the same or another environment,
  • archive current category data before making changes.

Export scope

Export includes category attributes. The module does not export products assigned to categories. It also does not perform category deletion operations.

The administrator can select:

  • Store View,
  • starting category,
  • attributes to export,
  • CSV delimiter,
  • store view value mode.

Store view value modes during export

The module supports two value export modes:

  • resolved_value - exports the value visible in the given store view, meaning after applying Magento fallback to the default value.
  • store_override_only - exports only the value overridden directly for the given store view; if the value is inherited, the CSV cell remains empty.

resolved_value mode is convenient for editorial work because it shows the actual value visible in the store. store_override_only mode is useful when you need to control only translations or overrides specific to a given store view.

Category import

Import lets you load a CSV file and save selected category attributes for the specified store view. The store view selected in the import form takes precedence, while the store_view_code column from the CSV is used to validate whether the file matches the selected store view.

Import can be used to:

  • translate categories,
  • update category names,
  • update category descriptions,
  • update meta tags,
  • update url_key,
  • create new categories,
  • import custom category attributes,
  • update menu and visibility attributes,
  • import category image paths.

update mode

update mode updates existing categories. The module does not create new categories in this mode.

A category is searched primarily by entity_id. If entity_id is not available, the module can use category_path, provided that the path clearly identifies a single category.

update mode is recommended for:

  • category translations between store views,
  • SEO corrections,
  • description updates,
  • name updates,
  • changing custom category attribute values.

Example translation scenario:

  1. Export categories from the base store view.
  2. Change store_view_code in the CSV to the target store view code.
  3. Keep the same entity_id values.
  4. Fill in translations in the name, description, meta_title, and meta_description columns.
  5. Import in update mode for the target store view.

In this variant, the module saves selected attributes in the context of the numeric store_id selected in the import form.

insert mode

insert mode creates new categories. In this mode, entity_id is not required because Magento assigns it automatically.

A new category must have its parent specified by:

  • parent_entity_id,
  • or parent_path.

insert mode is recommended for:

  • creating new category structures,
  • moving a category tree between environments,
  • preparing categories in a CSV spreadsheet,
  • creating categories based on external data.

If the import includes both a parent and a child, the data should be ordered from higher-level categories to lower-level categories.

CSV format

The first row of the CSV file must contain column headers. Columns are divided into:

  • system columns,
  • category attribute columns.

Attribute columns must match Magento attribute codes, for example:

  • name,
  • url_key,
  • description,
  • meta_title,
  • meta_description,
  • is_active,
  • include_in_menu.

System columns

The module uses the following system columns:

  • store_view_code,
  • entity_id,
  • parent_entity_id,
  • category_path,
  • parent_path,
  • level,
  • position,
  • attribute_set_id.

System columns are not treated as EAV attributes. They are used to identify categories, validate the store view, and recreate the tree structure.

CSV example for updates

store_view_code,entity_id,category_path,name,url_key,is_active,include_in_menu,meta_titlepl,13,Default Category/Gear/Bags,Torby,torby,1,1,Torbypl,14,Default Category/Gear/Fitness Equipment,Sprzet fitness,sprzet-fitness,1,1,Sprzet fitness

CSV example for creating categories

store_view_code,parent_entity_id,parent_path,category_path,name,url_key,is_active,include_in_menudefault,12,Default Category/Gear,Default Category/Gear/Helmets,Helmets,helmets,1,1default,12,Default Category/Gear,Default Category/Gear/Gloves,Gloves,gloves,1,1

Working with text attributes

The module saves values in CSV as text. This allows the file to be edited in a spreadsheet, sent to a translator, or prepared automatically in an external system.

For select and multiselect attributes, the module works with option labels rather than technical option IDs. This means the CSV contains readable values such as Products only, Position, or Price.

For multiselect, multiple values are separated with the | delimiter.

Example:

store_view_code,entity_id,category_path,display_mode,available_sort_by,default_sort_bydefault,13,Default Category/Gear/Bags,Products only,Position|Product Name|Price,Position

If an option label does not exist or is not unique, the import will report a validation error.

Empty values policy

During import, the administrator selects how empty CSV cells should be interpreted:

  • skip_empty - an empty cell does not change the existing value.
  • clear_value - an empty cell clears the attribute value for the selected store view.
  • use_default - an empty cell removes the store view override and lets Magento use the default value.

The recommended default option for updates is skip_empty, because it reduces the risk of accidentally clearing data.

Category URL handling

The module lets you configure the url_key handling strategy:

  • use_csv_value - uses the value from the CSV.
  • generate_from_name - generates url_key based on the name attribute.
  • keep_existing - keeps the current url_key in update mode.
  • magento_default - leaves URL handling to the standard Magento mechanism.

The administrator can also decide whether permanent redirects should be created when url_key changes.

This configuration is especially important for translations, because different stores may use different strategies:

  • translated URLs for each language,
  • shared URLs across language versions,
  • URLs generated automatically from category names,
  • manually managed SEO URLs.

Category images

The module can import category image attributes if the relevant columns are selected for import.

Default source directory:

pub/media/import/categories

The CSV contains a text path relative to this directory, for example:

gear/bags.jpg

The module validates file existence and extension. Safe image formats are supported, such as:

  • jpg,
  • jpeg,
  • png,
  • webp,
  • gif.

Dry-run mode

dry-run mode lets you run import validation without saving data in Magento.

In this mode, the module:

  • reads the CSV,
  • validates headers,
  • validates the store view,
  • checks the existence of categories or parents,
  • checks attributes,
  • maps select and multiselect values,
  • checks images,
  • generates an error and warning report,
  • does not save categories.

This is the recommended first step before every larger import.

Batch processing

Import runs in batches. The batch size can be configured in the import form.

Default value:

100 wierszy

Batch processing reduces the risk of timeouts and excessive memory usage with larger files.

Error policy

The module supports three behavior variants for errors:

  • skip_invalid_rows - invalid rows are skipped, while valid rows continue to be imported.
  • stop_on_first_error - import stops after the first error.
  • all_or_nothing - if any row has an error, data is not saved.

The recommended option for large imports is skip_invalid_rows, because it allows valid data to be processed and provides a problem report for the remaining rows.

Reports and import history

After import, the module generates a CSV report containing:

  • row number,
  • category identifier,
  • status,
  • message,
  • list of changed attributes.

Import history is available in the admin panel. The administrator can check:

  • import date,
  • admin user,
  • store view,
  • import mode,
  • file name,
  • number of rows,
  • number of successes,
  • number of errors,
  • whether the import was run as dry-run,
  • download the import report.

Security

The module uses Magento ACL and adds separate permissions for export, import, and import history.

Import is secured by:

  • header validation,
  • attribute code validation,
  • store view validation,
  • required column validation,
  • value type validation,
  • option label validation,
  • image file validation,
  • per-row error reporting.

The module does not delete categories and does not import products assigned to categories.

Typical use cases

Category translations

Export categories from the base store view, fill in translations in the CSV, change store_view_code to the target store view code, and import the data in update mode.

Bulk SEO update

Export the meta_title, meta_description, and url_key attributes, edit them in the CSV, and import only the selected columns.

Creating a new category structure

Prepare a CSV file with category_path, parent_path, name, and other required attributes, then import it in insert mode.

Updating custom category attributes

If the store has custom category attributes, the module loads them dynamically from EAV and lets you select them during export and import.

Location in the Magento panel

After installation, the module is available at:

System > Data Transfer > Export/Import Categories

Available views:

  • Export Categories,
  • Import Categories,
  • Import History.

Installation and configuration guide for the Kowal_ExportImportCategories module

This document describes the installation, configuration, and use of the Kowal_ExportImportCategories module for Magento 2. The guide includes information from the README.md file and the features implemented in the module.

Requirements

  • Magento 2.
  • PHP compatible with the Magento installation, PHP 8.1 or newer recommended.
  • Access to Magento CLI.
  • Access to Composer.
  • Magento administrator permissions.
  • Access to the module repository.
  • For image import: the ability to place files in the pub/media/import/categories directory.

Installation via Composer

The module is available through a Composer repository.

1. Add the Composer repository

composer config repositories.export.import.categories vcs https://github.com/kowalco/export-import-categories

2. Add an access token for the private GitHub repository

If the repository is private, configure a GitHub token:

composer config --global --auth github-oauth.github.com 

Replace with your own access token.

3. Install the module

composer require kowal/module-export-import-categories

4. Enable the module in Magento

bin/magento module:enable Kowal_ExportImportCategories

5. Run the Magento upgrade

bin/magento setup:upgrade

6. Flush the cache

bin/magento cache:flush

7. Optionally run DI compilation

On production environments or in production mode:

bin/magento setup:di:compile

8. Optionally deploy static assets

If the environment requires it:

bin/magento setup:static-content:deploybin/magento cache:flush

Manual installation in app/code

Alternatively, you can place the module manually in the directory:

app/code/Kowal/ExportImportCategories

After copying the files, run:

bin/magento module:enable Kowal_ExportImportCategoriesbin/magento setup:upgradebin/magento cache:flush

In production mode, also run:

bin/magento setup:di:compile

Verifying the installation

After installation, check whether the module is active:

bin/magento module:status Kowal_ExportImportCategories

The module should appear on the list of active modules.

In the admin panel, go to:

System > Data Transfer > Export/Import Categories

You should see three items:

  • Export Categories,
  • Import Categories,
  • Import History.

ACL permissions

The module adds separate admin permissions:

  • access to the main Export/Import Categories section,
  • category export,
  • category import,
  • import history.

If an admin user does not see the module menu, check the user role in:

System > Permissions > User Roles

Then grant the appropriate permissions for the module resources.

Module location in the panel

The module is available at:

System > Data Transfer > Export/Import Categories

Views:

  • Export Categories - export categories to CSV.
  • Import Categories - import categories from CSV.
  • Import History - import history and reports.

Export configuration

The export view lets you generate a CSV file with categories.

Export fields

Store View

Selects the store view from which category attribute values will be read.

If you select a language store view, the export may include values specific to that store view or values inherited from the default scope, depending on the value mode.

Start Category ID

An optional field that lets you limit the export to a selected category and its subtree.

If the field is left empty, the module exports categories from the root category of the selected store view.

Store View Value Mode

Defines how store view-dependent values are exported.

Available options:

  • resolved_value,
  • store_override_only.

resolved_value exports the value visible in the selected store view after applying Magento fallback.

store_override_only exports only the value overridden for the selected store view. If the value is inherited from the default scope, the CSV cell will be empty.

CSV Delimiter

CSV delimiter. Default:

,

You can use a different delimiter if the file will be edited in a tool that requires, for example, a semicolon.

Attributes

List of category attributes available in Magento.

The module loads attributes dynamically from EAV, so the list may also include custom category attributes added in the project.

System columns are added automatically and do not need to be selected.

System columns in export

Export should always include system columns:

  • store_view_code,
  • entity_id,
  • parent_entity_id,
  • category_path,
  • parent_path,
  • level,
  • position,
  • attribute_set_id.

These columns are used to identify categories, validate the store view, and handle the tree structure.

Import configuration

The import view lets you load a CSV and save category data.

Import fields

Store View

Selects the store view to which values will be saved.

This field determines the numeric store_id used when saving data in Magento tables.

The store_view_code column from the CSV is not directly converted to store_id. It is used to validate whether the file matches the selected store view.

Example:

  • in the form, you select a store view with store_id = 1,
  • the CSV must contain the store_view_code corresponding to that store view,
  • the module saves data using store_id = 1.

Import Mode

Available modes:

  • update,
  • insert.

update updates existing categories.

insert creates new categories.

CSV File

CSV file with headers in the first row.

The file should be encoded in UTF-8.

CSV Delimiter

CSV delimiter. It must match the delimiter used in the file.

Unknown Columns Policy

Defines behavior for columns that are neither system columns nor known category attributes.

Available options:

  • error - import reports an error for unknown columns.
  • ignore - unknown columns are ignored.

Recommended option:

error

Empty Values Policy

Defines how the module interprets empty CSV cells.

Available options:

  • skip_empty,
  • clear_value,
  • use_default.

skip_empty means an empty cell will not change the current value.

clear_value means an empty cell will clear the attribute value.

use_default means an empty cell will remove the store view override and let Magento use the default value.

Recommended option for update imports:

skip_empty

URL Key Strategy

Defines how the url_key attribute is handled.

Available options:

  • use_csv_value,
  • generate_from_name,
  • keep_existing,
  • magento_default.

use_csv_value saves url_key from the CSV.

generate_from_name generates url_key based on the name value.

keep_existing keeps the existing url_key in update mode.

magento_default leaves URL handling to the standard Magento mechanism.

Create permanent redirect for URL key changes

This option defines whether Magento should create a permanent redirect when url_key changes.

It is worth enabling when a category URL change should preserve SEO redirects from old addresses.

Images Base Directory

Base directory for category image import relative to pub/media.

Default:

import/categories

Full path in Magento:

pub/media/import/categories

If you provide the following in the CSV:

gear/bags.jpg

the module will look for the file at:

pub/media/import/categories/gear/bags.jpg

Error Policy

Defines import behavior when errors occur.

Available options:

  • skip_invalid_rows,
  • stop_on_first_error,
  • all_or_nothing.

skip_invalid_rows skips invalid rows and continues the import.

stop_on_first_error stops the import after the first error.

all_or_nothing requires the entire file to be valid; if an error occurs, the import should not save data.

Recommended option for large files:

skip_invalid_rows

Batch Size

Number of rows processed in a single batch.

Default:

100

A lower value reduces memory usage. A higher value may speed up import on stronger environments.

Attributes to Import

List of attributes to be imported.

Import updates only the selected attributes. If a column exists in the CSV but the attribute is not selected in the form, the module should not save it.

Dry Run

Validation mode without saving data.

It is recommended to run dry-run before the actual import, especially for large files or SEO changes.

Import/update mode

update mode is used to update existing categories.

Required data

The CSV must contain:

  • store_view_code,
  • entity_id or category_path,
  • at least one selected attribute column.

How category identification works

The module tries to find the category by:

  1. entity_id,
  2. category_path, if entity_id is empty.

entity_id is the best identifier when the import is performed in the same Magento environment.

category_path is more portable between environments, but it must be unique.

Translation update example

store_view_code,entity_id,category_path,name,url_key,meta_title,meta_descriptionpl,13,Default Category/Gear/Bags,Torby,torby,Torby,Torby i akcesoriapl,14,Default Category/Gear/Gloves,Rekawiczki,rekawiczki,Rekawiczki,Rekawiczki sportowe

Import settings:

  • Store View: Polish store view,
  • Import Mode: update,
  • Attributes to Import: name, url_key, meta_title, meta_description,
  • URL Key Strategy: use_csv_value,
  • Empty Values Policy: skip_empty,
  • first Dry Run, then the actual import.

Import/insert mode

insert mode is used to create new categories.

Required data

The CSV must contain:

  • store_view_code,
  • category_path,
  • parent_entity_id or parent_path,
  • name,
  • at least one selected attribute column.

entity_id is not required because Magento assigns it automatically.

Category creation example

store_view_code,parent_entity_id,parent_path,category_path,name,url_key,is_active,include_in_menudefault,12,Default Category/Gear,Default Category/Gear/Helmets,Helmets,helmets,1,1default,12,Default Category/Gear,Default Category/Gear/Gloves,Gloves,gloves,1,1

Import settings:

  • Store View: default store view,
  • Import Mode: insert,
  • Attributes to Import: name, url_key, is_active, include_in_menu,
  • URL Key Strategy: use_csv_value or generate_from_name,
  • Error Policy: skip_invalid_rows,
  • first Dry Run.

Working with select and multiselect

The module supports select and multiselect by option labels.

You do not need to provide technical option IDs.

Example:

store_view_code,entity_id,category_path,display_mode,available_sort_by,default_sort_bydefault,13,Default Category/Gear/Bags,Products only,Position|Product Name|Price,Position

For multiselect, multiple values are separated with the delimiter:

|

If the label does not exist or is ambiguous, the import will report an error.

Importing category images

Before importing images, place the files in the directory:

pub/media/import/categories

CSV example:

store_view_code,entity_id,category_path,image,thumbnaildefault,13,Default Category/Gear/Bags,gear/bags.jpg,gear/bags-thumb.jpg

Import settings:

  • Images Base Directory: import/categories,
  • selected attributes: image, thumbnail.

The module will check whether the files exist and have supported extensions.

Import report

After import, the module generates a CSV report.

The report includes:

  • row number,
  • category identifier,
  • status,
  • message,
  • changed attributes.

Statuses may include:

  • success,
  • error,
  • skipped_no_change,
  • skipped_existing.

Import history

Import history is available at:

System > Data Transfer > Export/Import Categories > Import History

History includes:

  • import date,
  • admin user,
  • store view,
  • import mode,
  • file name,
  • number of rows,
  • number of successes,
  • number of errors,
  • information about dry-run,
  • link to download the report.

Recommended workflow

Safe update import

  1. Export the current categories.
  2. Keep the original file as a backup.
  3. Prepare changes in a copy of the CSV.
  4. Make sure store_view_code matches the target store view.
  5. Select update import.
  6. Select only the attributes you want to change.
  7. Set Empty Values Policy to skip_empty.
  8. Run Dry Run.
  9. Check the report.
  10. Run the actual import.
  11. Flush the cache if changes are not visible immediately.

Safe import of new categories

  1. Prepare a CSV with category_path, parent_path, or parent_entity_id.
  2. Make sure parents exist or appear earlier in the file.
  3. Select insert import.
  4. Select at least name and other required attributes.
  5. Run Dry Run.
  6. Fix errors from the report.
  7. Run the actual import.

Cache and indexes

After importing category changes, it is worth refreshing the Magento cache:

bin/magento cache:clean

If the store requires manual reindexing after larger catalog changes:

bin/magento indexer:reindex

In typical Magento installations, saving categories through standard Magento mechanisms should trigger the appropriate processes associated with the category model, but after large imports it is recommended to check cache and indexes.

Common issues

Import reports a mismatched store_view_code

Check whether the code in the store_view_code column matches the store view selected in the import form.

Import does not change values

Check:

  • whether the attribute was selected in Attributes to Import,
  • whether the CSV cell is not empty,
  • whether Empty Values Policy is not set to skip_empty,
  • whether the import was not run as Dry Run.

Select or multiselect reports an error

Check whether the option label in the CSV exactly matches the option label in Magento for the selected store view.

Image is not imported

Check:

  • whether the file exists in pub/media/import/categories,
  • whether the path in the CSV is correct,
  • whether the file extension is supported,
  • whether the image attribute was selected for import.

Insert reports a missing parent

Check parent_entity_id or parent_path. The parent must exist in Magento or appear earlier in the import file.

Uninstalling the module

If the module was installed via Composer:

composer remove kowal/module-export-import-categoriesbin/magento setup:upgradebin/magento cache:flush

Before uninstalling, make sure the import history can be removed. The module creates the table:

kowal_export_import_categories_history
Implemented in real Magento 2 stores
Case study: rozbudowa tandembaits.com o nowe wersje językowe

Klient

tandembaits.com to sklep internetowy działający w branży wędkarskiej. Oferta sklepu jest oparta na specjalistycznym asortymencie, w którym poprawne nazwy kategorii, precyzyjne opisy oraz dobrze przygotowane adresy URL mają bezpośrednie znaczenie dla użyteczności sklepu, SEO i komunikacji z klientami w różnych krajach.

Wyzwanie

W ramach rozbudowy sklepu o nowe wersje językowe klient potrzebował skutecznego sposobu zarządzania kategoriami w Magento 2.

Największym problemem była specyfika branży wędkarskiej. Nazwy kategorii nie są prostymi, uniwersalnymi etykietami. Często odnoszą się do konkretnych technik łowienia, typów przynęt, akcesoriów, serii produktowych albo pojęć używanych tylko przez zaawansowanych wędkarzy.

Przy 10 wersjach językowych ręczne zarządzanie kategoriami w panelu Magento było zbyt czasochłonne i podatne na błędy. Klient potrzebował mieć pełną kontrolę nad:

  • nazwami kategorii,
  • adresami URL kategorii,
  • opisami kategorii,
  • meta danymi SEO,
  • wartościami specyficznymi dla każdego store view,
  • spójnością struktury kategorii między wersjami językowymi.

Skala pracy obejmowała kilkadziesiąt kategorii w 10 wersjach językowych. Oznaczało to setki wartości tekstowych do przygotowania, sprawdzenia, poprawienia i zaimportowania.

Problem biznesowy

Standardowa praca w panelu Magento wymagałaby edycji każdej kategorii osobno dla każdego store view. Przy kilkudziesięciu kategoriach i 10 językach taki proces byłby powolny i trudny do kontrolowania.

Najważniejsze ryzyka przy ręcznej pracy:

  • pomyłki w wyborze store view,
  • niespójne tłumaczenia nazw kategorii,
  • przypadkowe nadpisanie wartości domyślnych,
  • błędne albo zduplikowane adresy URL,
  • brak wygodnego przeglądu wszystkich kategorii w jednym miejscu,
  • trudność w przekazaniu danych tłumaczom lub osobom odpowiedzialnym za SEO,
  • brak prostego sposobu walidacji zmian przed zapisem.

Klient potrzebował procesu, który pozwoli przygotować dane zbiorczo, sprawdzić je przed importem i bezpiecznie zapisać tylko wybrane atrybuty dla konkretnego store view.

Rozwiązanie

Dla tego scenariusza zastosowano moduł Export Import Categories dla Magento 2.

Moduł umożliwił eksport kategorii do pliku CSV, przygotowanie danych językowych poza panelem Magento oraz ponowny import wartości do wybranego store view.

Proces został oparty na trybie update, ponieważ struktura kategorii już istniała w sklepie. Celem nie było tworzenie nowego drzewa kategorii, ale uzupełnienie i poprawienie danych dla kolejnych wersji językowych.

Zakres użycia modułu

W projekcie kluczowe były następujące funkcje modułu:

  • eksport kategorii z bazowego store view,
  • zachowanie entity_id jako stabilnego identyfikatora kategorii,
  • zmiana store_view_code na kod docelowej wersji językowej,
  • import w trybie update,
  • wybór konkretnych atrybutów do importu,
  • zarządzanie nazwami kategorii,
  • zarządzanie url_key,
  • zarządzanie opisami kategorii,
  • kontrola pustych wartości,
  • walidacja pliku przed właściwym importem,
  • raport importu.

Proces wdrożony w projekcie

1. Eksport kategorii

Najpierw wykonano eksport kategorii z bazowego store view. Plik CSV zawierał kolumny systemowe oraz wybrane atrybuty wymagane do przygotowania wersji językowych.

Najważniejsze kolumny systemowe:

  • store_view_code,
  • entity_id,
  • category_path,
  • parent_path.

Najważniejsze atrybuty robocze:

  • name,
  • url_key,
  • description,
  • meta_title,
  • meta_description.

2. Przygotowanie danych językowych

Na podstawie wyeksportowanego CSV przygotowano osobne dane dla poszczególnych wersji językowych.

Dzięki temu osoby odpowiedzialne za treści mogły pracować w arkuszu, widząc wiele kategorii jednocześnie. Było to szczególnie ważne w branży wędkarskiej, gdzie nazwy kategorii muszą być zgodne z lokalną terminologią i realnym sposobem wyszukiwania produktów przez klientów.

3. Zachowanie identyfikatorów kategorii

W plikach importowych zachowano entity_id, aby moduł mógł jednoznacznie dopasować wiersze CSV do istniejących kategorii Magento.

To pozwoliło importować tłumaczenia bez ryzyka utworzenia duplikatów kategorii.

4. Zmiana store view

Dla każdej wersji językowej ustawiano odpowiedni store_view_code w CSV oraz wybierano ten sam store view w formularzu importu.

Moduł walidował zgodność tych danych. Dzięki temu ograniczono ryzyko przypadkowego importu tłumaczeń do niewłaściwego widoku sklepu.

5. Import w trybie update

Import wykonywano w trybie update, wybierając tylko te atrybuty, które miały zostać zmienione dla danej wersji językowej.

Dzięki temu moduł nie ingerował w pozostałe dane kategorii.

6. Walidacja i dry-run

Przed właściwym importem można było uruchomić walidację bez zapisu danych.

Tryb dry-run pozwalał sprawdzić:

  • czy plik CSV ma poprawne kolumny,
  • czy store_view_code pasuje do wybranego store view,
  • czy entity_id wskazuje istniejące kategorie,
  • czy wybrane atrybuty istnieją w Magento,
  • czy import nie zawiera błędów blokujących zapis.

7. Raport po imporcie

Po imporcie moduł generował raport, który pozwalał sprawdzić status poszczególnych wierszy.

Raport był szczególnie przydatny przy pracy na wielu językach, ponieważ pozwalał szybko wykryć ewentualne błędy w konkretnym pliku albo konkretnej kategorii.

Dlaczego CSV było właściwym formatem

CSV był praktycznym formatem dla tego projektu, ponieważ:

  • można go łatwo edytować w arkuszu kalkulacyjnym,
  • można przekazać go tłumaczom,
  • można porównać wartości między językami,
  • można przygotować wiele wersji językowych na bazie jednego eksportu,
  • można pracować na konkretnych kolumnach bez ręcznego klikania w panelu Magento,
  • można zachować kontrolę nad entity_id i store_view_code.

Efekt

Moduł umożliwił klientowi zarządzanie kategoriami w 10 wersjach językowych w sposób uporządkowany i powtarzalny.

Zamiast ręcznej edycji każdej kategorii w panelu Magento, zespół mógł pracować na plikach CSV, przygotowywać tłumaczenia zbiorczo i importować tylko wybrane atrybuty dla konkretnego store view.

Najważniejsze korzyści:

  • szybsze przygotowanie nowych wersji językowych,
  • większa kontrola nad nazwami kategorii,
  • pełna kontrola nad adresami URL,
  • łatwiejsze zarządzanie opisami kategorii,
  • możliwość pracy poza panelem Magento,
  • mniejsze ryzyko błędów przy wielu store view,
  • walidacja danych przed zapisem,
  • raportowanie wyników importu.

Znaczenie dla SEO

W projekcie szczególne znaczenie miała możliwość kontrolowania url_key, nazw kategorii oraz opisów.

Dla sklepu działającego w wielu językach automatyczne tłumaczenie lub przypadkowe kopiowanie nazw kategorii nie jest wystarczające. Każdy rynek może używać innych określeń branżowych, a w wędkarstwie różnice terminologiczne są szczególnie istotne.

Moduł pozwolił przygotować wartości SEO świadomie dla każdej wersji językowej:

  • lokalne nazwy kategorii,
  • lokalne adresy URL,
  • opisy dopasowane do języka,
  • meta tytuły,
  • meta opisy.

Podsumowanie

Rozbudowa tandembaits.com o 10 wersji językowych wymagała narzędzia, które pozwoli sprawnie zarządzać kategoriami Magento 2 na poziomie store view.

Export Import Categories rozwiązał ten problem, przenosząc pracę z ręcznej edycji w panelu Magento do kontrolowanego procesu opartego o CSV, walidację i import wybranych atrybutów.

W efekcie klient otrzymał możliwość wygodnego zarządzania specjalistycznymi nazwami kategorii, adresami URL i opisami dla wielu języków bez ryzyka przypadkowego nadpisania całej struktury kategorii.

Write Your Own Review
You're reviewing:Export Import Categories Module for Magento 2
Your Rating
Aktualizacja preferencji plików cookie