Skip to content

Admin UI & profiles

The admin module lives under Catalog ▸ Fujin Shuttle ▸ Import / Export profiles (a regular-database icon in Flyokai blue). Everything here is built around the import/export profile — a saved, re-runnable configuration.

What a profile is

A profile bundles everything needed to run one import or export:

Field Meaning
Name Human label.
Type One of the seven data types.
Transfer mode import (CSV → Shopware) or export (Shopware → CSV).
File The CSV to import (uploaded, chunk-uploaded, or a server-side file).
Columns Detected automatically from the CSV header when a file is attached.
Options Dry-run, batch size, concurrency, reindex mode, parent category, …

Profiles are stored in the fujin_profile / fujin_profile_column tables. Runs are recorded in fujin_job / fujin_job_log (see Database schema).

Pages

The module (flyokai-fujin-shuttle) defines three pages:

Page Route Component
Profile list flyokai.fujin.shuttle.list (/sw/fujin-shuttle/list) fujin-shuttle-list
Create / edit …create and …detail/:id fujin-shuttle-detail
Run monitor …run/:id fujin-shuttle-run

Two reusable components render run state: fujin-job-status (progress bar + status badge) and fujin-run-status (the live, polling run panel with the stop button).

List

A table of all profiles with name, type and transfer mode, plus per-profile actions: edit, run, view last run, export, delete, and create new.

Create / edit

Build the profile:

  • General — name, type, transfer mode.
  • Template & example — one-click download of the header template or an example file for the selected type (so you always start from valid headers — see the CSV reference).
  • CSV source (import) — upload a file, browse server-side files under the Fujin base directory (var/fujin-shuttle/**), or point at a path. Large files use chunked upload so they sidestep web-server/PHP body-size limits. Detected columns are shown back to you.
  • Options — dry-run, batch size, concurrency, reindex mode, and (for category/product imports) the parent category that imported categories nest under.

Run monitor

Press Run and the panel polls job status roughly once a second, showing:

  • a status badgependingrunningfinished (or stoppingstopped, or error),
  • a progress bar and the phase (resolving references/media → importing rows → reindexing),
  • per-status row counts — processed, success, no-change, errors, warnings, empty,
  • a log of per-row messages,
  • a Stop button.

Running: sync vs queued

When you press Run, the backend decides how to execute based on the syncRowThreshold config (default 1000 rows):

flowchart LR
    A[Run pressed] --> B{rows ≤ threshold?}
    B -- yes --> C[Run synchronously\nin the request]
    B -- no --> D[Queue RunProfileMessage\n→ messenger worker]
    C --> E[Status panel polls fujin_job]
    D --> E
  • Synchronous — small imports (and all exports) run inline; the response returns with final stats.
  • Queued — larger imports dispatch a message and return a jobId immediately; a messenger worker does the work while the panel polls for progress.

Queued runs need a worker

A queued run sits in pending until a worker picks it up. Make sure bin/console messenger:consume async is running (and, for the default queued thumbnail mode, kept running after the import to drain thumbnail jobs).

Stopping a run

The Stop button flips the job's status to stopping. The run monitor reads that at the next batch boundary and ends the run cooperatively — rows already written are kept (there is no cross-batch transaction), and the job lands in stopped with partial progress. The same applies to a CLI fujin:shuttle:run-profile run stopped from the admin.

Duplicate-run guard

Starting a second run of a profile that already has an active job is refused. If the existing job's heartbeat is stale (the worker crashed or was killed), it is reaped to error and the new run proceeds — so a dead job never blocks a profile permanently.

Global defaults

Per-run options inherit from the plugin's global configuration — driver, concurrency, sync threshold, auto-create toggles, delimiters and media settings. Tune them under Settings ▸ Extensions ▸ Fujin Shuttle. Full list: Configuration.