Attributes

Pacemaker Community Edition (CE) provides an attribute import and the appropriate command import:attributes 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 attribute-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.

  • As a result, the filename is look like attribute-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

  • The unique identifier for the attribute import is the attribute code.

  • The attribute code is a mandatory field that has been available in the column attribute_code on every row of the CSV file.

Columns

The CSV file with the attributes for the Magento 2 CE/EE consists of the following columns:

Column Name Type Example Description

store_view_code

varchar

default

The specific store view(s) for attribute translations.
If blank, the row provides the data for the admin store view.

attribute_set_name

varchar

Default

Assigns the attribute to a specific attribute set.

attribute_group_name

varchar

Product Details

Assigns the attribute to a specific attribute group.

entity_type_code

varchar

catalog_product

The entity type code, the attribute is bound to.

attribute_code

varchar

my_attribute

The unique attribue code

sort_order

int

1

The sort order for the attributes in the backend/frontend.

attribute_option_values

text

option-01, option-02

A comma (,) separated list with the attribute options and
their values.

attribute_option_swatch

text

type=1,value=#000000|type=1,value=#d646d6

A pipe (|) separated list with the attribute option
swatch configuration.

If the attribute is swatch type (see additional_data column).

attribute_option_sort_order

text

1,2,3

The sort order for the attribute options
in the backend/frontend.

attribute_model

varchar

Magento\Catalog\Model\ResourceModel\Eav\Attribute

The model to load the EAV data from (must be the FQCN
of an available class).

backend_model

varchar

Magento\Eav\Model\Entity\Attribute\Backend\Datetime

The model to convert the user input (must be the FQCN
of an available class).

backend_table

varchar

my_table_name

The table to store the user input.

frontend_model

varchar

Magento\Eav\Model\Entity\Attribute\Frontend\Datetime

The model to validate the user input (must be the FQCN
of an available class).

frontend_input

varchar

boolean

The frontend input type (must be one of hidden,
boolean, text, select, date, textarea, text, multiselect,
price, weight, media_image, or gallery).

frontend_label

varchar

My Custom Label

The label for the attribute in the admin store.

frontend_class

varchar

hidden-for-virtual

A CSS class name.

source_model

varchar

Magento\Eav\Model\Entity\Attribute\Source\Table

The model to load the available values (must be the FQCN
of an available class).

frontend_input_renderer

varchar

Magento\Rma\Block\Adminhtml\Product\Renderer

Frontend input renderer (must be the FQCN
of an available class).

apply_to

varchar

simple, virtual, bundle, downloadable, configurable

A comma (,) separated list with product types;
the attribute applies to

backend_type

varchar

int

The attributes backend type (must be
one of text, varchar, decimal, int, datetime or static).

is_required

int

0

Whether or not the attribute value is mandatory.

is_user_defined

int

0

Whether or not, the attribute is user-defined.

default_value

text

2

The attributes default value (has to depend on
the attribute configuration).

is_unique

int

0

Whether or not the attribute must contain a
unique value in the configured context.

note

varchar

My custom note

A custom note for the attribute (will not be
rendered anywhere).

is_global

int

1

Whether or not the attribute is global and can
be used to create configurable products.

is_visible

int

1

Whether or not, the attribute is visible
in the backend.

is_searchable

int

0

Whether or not, the attribute is
searchable in frontend.

is_filterable

int

0

Whether or not, the attribute will be
available in the filter navigation.

is_comparable

int

0

Whether or not the attribute can be used in
product comparison.

is_visible_on_front

int

0

Whether or not the attribute is visible on
the catalog pages in a storefront.

is_html_allowed_on_front

int

0

Whether or not the attribute value allows
us to contain HTML code in a storefront.

is_used_for_price_rules

int

0

Whether or not the attribute can be used
to create catalog price rules.

is_filterable_in_search

int

0

Whether or not the attribute values can
be used to filter the search results.

used_in_product_listing

int

0

Whether or not the attribute values will
be rendered in the catalog.

used_for_sort_by

int

0

Whether or not the attribute values can be
used to sort the catalog.

is_visible_in_advanced_search

int

0

Whether or not, the attribute is visible in
the advanced search

position

int

99

Position of the attribute in the layered
navigation block.

is_wysiwyg_enabled

int

0

Whether or not, the WYSIWYG editor has to be
enabled to edit the attribute’s value.

is_used_for_promo_rules

int

0

Whether or not, the attribute can be used
to create promo rules.

is_required_in_admin_store

int

0

Whether or not, the attribute must has a
value in the admin store.

is_used_in_grid

int

0

Is used in the grid.

is_visible_in_grid

int

0

Is visible in the grid.

is_filterable_in_grid

int

0

Is filterable in the grid.

search_weight

float

1

Search weight.

additional_data

text

swatch_input_type=visual, update_product_preview_image=0,
us`e_product_image_for_swatch=0`

A comma (,) separated list with additional attributes,
which are necessary to create Visual Swatch or Text Swatch attributes.