Categories
Pacemaker Community Edition (CE) provides a category import and the appropriate command import:categories
therefore.
You can find more information about how to invoke the command in the usage section.
-
The filename for the dedicated MSI import must match the pattern
<PREFIX>_<FILENAME>_<COUNTER>.csv
. -
The default
<PREFIX>
iscategory-import
, the<FILENAME>
is a combination of date and time like20190608-114344
, and the<COUNTER>
is a incremental number with two digits starting with01
. -
The results can be found in a filename like
category-import_20190608-114344_01.csv
. -
Additionally, the appropriate
.ok
file is needed.
|
Unique identifier
For the product import, the SKU is the unique identifier of a product.
In the case of the categories, this is a bit more complicated as Magento uses a string of the imploded category IDs, separated by a slash (/), e.g. 1/2/120/1502
.
It is not possible to e.g. the PIM system is aware of those IDs, the category instead needs a string with the admin store category names instead of the ID and expects it in the column path
.
The results in values look like Default Category/Women/Tops/Hoodies & Sweatshirts
.
A common problem can be that one of those category names itself contains a slash (/).
In that case, the category name must be enclosed with the default attaching character, e.g., the double apostrophes (").
The additional attributes column of the product import is necessary to make sure that the path can be extracted, and the category will be added to the correct parent node.
The value for a category path that contains slashes must look like
"Default Category/Dachdecker- & Spenglerarbeiten/""Kehl-/Traufenanschlüsse & -Belüftungen""/""Trauf-/Lüftungsrollen"""
Columns
The CSV file with the categories for the Magento 2 CE/EE consists of the following columns.
Column Name | Type | Mandatory | Example | Description |
---|---|---|---|---|
store_view_code |
|
yes |
|
The specific store view(s) where the category is available. If blank, the category is available at the default store view. |
attribute_set_code |
|
yes |
|
Assigns the product to a specific attribute set or product template, according to product type. Once the product is created, the attribute set cannot be changed. |
path |
|
yes |
|
The complete category path, including the root category. |
name |
|
yes |
|
The category name appears the naviagtion, and is the name that customers use to identify the category. |
is_active |
|
yes |
|
Enables or disables the category. |
is_anchor |
|
yes |
|
If the category is anchor, the category’s products as well as the products of the subcategories will be listed. |
include_in_menu |
|
yes |
|
Specifies if the category will be included in the menu or not. |
use_name_in_product_search |
|
yes |
|
If the category name is used for fulltext search on products |
display_mode |
|
yes |
|
One of "Products only", "Static block only" or "Static block and products" |
url_key |
|
yes |
|
The category’s unique URL key |
description |
|
no |
|
The category description, that’ll be rendered on the category page |
image_path |
|
no |
|
The absolute or relative path to a category image file |
meta_title |
|
no |
|
The category’s title that’ll be rendered in the category page’s <title> tag |
meta_keywords |
|
no |
|
The category’s meta keywords that’ll be rendered in the category page’s |
meta_description |
|
no |
|
The category’s meta description that’ll be rendered in the category page’s |
landing_page |
|
no |
|
The ID of a CMS block that has to be rendered in the category page |
position |
|
no |
|
The category’s position in the navigation |
custom_design |
|
no |
|
The custom design name used to display the catgory |
custom_design_from |
|
no |
|
The start date for the scheduled design update |
custom_design_to |
|
no |
|
The end date for the scheduled design update |
page_layout |
|
no |
|
A custom page layout used to disploy the category, one of 1 column, 2 columns with left bar, 2 columns with right bar, 3 columns, Empty |
custom_layout_update |
|
no |
|
A custom page layout update in XML format |
available_sort_by |
|
no |
|
The comma separated product list sortings for the catgory |
default_sort_by |
|
no |
|
The default product list sorting for the category |
custom_apply_to_products |
|
no |
|
If set to 1, the design will also be applied to the products listed in the category |
custom_use_parent_settings |
|
no |
|
Overrides the custom design settings with the default one’s |
filter_price_range |
|
no |
|
The layered navigation price steps |
created_at |
|
no |
|
The category’s creation date |
updated_at |
|
no |
|
The date when the category has been updated |
additional_attributes |
|
no |
|
A comma separated list with additional attributes (the attributes must already be available) |