Skip to content

Developer notes

Technical reference for developers who customize OTTO Market Connector.

Item Value
Add-on id kv_otto_market
Function prefix fn_kv_otto_market_
Language variables kv_otto_market.*
CSS scope .kv-otto-market
PHP namespace Tygh\Addons\KvOttoMarket
Preset marketplace (generated by kv new --kind integration)
Class Role
Client\BaseClient HTTP (cURL, TLS verification, timeouts), JSON, OAuth2 client-credentials with an encrypted token cache, error mapping, masked logging
Client\Api The OTTO calls: POST /v1/token (client credentials, scope list), shipping profiles, products v5 (categories, brands, upload, prices, update tasks), availability v1, orders v4, shipments v1, returns v3
Drivers\OTTO\Driver, Drivers\OTTO\Mapper The channel driver of the hub (Hub\DriverInterface) and its pure translation layer; category and attribute ids are x + 20 hex characters of md5(name) because the hub stores ids as [0-9A-Za-z_-] and OTTO identifies categories and attributes by their German names
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 Generic base of the hub (signature check, event ids); unused for OTTO, which has no push notifications
Table Purpose
?:kv_otto_market_accounts Credentials per company (secrets sealed), last connection check, token cache
?:kv_otto_market_log Log
?:kv_otto_market_jobs Queue
?:kv_otto_market_product_map, ?:kv_otto_market_order_map Product mapping and imported orders

PHP hooks (init.php): update_product_post and delete_product_post (mark mapped products dirty / remove the mapping) and init_templater_post (registers the licence status Smarty plugin, works on Smarty 4 and 5). Template hooks live in design/backend/templates/addons/kv_otto_market/hooks/ (add-on list status, styles).

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

$config['kv_otto_market_base_url'] = 'http://127.0.0.1:11983';

node tests/mock-server/server.js 11983 starts a local stand-in of the OTTO Market API that follows the official OpenAPI specifications (api.otto.market/docs/specs/public); 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_otto_market/. Do not edit them in a store; they are replaced on update.