Unfortunately, Magento 2 doesn't let you import and consign categories by default. Although the platform's capabilities associated with information transfers are fairly limited, you can accost the existing issues with ease. Information technology is necessary to install a third-political party module to import and export categories to Magento 2. In the following article, we shed light on how to transfer an existing category tree to/from your east-commerce website using the Improved Import & Consign Magento two extension. Later describing the Magento 2 category export, we peruse a sample import table that contains product categories. Afterward that, our attending is focused on specific Magento 2 category attributes: we explore use cases and attribute mapping to allow yous transfer categories to Magento 2 from whatever external platforms. Next, at that place is a detailed footstep-by-footstep guide that depicts Magento 2 category import. Also, you volition discover out how to import product positions in categories (a part of the Visual Merchandiser functionality of Magento two) and move Magento 2 categories per dissimilar store views.
Tabular array of contents
1 Guide list
2 Export Magento 2 categories
3 Getting Magento 2 sample import table
iv Magento 2 import table structure
five Magento 2 category import attributes
5.1 Use Cases
5.two Attribute mapping
6 Importing Magento 2 categories
6.1 Step i: create an import task
half dozen.2 Step 2: select entity and behavior
6.3 Step 3: specify source
6.4 Stride iv: map attributes
vii How to import product positions in categories
viii Importing Magento 2 categories for dissimilar store views
eight.ane How to rename Magento two category for default store view
9 Magento ii Category Import/Export FAQ
nine.i How to import categories to Magento 2 automatically?
nine.two How to export categories from Magento 2 automatically?
nine.iii How to import Magento 2 categories from Google Sheets?
9.4 How to import Magento 2 categories from Dropbox?
9.5 How to import Magento two categories from a CSV file?
9.6 How to import Magento ii categories from an XML file?
nine.7 How to import Magento two categories from an ODS file?
9.8 How to import Magento 2 categories from an XLSX file?
9.9 How to import Magento 2 categories from a JSON file?
9.10 How to import Magento ii categories in a ZIP or TAR annal?
9.11 How to import Magento 2 categories via API?
9.12 How to export Magento two categories via API?
nine.thirteen How to export products past categories from Magento 2?
nine.xiv How to assign Magento 2 products to categories on import?
9.15 How to map categories in Magento two?
Guide list
How to consign and import Magento 2 categories post continues the line of guides for Magento 2 import/consign guide listing. The other manufactures in the line are:
The Complete Guide to Magento 2 Product Import / Export
The Complete Guide to Magento 2 Configurable Products, and how to import them
The Complete Guide to Magento 2 Bundle Products, and how to import them
The Complete Guide to Magento two Grouped Products, and how to import them
How to Add, Export and Import Magento ii Taxes
How to Add and Import Magento 2 Fixed Product Revenue enhancement
How To Import Customers & Client Addresses To Magento 2
How to Import CMS Pages to Magento ii
How to Import Magento two Advanced Pricing
How to Import Magento two Cart Toll Rules
Improved Import and Export extension allows to export and import production categories, – an invaluable tool for building product catalog fast. The categories are imported and exported like any other entity with Improved Import and Export extension, via the jobs. To get a reference to the category attributes, let's first consign existing categories to run into how the tabular array will look similar.
Export Magento ii categories
To export categories navigate to System > Export Jobs. Here you need to:
Create a new export job and decide on its frequency;
Select the 'Entity' yous want to export – 'Categories';
Determine on file format and field separators for the table, in case y'all are using dissimilar from native Magento 2;
Utilize necessary attribute mapping and filters.
Once done setting upwards the export job, click 'Salve and Run' push button at the upper right corner of the screen to get a CSV table with all categories available at your store.
Getting Magento 2 sample import table
Instead of exporting categories you can always become sample import table. Understanding the import table will let you to get the idea of required Magento 2 category attributes and sample category structure. You tin can become the sample Magento two category import table in two locations:
At GitHub – proceed to the FIreBear Studio GitHub and download the file with required entity type;
At Google Sheet Main Tabular array – Improved Import and Export extension nosotros volition be using for importing categories supports Google Sheets as an import source. That'due south why we have composed a Google Sheet Master Table where we accept gathered all import entity types with description and sample values.
Sample import tables from both locations have been tested and are working properly. Feel free downloading and editing the tables to your liking, or copying the Main Table to your Google Bulldoze.
Read more about Google Sheet Master table
Magento 2 import table construction
At present that nosotros have the sample table, information technology is fourth dimension to talk about its formatting. Improved Import and Export extension allow you lot to utilize two table file formats: CSV and XML.
Both tables should be properly formatted earlier import. If for some reason you lot have decided to create an import table manually – make sure to utilize the following settings.
Character set
Unicode (UTF-8)
Field separator
Comma, Tab
Text delimiter
"
If yous want to import a table of unlike formatting Improved Import and Export extension allows you to map fields and value separators manually. We will talk about this later in this post.
Magento 2 category import attributes
Now that nosotros have a CSV tabular array with the categories let's break it down to see which attributes are used in importing categories, and which values are expected from the shop owner.
Attribute proper name
Reference
Values
Value example
entity_id
The identifier for categories within Magento two.
Y'all tin can find a category ID next to the category name at Catalog > Categories
Numeral value
12
name
Category proper noun. The category name contains the full category path, including all parent categories
For example:
If you lot have a category named 'Third' which is nested nether 'Start' and '2nd' categories, the name value will await like:
First/Second/3rd
Utilise '/' to split up category names
Default Category/First test category
store_view
Defines the store view where the category is displayed nether the current name.
Store View Lawmaking tin can be plant under Stores > All Stores > next, click required store view and bank check "Code" column.
Can contain letters and numerals with spaces and hyphens
eng-shop
English Store
image
The master category prototype and its path
Should be uploaded to /pub/media/import.
The path of /sample_data/g/b/mb01-blue-0.jpg has the following structure: /pub/media/import/ sample_data/yard/b/ mb01-blue-0.jpg
In improver, you tin can utilise a direct URL of an image, such as http://site.com/images/ some_image.jpg
/pub/media/import/ category_images/ image1.png
url_path
Category URL path at the frontend. This attribute creates an URL rewrite to compose the end category URL
The finish category URL is composed on the following pattern:
yourstore.com/alphabetize.php/ url_path aspect value/ url_key value
For case:
If you want the category path to include category1 and category2. In this column yous demand to enter:
category1/category2/. Use / to carve up categories.
In this example end category URL volition wait similar:
yourstore.com/ index.php/category1/category2/ url_key value
test_parent_category/ test_sub_category
available_sort_by
Category choice Default Product Listing Sort By. Which defines which sorting options are available at the category page
Bachelor values:
blank – all values
position – production position
name – product proper name
cost – product price
Multiple values should be separated by comma.
For example, if you want just position and toll sorting bachelor the value should look like:
position,price
position,name,price
custom_apply_to_products
Category option Apply Design to Products. Defines if the custom category design should also be applied to the products belonging to the category
Available values are:
Aye – Utilize Design to Products enabled
No – Apply Pattern to Products disabled
Leave blank if no custom design applied
Yep
custom_design
Category Design > Theme option. Defines the theme that should be applied to the category
The value should be the required theme name. Get out blank if no design updates required, and category should be displayed in the default theme practical to the store
Magento Luma
custom_design_from
Defines from what date the custom blueprint should be practical to the category
The date should be in the following format:
mm/dd/YY
For example:
If yous want custom blueprint applied from tenth of July 2019, the value should look like:
7/10/19
two/1/eighteen
custom_design_to
Defines to what date the custom design should be applied to the category
The date should exist in the following format:
mm/dd/YY
For example:
If you want custom blueprint applied to 10th of July 2019, the value should wait like:
7/10/19
2/28/18
custom_layout_update
Category Design > Layout Update XML choice
The value should be in readable XML, if you want whatever XML layout updates applied
Category Design > Use Parent Category Settings option. Defines whether the category should re-create parent category blueprint settings
Bachelor values:
Yes – the category will re-create parent blueprint settings
No – the category volition have a unique design
No
default_sort_by
Category choice Default Product Listing Sort By. Defines which sorting order should exist applied to the products by default
Available values:
Position – the products will be sorted depending on their position in the category.
Product Name – the products will exist sorted in alphabetical order.
Cost – the products will exist sorted from lowest to highest and vice versa toll
Product Proper name
description
Category description
Supports uncomplicated HTML formatting
<p>Category clarification</p>
display_mode
Category option Brandish Mode. Defines which entities should be displayed at the category page
Available values:
Static cake and products – both static blocks and products displayed
Static cake simply – only static blocks displayed
Products only – only products displayed.
Only a single value can exist entered at a time. No multiple values allowed
Static block and products
filter_price_range
Category selection Layered Navigation Toll Step. Defines the toll step which volition be used in the layered navigation
Only numerals allowed
10
include_in_menu
Category option Include in Bill of fare. Defines if the category should be included in the primary category menu
Available values are:
Aye – category included in the carte
No – category is not included in the menu
Yes
is_active
Category option Enable Category. Defines if the category is active or disabled
Immune values are:
Yes – the category is enabled at the frontend
No – the category cannot be found at the frontend
Yes
is_anchor
Category option Anchor. Defines if the category is anchor category or not
Bachelor values are:
Aye – the category is ballast
No – the category is not anchor
Aye
landing_page
Category selection Add CMS Cake. Defines which CMS block should be included in the category
The value should be the name of the CMS block. Only a unmarried CMS cake can be included. Multiple values are not allowed
Contact usa info
meta_description
Meta description of the category
Can incorporate any symbols
Category meta description
meta_keywords
Meta Keywords of the Category
Tin contain any symbols. Multiple values are separated past comma
category,meta, keywords
meta_title
Meta Championship of the category
Tin incorporate any symbols
Category meta title
page_layout
Category selection Layout. Defines the layout of the category
Bachelor values are:
blank – no layout updates
Empty
1 column
2 columns with left bar
2 columns with right bar
3 columns
3 columns
position
Category position in the parent category. From peak till lesser. The lower the value the higher the category's position.
Affects the order in which categories are displayed in the carte du jour
Numeric value
10
url_key
Category selection URL Central. Defines the URL of the category
All characters and symbols that can be used for URLs
test_category_path
grouping
String or integer aforementioned for a group of categories per shop view.
Utilize the attribute to create a new category during import
Numerals
1039
Use Cases
ane. The extension functionality is able to fill empty fields for url_key and url_path automatically. If you import a table with the attribute values not specified, Improved Import and Export will create the category URL based on its title (using a hyphen for each space in the name).
Due east.1000.: New Category — new-category
In case you run import with the beliefs 'Supervene upon', implemented categories with the matching names will be assigned with the increase +1 to enter the database with the unique URL.
E.g.: new-category > new-category1
2. Utilise Improved Import and Consign to import categoriesper store view with dissimilar languages, names and paths. Utilise the attribute 'group' to assign transferred categories as variations per store view.
As the functionality addresses the 'entity_id' attribute to procedure existing categories per store view, in case of re-export brand sure to bank check the IDs actually vest to your database.
iii. If you want to import new categories, you should empty the 'entity_id' attribute column or delete it for good. Magento ii assigns IDs to new categories automatically.
4. In case you want to change data in the existing categories, make certain to run a primary export to become the IDs of those categories. Once you are applying updates to the category data make certain not to change 'entity_id' equally it's the crucial attribute for category processing in Magento 2.
Attribute mapping
However, if you accept received the import table from the different source yous can skip renaming the attributes. Instead, you lot can take advantage of Improved Import and Export extension attribute mapping.
With the attribute mapping, y'all can select Magento 2 category attribute and set the reference cavalcade from the import table. In such way you lot will but need to select the values. The extension volition communicate proper attribute names to Magento 2 during the import process. We will talk nearly the attribute mapping more equally the post goes.
Now, that you have learned all customer attributes it is time to proceed to the actual import.
Importing Magento two categories
To start with the extension log in to your shop admin panel and navigate to Organization > Improved Import / Export > Import jobs.
The Import Jobs is your master import management screen. Here you will be creating and editing all the import jobs.
To create a new job click 'Add New Job' button.
Step 1: create an import job
The New Chore screen volition greet you with the General job settings.
The settings are pretty much self-explanatory. You need to identity the job by naming it and scheduling it. Otherwise you can the chore manually. Next, you will need to select the locale of the store y'all will be importing to.
There will be two settings left:
Generate Unique Url if Duplicate – allows you to increase the category URLs if the URL already taken;
Re-Index later on Import – allows re-indexing the store afterward the entity has been imported.
Step 2: select entity and behavior
Subsequently washed with full general settings you will demand to select the entity y'all are going to import. In our example information technology is 'Categories'.
So, you demand to select what the extension should do with the entities from the import table:
Add/Update – add new categories and update the existing ones;
Replace – replace categories with new ones;
Delete – delete categories matching the ones in the import table.
After selecting the behavior, yous can specify the validation strategy – whether the extension should skip or end the process if whatever errors. This volition help you lot to sympathise if annihilation is wrong with your import table.
NOTE: play close attention to Categories separated by and Category levels separated past settings.
Categories separated by – when you are importing products, you can decide which separator you apply for the categories cavalcade. Past default comma is used to separate multiple category paths. Nevertheless, if you accept commas in category names yous may desire to use dissimilar separator for category paths.
Category levels separated by – when yous are importing products, you can decide which separator you lot use for the categories cavalcade to separate category levels. By default / is used to separate multiple category levels. Notwithstanding, if you lot accept /south in category names you may want to use different separator for category levels.
At last the extension offers you to manually map the import tabular array formatting past setting field and value separators.
Step 3: specify source
Here you are suggested to select the import table file format and specify the source you volition be importing from. At the screenshot below nosotros are using direct link to the Google Canvass with our CSV table uploaded.
When the source is specified click 'Validate file' push to allow the extension to cheque the integrity of the import tabular array.
Step 4: map attributes
Once the import tabular array has been validated you volition presented with the Map Attributes section.
In this section you tin can set the reference between category attributes used by your Magento two store and the ones you are using in your import tabular array. This is particularly useful if y'all have got the import tabular array from other ecommerce platform or composed it manually without because proper category attribute naming.
That'due south it, at present you lot only need to click 'Save & Run' push to proceed to running the import job created. Once you lot hit 'Run' push button the extension will present you with the import job log, where you tin can check how to the import went and look for any errors.
You have just imported categories to your Magento 2 store with Improved Import and Export extension.
How to import product positions in categories
Product positions tin can also exist imported to Magento 2, however along with products, non categories. In this weblog mail we will cover just a unmarried product attribute introduced by Firebear Team for Improved Import and Export extension for Magento2. If you are interested in reading full-featured guide on how to import products to Magento 2 refer to:
Magento two Import and Export Guide List
There yous volition notice step-by-stride instructions on how to import products with every product aspect explained.
Now, to importing production position in categories. To import position we will exist using custom product attribute categories_position, that but works for Improved Import and Consign extension for Magento ii. Once again, this is a custom attribute, and it will non piece of work with native Magento 2 import procedure.
categories_position attributes mirrors the value of the categories attribute, all the same, afterward every finite category path you lot specify the position of the product. For example, if we have a category path in the categories aspect:
Default Category/Gear/Bags
To specify that the product is in the position 5 in the category 'Bags', we demand to add '=5' to the category path in the attribute categories_position:
Default Category/Gear/Bags=five
You can refer to the screenshot above to see how information technology looks in the bodily CSV table. That's pretty much information technology. Using this pattern you can import product along with their position in the specified categories.
To import product positions yous need to select entity=Products when creating an import task.
Then y'all configure the import job as usual, don't forget to add together categories_position attribute however into the file y'all volition be importing.
Importing Magento 2 categories for different store views
Importing categories for multiple shop views is a scrap different, because a single category tin accept a defended name for carve up store views. That is why we need to identify multiple lines of the SAME category with different names during the import process, instead of using the 'proper name' attribute for identification.
See case file for multistore category import for Magento 2
The name of the category for secondary store views or store views of the different languages can be submitted in the attribute:
'store_name'
Along with other, necessary category attributes.
'Store_name' attribute needs to contain the final category name. For example:
You have three categories with the path:
Category A/Subcategory A/Subcategory B
And so yous need to put the proper proper name of THE LAST category in the path, – in our case it is Subcategory B, – into the 'store_name' aspect.
If yous want to translate the name of Subcategory A, then you lot demand to put this path in the 'proper noun' aspect.
Category A/Subcategory A
And and then specify the desired proper noun for the Subcategory A in the 'store_name' attribute.
TO MEMORIZE:
When importing categories and translating/irresolute category names for multiple store views – utilize 'store_name' attribute to update the proper name of the LAST category in the path specified in the 'name' aspect.
How to rename Magento 2 category for default store view
Renaming the category works the same as importing category for different store view, with the single exception:
You do not need to specify the store_view in the related column. Run into this screenshot:
Inside the store_name column cheque 'NEW CATEGORY Proper name'. After you import this file, the proper name of the '1 First category' will be changed to 'NEW CATEGORY Name'.
Annotation: but the final category in the path specified inside the name column will be renamed.
Here are the steps to renaming the category:
Step i: Consign categories and open up the file for edit
Step two: Add store_name column to the file, the position of the column doesn't matter
Pace 3: In the line with the category y'all want to rename, fill in the desired name into the store_name column
Step 4: Import categories back to the store
This is it. Y'all now renamed the category at the default store view.
Purchase Improved Import and Consign extension for Magento 2
If you are interested in importing other entities to your Magento 2 shop – refer to the following web log posts:
The Complete Guide to Magento ii Configurable Products, and how to import them
The Consummate Guide to Magento 2 Grouped Products, and how to import them
The Consummate Guide to Magento two Bundle Products, and how to import them
How to Add, Export and Import Magento ii Taxes
How to Export and Import Magento ii Categories
How to Add together and Import Magento 2 Stock-still Product Revenue enhancement
How To Import Customers & Client Addresses To Magento 2
How to Import Magento 2 CMS Pages
Magento 2 Category Import/Export FAQ
How to import categories to Magento two automatically?
Use the Improved Import & Export Magento 2 extension to import categories to Magento 2 automatically. The module relies on cron to automate data transfers. Consequently, you tin can create schedules to import product categories to Magento 2 automatically subsequently certain intervals. For instance, you accept two e-commerce websites with a similar category tree. Instead of applying updates to both of them manually, you lot tin can edit one of the stores and import new categories from it to the remaining storefront.
How to consign categories from Magento 2 automatically?
You can as well use the Improved Import & Export Magento 2 extension to export categories to Magento 2 automatically due to cron and automatic data transfers. Following the example from the previous question, utilize the module to consign categories from a store where you've just applied changes. It will help y'all import new categories to the remaining storefront.
How to import Magento 2 categories from Google Sheets?
You can use the Improved Import & Export Magento 2 module to import categories from numerous sources, including Google Sheets. The extension provides the power to choose the desired storage when you configure an import profile. Simply select Google Sheets as your data source and specify the URL address of a file with categories to import the respective update to your Magento ii website.
How to import Magento 2 categories from Dropbox?
In improver to Google Sheets, yous can likewise transfer a category tree to Magento two from Dropbox. Provide the address details of a file stored there and the Improved Import & Export extension will hands move information technology to your e-commerce storefront. Note that it should be a CSV, XML, ODS, XLSX, or JSON file. You tin can provide them in a compressed land as Zero or TAR archives.
How to import Magento ii categories from a CSV file?
You can use the Improved Import & Export Magento ii extension to import categories via a CSV file. Follow the instructions mentioned in this article to configure the respective import procedure. Choose a CSV file as your import file type.
How to import Magento two categories from an XML file?
You can utilize the Improved Import & Consign Magento ii extension to import categories via an XML file. Follow the instructions mentioned in this article to configure the corresponding import process. Choose an XML file equally your import file type.
How to import Magento two categories from an ODS file?
You lot can use the Improved Import & Export Magento ii extension to import categories via an ODS file. Follow the instructions mentioned in this commodity to configure the respective import process. Choose an ODS file as your import file type.
How to import Magento 2 categories from an XLSX file?
Y'all can use the Improved Import & Consign Magento two extension to import categories via an XLSX file. Follow the instructions mentioned in this commodity to configure the corresponding import process. Choose an XLSX file equally your import file type.
How to import Magento 2 categories from a JSON file?
Y'all can use the Improved Import & Export Magento two extension to import categories via a JSON file. Follow the instructions mentioned in this commodity to configure the corresponding import procedure. Choose a JSON file as your import file type.
How to import Magento 2 categories in a Zippo or TAR archive?
You lot tin can apply the Improved Import & Consign Magento 2 extension to import categories in a ZIP or TAR annal. Note that they should be stored in a CSV, XML, ODS, XLSX, or JSON file.
How to import Magento ii categories via API?
You can utilise the Improved Import & Export Magento 2 extension to import categories to Magento 2 via API. The module provides the ability to create a directly connection betwixt the two systems so that you lot avoid the use of intermediate data exchange points and file transfers.
How to export Magento 2 categories via API?
You can use the Improved Import & Consign Magento 2 extension to consign categories to Magento 2 via API. The module provides the ability to create a direct connectedness betwixt the two systems so that you lot avert the use of intermediate data substitution points and file transfers.
How to export products by categories from Magento two?
The Improved Import & Export module also lets yous consign products by categories from Magento two. Information technology is but necessary to create export filters and specify a category that contains products that yous want to export.
How to assign Magento 2 products to categories on import?
You can use Improved Import & Export to assign products to categories while importing them to your e-commerce website. The module offers a mapping interface where you lot can select new categories for imported products.
How to map categories in Magento two?
Equally mentioned in a higher place, you can use import profiles of Improved Import & Export to map the imported categories to the ones bachelor on your frontend. Specify an imported category and select your shop category in front of it. Thus, yous map external categories to the ones used in your Magento two installation.
Post a Comment for "How to Update Categories via Csv Upload Magento 2"