u
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,7 @@ export function loadSnapshotData() {
|
||||
const parentArticleId = Number(art.parentArticleId || 0);
|
||||
const isChild = parentArticleId > 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 {
|
||||
...STATIC_DEFAULTS,
|
||||
@@ -98,8 +99,8 @@ export function loadSnapshotData() {
|
||||
isCompositeProduct: isComposite ? '1' : '0',
|
||||
attributes: [],
|
||||
options: null,
|
||||
use_stock: art.track_stock ? '1' : '0',
|
||||
quantity: '0',
|
||||
use_stock: isParent ? '0' : '1',
|
||||
quantity: String(stockQty),
|
||||
deposit: '0',
|
||||
d_price: '0.0',
|
||||
deposit_name: '',
|
||||
|
||||
Reference in New Issue
Block a user