Skip to content

Developer notes

Technical reference for developers who customize Kaufland Marketplace Connector.

Item Value
Add-on id kv_kaufland
Function prefix fn_kv_kaufland_
Language variables kv_kaufland.*
CSS scope .kv-kaufland
PHP namespace Tygh\Addons\KvKaufland
Preset marketplace (generated by kv new --kind integration)
Class Role
Client\BaseClient HTTP (cURL, TLS verification, timeouts), JSON, per-request header hook, error mapping, masked logging
Client\Api Kaufland Seller API v2 calls: request signing (Shop-Client-Key, Shop-Timestamp, Shop-Signature = HMAC-SHA256 over method, URI, body, timestamp), storefronts, Playground routing in test mode
Drivers\Kaufland\Driver, Mapper The hub driver (listing flow, bulk inventory, orders, shipping, returns, subscriptions) and the pure field mapping
Client Client per company, the connection test
Accounts, Secret Credentials (test and live) sealed with AES-256-GCM; one account per store owner or per vendor
Config, Access Settings, owner mode, who may see and manage what
Queue, Jobs, JobException Job queue: back-off 5 min / 15 min / 1 h / 3 h / 12 h, per-job isolation, overlap lock; handlers in Jobs::handle(), recurring work in Jobs::schedule()
Log Event log with masking, filters, CSV, retention
Webhook Signature check of push notifications (Shop-Signature over the callback URL) and event ids; the controller kv_kaufland.webhook?c=<account> answers the subscription challenge (GET) and stores the event as a job (POST)
Table Purpose
?:kv_kaufland_accounts Credentials per company (secrets sealed), last connection check, token cache
?:kv_kaufland_log Log
?:kv_kaufland_jobs Queue
?:kv_kaufland_product_map, ?:kv_kaufland_order_map Product mapping and imported orders

PHP hooks: update_product_post (marks the mapped product dirty so the next sync pushes stock and price), delete_product_post (removes the mapping of a deleted product), init_templater_post (runs the Upgrade Synchronizer). Template hooks are in design/backend/templates/addons/kv_kaufland/hooks/ (add-on list and settings pages).

The base URL can be overridden for tests in config.local.php (development only):

$config['kv_kaufland_base_url'] = 'http://127.0.0.1:11864/v2';

node tests/mock-server/server.js 11864 starts a local stand-in of the Kaufland Seller API (it verifies the request signature, as Kaufland does); node tests/e2e/e2e.mjs runs the HTTP end-to-end test against it; php tests/unit.php runs the unit tests.

Admin templates live in design/backend/templates/addons/kv_kaufland/. Do not edit them in a store; they are replaced on update.