akeneo/excel-connector-bundle
Installation:
composer require akeneo-labs/excel-connector-bundle:1.6.*
Enable in AppKernel.php:
new Akeneo\Bundle\SpreadsheetParserBundle\AkeneoSpreadsheetParserBundle(),
new Pim\Bundle\ExcelConnectorBundle\PimExcelConnectorBundle(),
Clear cache:
php app/console cache:clear --env=prod
First Use Case:
Electronics, Clothing)Laptops, T-Shirts)sku, name, price)Excel as the job type).Catalog Initialization:
init.xlsx to define families, categories, and attributes in one go.Family Tab:
| Family | Channels |
|--------|----------|
| Laptops| ecommerce|
Attribute Tab:
| Code | Type | Localizable | Scopable |
|-------|---------|-------------|----------|
| price | pprice | No | Yes |
php app/console pim:excel-connector:init --file=init.xlsx
Product Import/Export:
sku, name, price).| sku | name | price | family |
|-------|---------|-------|--------|
| LAP001| MacBook | 999.99| Laptops|
Excel job type).CLI Automation:
$job = $this->get('pim_connector.excel.job');
$job->run('path/to/products.xlsx');
text/textarea attributes (e.g., model_number).init.xlsx to define mappings.Excel Compatibility:
Channel Mismatches:
init.xlsx.Attribute Code Conflicts:
price vs. PRICE). Use the Attributes tab in init.xlsx to define codes.Deprecation Warning:
var/log/prod.log for validation errors during imports.php app/console debug:config pim_excel_connector
Custom Templates:
init.xlsx template by copying it to app/Resources/PimExcelConnectorBundle/templates/ and overriding sheets.Event Listeners:
pim_excel_connector.pre_import or pim_excel_connector.post_import events to preprocess/postprocess data:
// src/Acme/ExcelConnector/EventListener/ExcelImportListener.php
public function onPreImport(PreImportEvent $event) {
$data = $event->getData();
// Modify $data before import
}
Register in services.yml:
services:
acme.excel_listener:
tag: { name: kernel.event_listener, event: pim_excel_connector.pre_import, method: onPreImport }
Attribute Mappings:
config.yml:
pim_excel_connector:
attribute_mappings:
pprice: price # Map Excel 'price' to Akeneo 'pprice'
How can I help you explore Laravel packages today?