Das import-attribute Modul bietet Attribute Import-Funktionalität für das Pacemaker Import-System. Es ist ein Tier 4 Modul und dient als Basis für Attribute-bezogene Importer.
Hauptverantwortung:
- EAV Attribute Import
- Attribute Options Import
- Repository Pattern für Attribute-Persistierung
- Service Layer für Attribute-Verarbeitung
- Observer Pattern für Attribute-Hooks
- 4 Dependents (attribute-set, converter-customer-attr, converter-product-attr)
- AttributeRepository: Persistierung von Attributen
- AttributeOptionRepository: Persistierung von Attribute Options
- AttributeProcessor: Service Layer für Attribute-Verarbeitung
- AttributeObserver: Observer für Attribute-Hooks
- AttributeOptionObserver: Observer für Attribute Options
- Observer Pattern: Für Attribute-Hooks
- Repository Pattern: Für Daten-Persistierung
- Service Layer: Für Business Logic
- Factory Pattern: Für Object-Erstellung
- Keine - Nur Importer-Implementierungen
- import ^18.1 - Core Framework
- import-attribute-set - Attribute Set Importer
- import-converter-customer-attribute - Customer Attribute Converter
- import-converter-product-attribute - Product Attribute Converter
- import-cli-simple - Master CLI
// Attribute Repository
AttributeRepository::create($row): void
AttributeRepository::update($row): void
AttributeRepository::findByCode($code): array
// Attribute Option Repository
AttributeOptionRepository::create($row): void
AttributeOptionRepository::findByCode($code): array// Attribute Observer
AttributeObserver::handle($row): void
// Attribute Option Observer
AttributeOptionObserver::handle($row): voidKeine Events - Tier 4 Importer-Modul
- Tier 4 Modul: Basis für Attribute-bezogene Importer
- EAV-fokussiert: Spezialisiert auf EAV Attribute
- Observer Pattern: Für Attribute-Hooks
- Repository Pattern: Für Daten-Persistierung
- 4 Dependents: Basis für spezialisierte Importer
- EAV-Kompatibilität: Beachte EAV-Struktur
- Observer-Kompatibilität: Neue Observers sollten optional sein
- Backward Compatibility: Alte Imports sollten noch funktionieren
- Nutze Observer Pattern für Custom Attribute-Processing
- Beachte Attribute-Optionen bei Imports
- Erwäge Attribute-Validierung
code,label,frontend_label,attribute_type,input_type
custom_color,Custom Color,Color,varchar,select
custom_size,Custom Size,Size,varchar,select
custom_brand,Brand Name,Brand,text,text- Multi-Language Attributes: Attribute mit Übersetzungen aus Excel
- Custom Product Attributes: Spezialisierte Attributes für Produktkategorien
- Attribute-Options: Selectable-Options wie Farben, Größen
- Dropdown-Population: Tausende von Attribute-Options
- Attribute-Lookup: Code-basierte Suche kostet ~2-5ms pro Attribute
- Options-Insert: Batch-Inserts für Options sind 10x schneller als Individual
- EAV-Structure: EAV speichert jedes Attribut separat - mehr Writes als Columns
- Optimal für: 100-1.000 Attributes mit bis zu 10.000 Options
- Index-Overhead: Attribute-Indexes benötigen ~20-30% extra Storage
- import-attribute-set: Nutzt Attributes für Attribute-Sets
- import-converter-customer-attribute: Konvertiert Customer Attributes
- import-converter-product-attribute: Konvertiert Product Attributes
- import-attribute ← diese Datei
Q: "Attribute code already exists" Fehler
- A: Attributes sind eindeutig per Code. Nutze Update-Mode statt Create, oder andere Codes.
Q: Attribute-Options werden nicht importiert
- A: Options müssen nach Attribute-Erstellung importiert werden. Attribute muss existieren in DB.
Q: "Unsupported attribute type" Fehler
- A: Nur standard Magento Types unterstützt:
varchar,text,int,decimal,static. Custom Types nicht möglich.
- EAV-Only: Nur EAV Attribute unterstützt
- Keine Attribute-Validierung: Validierung erfolgt in Importern
- Keine Attribute-Sets: Attribute-Sets sind in
import-attribute-set
import-attribute ist ein Tier 4 Modul, das Attribute Import-Funktionalität für das Pacemaker-System bietet. Es ist die Basis für Attribute-bezogene Importer und unterstützt EAV Attribute und Attribute Options.
Für Agenten: Verstehe dieses Modul als Attribute Importer mit Observer Pattern und Repository Pattern.