egio / magento2-module-attributeimport
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: >=8.1
- magento/framework: 103.0.*
Requires (Dev)
- roave/security-advisories: dev-latest
This package is not auto-updated.
Last update: 2025-07-07 23:26:48 UTC
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
- 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
- Create the directory:
app/code/Egio/AttributeImport
- Download and extract the module contents into the directory
- 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
- Navigate to System > Import > Import Attributes
- Select the attribute you want to update
- Upload your CSV file
- Click "Check Data" to validate the file and preview the attribute options
- 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.