Check Compatibility
akeneo/demo-bundle) exists for your Akeneo version.Installation
composer require --prefer-dist akeneo/icecat-demo-bundle:dev-master
app/AppKernel.php (or config/bundles.php for Symfony 4+):
new Pim\Bundle\IcecatDemoBundle\PimIcecatDemoBundle(),
Configure Parameters
Update app/config/parameters.yml (or .env for Symfony 4+):
installer_data: 'PimIcecatDemoBundle:icecat_demo'
First Data Load Run in production environment (as warned in the README):
./install.sh db # If using Akeneo's install script
php app/console doctrine:fixtures:load --append --fixtures=vendor/akeneo/icecat-demo-bundle/Pim/Bundle/IcecatDemoBundle/DataFixtures/
php app/console cache:clear --env=prod
php app/console pim:icecat-demo:import --env=prod
php app/console pim:completeness:calculate --env=prod
php app/console pim:versioning:refresh --env=prod
Use Case: Quick PIM Demo Setup
doctrine:fixtures:load.pim:icecat-demo:import to enrich data (e.g., add technical specs, images).pim:completeness:calculate) to simulate a "ready for launch" state.Integration with Akeneo Features
energy_efficiency_class, screen_size). Extend existing Akeneo attribute types to support these.Customization
DataFixtures/) to add custom products or modify existing ones.pim:icecat-demo:import command to run additional logic (e.g., send notifications, update inventory).
# config/services.yaml (Symfony 4+)
services:
App\Command\PostIcecatImportCommand:
tags:
- { name: 'console.command' }
arguments:
$icecatImporter: '@pim_icecat_demo.importer'
Testing
Deprecation Warning
akeneo/demo-bundle). If stuck with this bundle, pin to a specific dev-master commit and avoid updates.Database Overwrite
install.sh db command drops and recreates your database. Always back up first.--append with doctrine:fixtures:load to avoid accidental data loss in development.Missing Dependencies
Pim\Bundle\CatalogBundle). If missing, install via:
composer require akeneo/pim-community-standard
Icecat-Specific Attributes
energy_efficiency_class may not exist in your Akeneo instance.pim_catalog_installer:create-attribute).Command Order Matters
pim:completeness:calculate before pim:icecat-demo:import may fail due to missing product data.Check Fixture Loading
# app/config/config_dev.yml
doctrine:
dbal:
logging: true
var/log/dev.log.Icecat Importer Logs
pim:icecat-demo:import command may log issues to var/log/prod.log. Add --verbose for details:
php app/console pim:icecat-demo:import --env=prod --verbose
Symfony Cache Issues
php app/console cache:clear --env=prod --no-debug
Custom Icecat Data Sources
# config/services.yaml
pim_icecat_demo.importer:
class: App\Service\CustomIcecatImporter
arguments:
- '@pim_catalog.repository.product'
Post-Import Events
pim_icecat_demo.import event to trigger actions:
// src/EventListener/IcecatImportListener.php
class IcecatImportListener implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
'pim_icecat_demo.import' => 'onIcecatImport',
];
}
public function onIcecatImport(IcecatImportEvent $event)
{
// Custom logic (e.g., update inventory, send emails)
}
}
Attribute Mapping
// src/DependencyInjection/Compiler/IcecatPass.php
public function process(ContainerBuilder $container)
{
$definition = $container->findDefinition('pim_icecat_demo.importer');
$definition->addMethodCall('addAttributeMap', [
'icecat_field' => 'akeneo_attribute_code',
]);
}
How can I help you explore Laravel packages today?