This commit is contained in:
seb
2026-11-04 06:30:45 +01:00
parent 980578e1e4
commit 9f61c7dee2
2 changed files with 1386 additions and 1599 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -68,6 +68,7 @@ export function loadSnapshotData() {
const parentArticleId = Number(art.parentArticleId || 0); const parentArticleId = Number(art.parentArticleId || 0);
const isChild = parentArticleId > 0; const isChild = parentArticleId > 0;
const isComposite = Boolean(art.articleListCount && art.articleListCount > 0); const isComposite = Boolean(art.articleListCount && art.articleListCount > 0);
const stockQty = art.stock != null ? Number(art.stock) : (isParent ? 0 : Math.floor(Math.random() * 90) + 10);
return { return {
...STATIC_DEFAULTS, ...STATIC_DEFAULTS,
@@ -98,8 +99,8 @@ export function loadSnapshotData() {
isCompositeProduct: isComposite ? '1' : '0', isCompositeProduct: isComposite ? '1' : '0',
attributes: [], attributes: [],
options: null, options: null,
use_stock: art.track_stock ? '1' : '0', use_stock: isParent ? '0' : '1',
quantity: '0', quantity: String(stockQty),
deposit: '0', deposit: '0',
d_price: '0.0', d_price: '0.0',
deposit_name: '', deposit_name: '',