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 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: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user