conneqt/m2-auto-create-attributes

用于Magento 2的Conneqt模块,可自动通过API创建和填充属性和属性集

安装次数: 3,811

依赖项: 0

建议者: 0

安全性: 0

类型:magento2-module

2.1.2 2023-06-26 13:33 UTC

This package is auto-updated.

Last update: 2024-08-26 16:15:50 UTC


README

如何安装

composer require conneqt/m2-auto-create-attributes

如何使用

在通过API创建产品更新调用时,可以通过以下方式添加属性:通过extension_attributes -> custom_conneqt_attributes

{
    "product": {
        "sku": "312.ABC",
        "extension_attributes": {
            "custom_conneqt_attributes":  [
                {
                    "attribute_type": "select",
                    "attribute_code": "string",
                    "value": "string"
                }
            ]
        }
    }
}

还可以使用此模块来管理属性组,如果您想使用,可以按照以下示例操作:

{
    "product": {
        "sku": "312.ABC",
        "extension_attributes": {
            "custom_conneqt_attribute_set": {
                "attribute_set_name": "ABC123",
                "auto_create": false,
                "attributes": [
                    {
                        "attribute_code": "string",
                        "attribute_group_name": "general"
                    },
                    {
                        "attribute_code": "string2"
                    }
                ]
            }
        }
    }
}