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> is category-import, the <FILENAME> is a combination of date and time like 20190608-114344, and the <COUNTER> is a incremental number with two digits starting with 01.

  • The results can be found in a filename like category-import_20190608-114344_01.csv.

  • Additionally, the appropriate .ok file is needed.

  • There is a fixed structure for the bunch import, which must be followed.

  • The three parts to be specified are each separated by an underscore ( _ ) and result in a filename like <PREFIX>_<FILENAME>_<COUNTER>.csv.

  • The name structure follows a predefined filename structure that is mandatory for the Bunch import.

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

varchar

yes

e.g. en_US or read more about additional scopes

The specific store view(s) where the category is available. If blank, the category is available at the default store view.

attribute_set_code

varchar

yes

default

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

varchar

yes

Default Category/MyCategory

The complete category path, including the root category.

name

varchar

yes

My Category

The category name appears the naviagtion, and is the name that customers use to identify the category.

is_active

int

yes

1

Enables or disables the category.

is_anchor

int

yes

1

If the category is anchor, the category’s products as well as the products of the subcategories will be listed.

include_in_menu

int

yes

1

Specifies if the category will be included in the menu or not.

use_name_in_product_search

int

yes

1

If the category name is used for fulltext search on products

display_mode

varchar

yes

Products only

One of "Products only", "Static block only" or "Static block and products"

url_key

varchar

yes

my-category

The category’s unique URL key

description

text

no

Some longer text here

The category description, that’ll be rendered on the category page

image_path

varchar

no

images/categories/my-category.png

The absolute or relative path to a category image file

meta_title

varchar

no

My Category Name

The category’s title that’ll be rendered in the category page’s <title> tag

meta_keywords

text

no

Category Name, Keyword 1, Keyword 2

The category’s meta keywords that’ll be rendered in the category page’s <meta name="keywords"> </meta>+++` tag

meta_description

text

no

A good Description with SEO relevant content

The category’s meta description that’ll be rendered in the category page’s +<meta name="description">` </meta> tag

landing_page

int

no

2

The ID of a CMS block that has to be rendered in the category page

position

int

no

10

The category’s position in the navigation

custom_design

varchar

no

Magneto Blank

The custom design name used to display the catgory

custom_design_from

datetime

no

10/24/16, 12:36 PM

The start date for the scheduled design update

custom_design_to

datetime

no

10/24/16, 12:36 PM

The end date for the scheduled design update

page_layout

varchar

no

1 column

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

text

no

<referenceContainer name="catalog.leftnav" remove="true"> </referenceContainer>

A custom page layout update in XML format

available_sort_by

text

no

Position,Name

The comma separated product list sortings for the catgory

default_sort_by

varchar

no

Position

The default product list sorting for the category

custom_apply_to_products

int

no

1

If set to 1, the design will also be applied to the products listed in the category

custom_use_parent_settings

int

no

1

Overrides the custom design settings with the default one’s

filter_price_range

decimal

no

100.00

The layered navigation price steps

created_at

varchar

no

10/24/16, 12:36 PM

The category’s creation date

updated_at

varchar

no

10/24/16, 12:36 PM

The date when the category has been updated

additional_attributes

text

no

custom_attribute_01=a-value,custom_attribute_02=value-01|value-02

A comma separated list with additional attributes (the attributes must already be available)