eikona-media/akeneo3-2-tessa-connector
Verify Akeneo API Readiness
Ensure Akeneo 3.2 API is functional (test via GET /api/rest/v1/products).
Debug Apache if authentication headers are stripped (see Akeneo Troubleshooting).
Install the Bundle
composer require eikona-media/akeneo3-2-tessa-connector
Register Routing
Append to app/config/routing.yml:
tessa_media:
resource: "@EikonaTessaConnectorBundle/Resources/config/routing.yml"
Configure TESSA Connection
Set TESSA API credentials in app/config/parameters.yml:
parameters:
tessa.connector.api_url: "https://your-tessa-instance/api"
tessa.connector.api_key: "your-api-key"
First Use Case: Sync a Product Image Use the CLI command to push an Akeneo product image to TESSA:
php bin/console tessa:media:sync --product="PRODUCT_SKU" --media-file="image.jpg"
Media Synchronization
php bin/console tessa:media:push --product="SKU" --media-code="IMAGE_CODE"
php bin/console tessa:metadata:pull --product="SKU"
Event-Driven Integration
product.save) to auto-trigger syncs:
// In a custom event subscriber
public function onProductSave(ProductUpdateEvent $event) {
$this->tessaSyncService->syncProduct($event->getProduct());
}
Batch Processing
tessa:media:batch command to sync media for multiple products:
php bin/console tessa:media:batch --products="SKU1,SKU2"
# app/config/tessa_connector.yml
field_mapping:
tessa_alt_text: "akeneo_custom_field.alt_text"
Cache component).API Rate Limits
try {
$response = $tessaClient->upload($media);
} catch (RateLimitException $e) {
sleep($e->getRetryAfter());
retry();
}
Media File Paths
tessa_connector.yml:
media_root_dir: "%kernel.project_dir%/var/media"
Authentication Headers
Authorization headers are included. Extend the HTTP client:
$client = new Client([
'headers' => [
'Authorization' => 'Bearer ' . $this->apiKey,
],
]);
TESSA_CONNECTOR_DEBUG=1 in .env to log raw API requests/responses.bin/console debug:event-dispatcher to verify Akeneo events are firing.image_1) match TESSA’s expected format.Custom Sync Logic
Extend the TessaSyncService to add pre/post-sync hooks:
// src/Eikona/TessaConnectorBundle/Service/TessaSyncService.php
public function syncProduct(Product $product) {
$this->preSync($product);
// Default sync logic
$this->postSync($product);
}
New Media Types
Add support for non-standard file types (e.g., 3D models) by extending the MediaHandler interface:
class CustomMediaHandler implements MediaHandlerInterface {
public function handle(MediaInterface $media) {
// Custom logic for .gltf files
}
}
Webhook Endpoint Create a custom controller to handle TESSA webhook payloads:
// src/Controller/TessaWebhookController.php
class TessaWebhookController extends Controller {
public function handleWebhook(Request $request) {
$payload = json_decode($request->getContent(), true);
$this->tessaSyncService->processWebhook($payload);
}
}
How can I help you explore Laravel packages today?