Version: 1.0 (Core completed)
Create a new Shopify location for the supplier. ( Settings -> Locations -> Add Location )
Example:
Comstedt
or
Atlok
After creating the location, open it in the Shopify Admin.
The Location ID is the numeric value at the end of the URL.
Example:
https://admin.shopify.com/store/your-store/settings/locations/12345678901
In this example:
Location ID = 12345678901
Use this value in the provider configuration.
Import the supplied Shopify Flow.
Update the following values:
SendToComstedt)Comstedt-Drop)Add a provider tag to all products handled by the supplier.
Examples:
Comstedt-Drop
Atlok-Drop
The tag name is configurable and may be changed if required.
Open:
Dashboard → Providers
Create a new provider and configure:
Enable the provider.
Use Test Connection to verify that the supplier feed is accessible.
The provider status should change to:
Connected
Run the following actions once:
or simply run:
Full Maintenance
After verifying that:
Open the imported Shopify Flow and click:
Turn on workflow
The maintenance system is now fully operational.
Shopify Maintenance System synchronizes supplier inventory to Shopify using a modular provider architecture.
The system consists of:
Implemented:
Features:
Dashboard never executes maintenance directly.
All maintenance operations are started through:
maintenance_runner.php
JobManager stores execution state inside:
data/jobs/
Each job contains:
Dashboard polls:
status.php
every 500 ms.
Cron execution bypasses JobManager.
Only dashboard executions create jobs.
maintenance_runner.php
Single entry point for all maintenance operations.
Used by:
Supported actions:
fetch
sync
tags
full
Current providers:
Architecture supports unlimited providers.
Each provider contains:
enabled
driver
settings
location_id
order_tag
product_tag
Implemented.
Supports:
Dashboard:
Runs disabled providers when explicitly selected.
Cron:
Runs only enabled providers.
Fetched inventory is stored as:
data/cache/{provider}.json
Cron automatically respects provider fetch intervals.
Implemented.
Supports:
Dashboard:
Runs disabled providers when explicitly selected.
Cron:
Runs only enabled providers.
Synchronization always reads supplier inventory from cache.
Providers are never contacted directly during synchronization.
Implemented.
Updates:
Uses GraphQL.
Only enabled providers are processed.
(No force mode.)
Runs:
Progress is written into log as:
@STEP:fetch
@STEP:sync
@STEP:tags
@STEP:finished
Dashboard filters these markers and displays graphical progress.
Daily log files:
logs/YYYY-MM-DD.log
Logger supports:
setLogHook()
Dashboard receives live log output through JobManager.
Log Viewer supports:
Automatic cleanup implemented.
Logs:
cleanupLogs()
Jobs:
cleanupJobs()
Configuration:
'cleanup' => [
'jobs_days' => 7,
'logs_days' => 30,
]
Cron executes:
maintenance_runner.php
Example:
php maintenance_runner.php cron full all 0
Cron:
app/
ajax/
js/
inc/
helper.php
JobManager.php
ProcessManager.php
providers/
http.php
sftp.php
woocommerce.php
data/
cache/
jobs/
logs/
maintenance_runner.php
fetch_provider.php
sync_stock.php
update_supplier_tags.php
full_maintenance.php
| File | Purpose |
|---|---|
maintenance_runner.php |
Main entry point for all maintenance operations. |
fetch_provider.php |
Downloads supplier inventory. |
sync_stock.php |
Synchronizes cached supplier inventory to Shopify. |
update_supplier_tags.php |
Updates Shopify product tags. |
full_maintenance.php |
Runs complete maintenance sequence. |
| Directory | Purpose |
|---|---|
app/ |
Dashboard, UI and AJAX endpoints. |
providers/ |
Provider drivers. |
inc/ |
Core classes. |
data/ |
Cached supplier inventory. |
data/jobs/ |
Dashboard job status. |
logs/ |
Daily application logs. |
Dashboard and Cron use exactly the same maintenance runner.
Provider drivers remain completely independent from maintenance logic.
Maintenance functions remain independent from Dashboard.
Dashboard only starts jobs and monitors their progress.
Synchronization always reads supplier inventory from cache.
JavaScript contains no business logic.
Core maintenance framework is completed.
Version 1.0 is feature complete.
Remaining work consists mainly of: