Developer notes
Technical reference for developers who customize eBay Marketplace Connector.
Add-on identity
Section titled “Add-on identity”| Item | Value |
|---|---|
| Add-on id | kv_ebay |
| Function prefix | fn_kv_ebay_ |
| Language variables | kv_ebay.* |
| CSS scope | .kv-ebay |
| PHP namespace | Tygh\Addons\KvEbay |
| Preset | marketplace (generated by kv new --kind integration) |
Structure
Section titled “Structure”| Class | Role |
|---|---|
Client\BaseClient |
HTTP (cURL, TLS verification, timeouts), JSON, error mapping, masked logging, response headers |
Client\Api |
The eBay calls: OAuth (consent URL, code exchange, refresh, application token), Sell Inventory, Sell Fulfillment (own host), Sell Account, Commerce Taxonomy |
Drivers\EBay\Mapper |
Pure translation hub arrays <-> eBay JSON (inventory item, offer, bulk price and quantity, orders, categories, aspects), unit tested with samples in tests/samples |
Drivers\EBay\Driver |
Hub driver: create / update / publish, bulk inventory, order pull, shipping fulfillment; cancellations and returns are not implemented |
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 |
Scaffold class; eBay notifications are not used (polling) |
Database tables
Section titled “Database tables”| Table | Purpose |
|---|---|
?:kv_ebay_accounts |
Credentials per company (secrets sealed), last connection check, token cache |
?:kv_ebay_log |
Log |
?:kv_ebay_jobs |
Queue |
?:kv_ebay_product_map, ?:kv_ebay_order_map |
Product mapping and imported orders |
Hooks used
Section titled “Hooks used”See init.php (product / order hooks of the Marketplace Hub) and design/backend/templates/addons/kv_ebay/hooks/ (license status bars, add-on page styles).
Test the HTTP layer without the provider
Section titled “Test the HTTP layer without the provider”The base URL can be overridden for tests in config.local.php (development only):
$config['kv_ebay_base_url'] = 'http://127.0.0.1:11893';node tests/mock-server/server.js 11893 starts a local stand-in of the eBay APIs (OAuth token endpoint, Inventory, Fulfillment, Account, Taxonomy; one host serves them all); node tests/e2e/e2e.mjs runs the HTTP end-to-end test against it; php tests/unit.php runs the unit tests.
Template overrides
Section titled “Template overrides”Admin templates live in design/backend/templates/addons/kv_ebay/. Do not edit them in a store; they are replaced on update.