Appearance
Skroutz Marketplace Integration
Flow ID: IN-02 Module(s): eshop, webhooks, feeds, Transporters/Skroutz Complexity: High Last Updated: 2026-04-03
Business Context
Full Skroutz SmartCart integration covering: webhook-based order reception, admin accept/reject with stock validation, XML product feed generation, invoice upload, and Skroutz Last Mile courier integration.
Components
1. Order Reception (webhook): ecommercen/webhooks/AdvSmartCart.php receives new_order and order_updated events. New orders must have state='open'. Express orders auto-accept when state transitions to 'accepted'.
2. Order Management (admin): Adv_skroutz_orders_admin.php — listing with status filter, accept with stock validation + pickup window/location selection, reject with line-item reasons or order-level reason.
3. Product Feed: ecommercen/feeds/controllers/AdvSkroutzXml.php generates XML with: uid, name, image, category breadcrumb, VAT, manufacturer, EAN, stock, price, availability, weight, size, color. Supports color splitting (separate items per color variant).
4. Invoice Upload: SkroutzOrders::uploadInvoice() — POST multipart PDF to Skroutz API.
5. Skroutz Last Mile Courier: src/Transporters/Skroutz/Skroutz.php — createVoucher, cancelVoucher, trackAndTrace, getVoucherPdf, getPickingPoints. REST JSON with Bearer auth.
Order Acceptance Flow
- Admin reviews order in listing
- Stock validated:
getLiveProductsParsed()checks per-SKU stock >= quantity (bypassable viaDISABLE_PRODUCT_STOCK_CHECK) - API call:
SkroutzOrders::acceptOrder()with pickup params - Create fake cart + guest customer →
create_order_admin()with status=PAID, provider='skroutz_smart_cart' - Fire
afterOrderSuccessHooks()(ERP sync)
Product Matching
Line items matched via shop_product.skroutz_id (UID). Size/color resolved from registry-configured attribute/variation groups (AFFILIATION_ATTRS_GROUPS.GROUPS_FOR_SIZE/COLOR).
Key Tables
| Table | Purpose |
|---|---|
skroutz_orders | Order header (code, state, courier, expires_at, customer, address) |
skroutz_line_items | Order items (shop_uid, product_name, quantity, price, size, color) |
skroutz_invoice_details | Invoice data (company, VAT, DOY) for B2B orders |
Registry Configuration
| Key | Purpose |
|---|---|
SMARTCART.IS_ENABLED | Master toggle |
SMARTCART.API_URL | SmartCart API base URL |
SMARTCART.API_KEY | API bearer token |
SMARTCART.DISABLE_PRODUCT_STOCK_CHECK | Bypass stock validation |
XML_FEEDS.IS_ENABLED_SKROUTZ | Enable XML feed |
XML_FEEDS.SKROUTZ_TOKEN | Feed authentication |
Live Testing Findings
Order Volume: Live database contains 46,246 Skroutz orders (2021-07 to 2022-12) with 102,463 line items, averaging ~2.2 items per order. This makes Skroutz the dominant marketplace channel by a wide margin.
Marketplace Comparison: Skroutz is the only active marketplace in this client's database. All other marketplace integrations show 0 rows:
| Marketplace | Orders |
|---|---|
| Skroutz | 46,246 |
| Shopflix | 0 |
| Public | 0 |
| IRIS | 0 |
| JCC | 0 |
REST API: The endpoint rest/marketplace/skroutz/order returns HTTP 200 with proper JWT authentication, confirming the REST layer is operational.
Related Flows
- AD-11 Marketplace Orders — shared marketplace patterns
- IN-01 Feed Generation — XML feed details
- IN-09 Transporter Integrations — Skroutz Last Mile