Install the Package
composer require akeneo/icecat-connector 2.1.*
Ensure compatibility with your Akeneo PIM version (e.g., >= v2.2 - < 3.0).
Register the Bundle
Update app/AppKernel.php to include:
new \Pim\Bundle\IcecatConnectorBundle\PimIcecatConnectorBundle(),
new \Pim\Bundle\ExtendedAttributeTypeBundle\PimExtendedAttributeTypeBundle(),
new \Pim\Bundle\ExtendedMeasureBundle\PimExtendedMeasureBundle(),
Add routing in app/config/routing.yml:
pim_icecat_connector:
resource: "@PimIcecatConnectorBundle/Resources/config/routing.yml"
prefix: /icecat
Set Up Database Schema Run:
bin/console doctrine:schema:update --force
Configure Icecat Credentials Navigate to Akeneo Admin → Icecat Connector to input:
ean).First Use Case: Download Icecat Features
Run the icecat_download_features import profile to generate a CSV mapping template (featuresList.csv).
Example:
bin/console akeneo:import:execute icecat_download_features
icecat_download_features to fetch Icecat’s feature list (CSV).
Edit the CSV to map Icecat feature_id to Akeneo pim_attribute_code.
Example:
feature_id,pim_attribute_code,ignore_flag
12345,weight,0
67890,color,0
icecat_import_features_mapping to validate and apply mappings.
bin/console akeneo:import:execute icecat_import_features_mapping
icecat_enrich_products import profile via Akeneo UI or CLI:
bin/console akeneo:import:execute icecat_enrich_products
0 3 * * * bin/console akeneo:import:execute icecat_enrich_products --env=prod
config.yml under measures_config:
measures_config:
Weight:
standard: KILOGRAM
units:
KILOGRAM:
convert: [{'mul': 1}]
symbol: 'kg'
bin/console pim:measures:check
PimIcecatConnectorBundle’s IcecatClient service for debugging.API Rate Limits
IcecatClient:
// Example: Add delay between requests
sleep(1); // 1-second delay
var/log/prod.log).Mapping Errors
weight) mapped to Akeneo text attributes will fail silently. Validate with:
bin/console akeneo:import:execute icecat_import_features_mapping --validate-only
Locale Fallbacks
fallback_locale is misconfigured, enriched data may default to INT (International), losing localization. Test with:
bin/console akeneo:import:execute icecat_enrich_products --locale=en_US
Deprecated Commands
csv-base-import commands. Update to xml-base-import (e.g., icecat-job-instance-xml-base-import-show).API Connection Issues
// In config/services.yaml
Pim\Bundle\IcecatConnectorBundle\Client\IcecatClient:
arguments:
- '@logger'
- !tagged 'icecat.client'
Job Failures
APP_ENV=dev APP_DEBUG=1 bin/console akeneo:import:execute icecat_enrich_products
Custom Icecat Client
Extend IcecatClient to add headers or retry logic:
namespace App\Bundle\Client;
use Pim\Bundle\IcecatConnectorBundle\Client\IcecatClient as BaseClient;
class CustomIcecatClient extends BaseClient {
public function fetchProductData($ean) {
$this->client->setDefaultOption('headers', ['X-Custom-Header' => 'value']);
return parent::fetchProductData($ean);
}
}
Register as a service in services.yaml:
Pim\Bundle\IcecatConnectorBundle\Client\IcecatClient: '@app.custom_icecat_client'
Post-Enrichment Processing
Use Akeneo’s Mass Edit Actions to transform Icecat data (e.g., convert weight from grams to kg):
// In a custom mass edit action
$product->setValue('weight', $product->getValue('weight') / 1000);
Measure Unit Overrides
Override default measures in config/packages/pim_measures.yaml:
pim_measures:
measures_config:
Length:
units:
CENTIMETER:
convert: [{'mul': 0.01}] # Override to meters
icecat_enrich_products to 100–500 products per job to avoid timeouts.// In IcecatClient
$cache = $this->container->get('pim_cache');
$cachedFeatures = $cache->get('icecat_features');
How can I help you explore Laravel packages today?