fix(prestashop): import dates in the shop time zone (1.1.15)

This commit is contained in:
fatequod
2026-09-25 11:46:21 +02:00
parent 93ebfe728d
commit 6b5e03246e
13 changed files with 269 additions and 24 deletions
+4
View File
@@ -1,4 +1,5 @@
const { Config } = require('@orbito/api-lib');
const { DEFAULT_SHOP_TIME_ZONE } = require('./prestashop-date');
/** Stały identyfikator sklepu (jeden sklep na firmę) — używany w PsOrder.shopConfigId. */
const SHOP_ID = 'default';
@@ -36,6 +37,7 @@ async function loadConfig() {
shopName,
shopPrefix,
versionCode,
timeZone,
orderStatus,
lastOrderId,
psStates
@@ -45,6 +47,7 @@ async function loadConfig() {
Config.get('connection.shopName', ''),
Config.get('connection.shopPrefix', ''),
Config.get('connection.versionCode', ''),
Config.get('connection.timeZone', DEFAULT_SHOP_TIME_ZONE),
Config.get('import.orderStatus', ''),
Config.get('runtime.lastOrderId', null),
loadPsStates()
@@ -59,6 +62,7 @@ async function loadConfig() {
shopName: shopName || '',
shopPrefix: shopPrefix || '',
versionCode: versionCode || '',
timeZone: String(timeZone || DEFAULT_SHOP_TIME_ZONE).trim() || DEFAULT_SHOP_TIME_ZONE,
orderStatus: orderStatus || '',
lastOrderId: lastOrderId == null ? null : Number(lastOrderId),
psStates,