eikona-media/akeneo3-0-tessa-connector
Verify Akeneo API Readiness
GET /api/rest/v1/associations).Install the Bundle
composer require eikona-media/akeneo3-0-tessa-connector
Register Routing
Append to app/config/routing.yml:
tessa_media:
resource: "@EikonaTessaConnectorBundle/Resources/config/routing.yml"
Configure TESSA Connection
app/config/parameters.yml:
tessa.connector.client_id: "your_client_id"
tessa.connector.client_secret: "your_client_secret"
tessa.connector.endpoint: "https://your-tessa-instance.com/api"
First Use Case: Sync a Product Image
$product = $productRepository->find(123);
$tessaService = $this->get('eikona_tessa.connector');
$assetUrl = $tessaService->getAssetUrl($product->getImage());
$product->setImage($assetUrl);
$productManager->save($product);
Asset Upload Workflow
product_image.jpg) in Akeneo.tessa_asset_id field).// In a custom Akeneo event subscriber
$event = $this->get('eikona_tessa.connector')->uploadAsset(
$filePath,
['product_id' => $product->getId(), 'type' => 'image']
);
$product->setTessaAssetId($event->getAssetId());
Asset Retrieval Workflow
$assetUrl = $this->get('eikona_tessa.connector')->getAssetUrl(
$product->getTessaAssetId()
);
return new Response($assetUrl);
Bulk Sync
$job = new TessaSyncJob($productRepository->findAll());
$this->get('akeneo.job_executor')->execute($job);
tessa_asset_id, tessa_metadata).
# config/akeneo/product.yml
akeneo_product:
fields:
tessa_asset_id: ~
tessa_metadata: ~
$cache = $this->get('akeneo.cache.warmer');
$cache->set("tessa_url_{$assetId}", $assetUrl, 3600);
API Authentication Failures
401 Unauthorized errors when calling TESSA.client_id/client_secret in parameters.yml and ensure TESSA’s OAuth2 server is reachable.var/log/dev.log for HTTP client errors.Missing Akeneo API Permissions
READ/WRITE permissions for /api/rest/v1/products.File Size Limits
php.ini (upload_max_filesize, post_max_size) and TESSA’s API limits.Routing Conflicts
No route found for /tessa-media/* endpoints.routing.yml and no other bundle overrides it.# app/config/config.yml
monolog:
handlers:
tessa:
type: stream
path: "%kernel.logs_dir%/tessa_connector.log"
level: debug
curl to verify TESSA API connectivity:
curl -X GET "https://your-tessa-instance.com/api/assets" \
-H "Authorization: Bearer YOUR_TOKEN"
Custom Asset Metadata Extend the connector to include custom metadata during upload:
// Override EikonaTessaConnectorBundle/Service/Connector.php
public function uploadAsset($file, array $metadata = []) {
$metadata['custom_field'] = 'value';
return parent::uploadAsset($file, $metadata);
}
Webhook Handlers Create a custom event subscriber for TESSA webhooks:
// src/Acme/TessaBundle/EventListener/TessaWebhookListener.php
class TessaWebhookListener implements EventSubscriberInterface {
public static function getSubscribedEvents() {
return [
'tessa.asset.updated' => 'onAssetUpdated',
];
}
public function onAssetUpdated(AssetEvent $event) {
$product = $this->findProductByTessaId($event->getAssetId());
$product->setImage($event->getUrl());
$this->saveProduct($product);
}
}
Batch Processing Optimize bulk operations by chunking requests:
$chunkSize = 50;
foreach (array_chunk($products, $chunkSize) as $chunk) {
$this->get('eikona_tessa.connector')->syncBatch($chunk);
}
How can I help you explore Laravel packages today?