macopedia/magento2-categoryimporter

Magento 2 分类导入器

安装数: 4,428

依赖者: 0

建议者: 0

安全性: 0

星标: 34

关注者: 16

分支: 23

开放问题: 2

类型:magento2-module

1.0.0 2020-06-10 12:50 UTC

This package is auto-updated.

Last update: 2024-09-06 08:18:04 UTC


README

从CSV文件简单导入分类。允许从Magento商店(使用旧商店分类ID)导入/更新分类

特性

  • 为分类添加属性 '旧分类ID'
  • 允许通过命令选项添加自定义属性代码
  • 通过 '旧分类ID' 添加父分类和子分类之间的链接
  • 仅适用于管理员商店(尚未实现多商店功能)

安装模块

  • 通过composer添加模块或下载并复制文件到app/code/Macopedia/CategoryImporter
  • 在命令行中运行 bin/magento module:enable Macopedia_CategoryImporter

使用方法

注意

  • 请将文件中的父分类添加到子分类之前
  • 在文件中使用分号 (';') 作为分隔符

默认支持属性

  • 必需属性

    • id
    • name
    • parent_id
  • 具有预定义值的可选属性

    • is_active - 默认值:1
    • is_anchor - 默认值:1
    • include_in_menu - 默认值:1
    • custom_use_parent_settings - 默认值:1
  • 基本附加属性

    • description
    • meta_title
    • meta_keywords
    • meta_description
    • url_key
    • url_path
    • position

基本使用示例

bin/magento import:categories [--path|-p <path to file in Magento dir>] [--additional|-a <additional attributes separated by comma>]

bin/magento import:categories -p var/import/categories-example.csv 
	
bin/magento import:categories -p var/import/categories-example.csv -a my_custom_attribute1,my_custom_attribute2,my_custom_attribute3

用于导入分类的简单CSV文件

id;name;parent_id
10;Category name 1;null
11;Category name 2;null
20;First child of cat 1;10
21;First child of cat 2;11
22;Second child of cat 2;11