egio/magento2-module-attributeimport 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

egio/magento2-module-attributeimport

最新稳定版本:1.0.0

Composer 安装命令:

composer require egio/magento2-module-attributeimport

包简介

README 文档

README

Overview

The Attribute Import module for Magento 2 provides an efficient way to import product attribute options using CSV files.

Features

  • Import attribute options from CSV files
  • Support for multilingual attribute options (store views)
  • Support for swatch attributes (text and visual swatches)
  • Comprehensive validation of import data before processing
  • Detailed logging of import processes
  • Ability to set default attribute options

Installation

Via Composer

  1. Run the following commands in your Magento root directory:
    composer require egio/magento2-module-attributeimport
    bin/magento module:enable Egio_AttributeImport
    bin/magento setup:upgrade

Manual Installation

  1. Create the directory: app/code/Egio/AttributeImport
  2. Download and extract the module contents into the directory
  3. Run the following commands:
    bin/magento module:enable Egio_AttributeImport
    bin/magento setup:upgrade

Usage

CSV Format

For Visual Swatch or Text Swatch Attributes:

attribute_code store_view value swatch sort_order is_default
color admin Red #FF0000 10 1
color EN Red #FF0000
color FR Rouge #FF0000
color admin Blue #0000FF 20 0
color EN Blue #0000FF
color FR Bleu #0000FF

Note:

  • For visual swatches: A hex color code (e.g., #FF0000) or an image URL
  • For text swatches: Any text value

For Dropdown Attributes:

attribute_code store_view value sort_order is_default
size admin Small 10 0
size EN Small
size FR Petit
size admin Medium 20 1
size EN Medium
size FR Moyen

CSV Column Descriptions:

Column Description
attribute_code The internal code of the attribute being updated
store_view admin for default values, or store code for store-specific translations
value The attribute option label
swatch (For swatch attributes only) Any text value or a color hex code/image path
sort_order Determines the option's display order
is_default 1 to set as the default option, 0 otherwise

Admin Interface

  1. Navigate to System > Import > Import Attributes
  2. Select the attribute you want to update
  3. Upload your CSV file
  4. Click "Check Data" to validate the file and preview the attribute options
  5. If validation is successful, click "Import" to process the import

Logs

Import logs are stored in var/log/attribute_import.log and include:

✅ Timestamp of each event
✅ Success and error messages
✅ Detailed validation issues

Requirements

Software Version
Magento 2.4.6
PHP 8.1.27

License

This module is licensed under the MIT License.

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-02