rerobe-js-orm 4.7.4 → 4.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/models/Order.js +1 -1
- package/lib/models/Product.js +10 -1
- package/package.json +1 -1
package/lib/models/Order.js
CHANGED
|
@@ -462,7 +462,7 @@ class Order extends Base_1.default {
|
|
|
462
462
|
title: item.title,
|
|
463
463
|
originalUnitPriceWithCurrency: item.originalUnitPrice,
|
|
464
464
|
quantity: item.quantity,
|
|
465
|
-
weight: item.variant
|
|
465
|
+
weight: item.variant && item.variant.weight
|
|
466
466
|
? {
|
|
467
467
|
value: item.variant.weight,
|
|
468
468
|
unit: 'GRAMS',
|
package/lib/models/Product.js
CHANGED
|
@@ -354,7 +354,16 @@ class Product extends Base_1.default {
|
|
|
354
354
|
product_constants_1.PRODUCT_CLASS_VALUES.SUPPLY,
|
|
355
355
|
product_constants_1.PRODUCT_CLASS_VALUES.DIGITAL,
|
|
356
356
|
].includes(String(this.attributes.productClass));
|
|
357
|
-
const
|
|
357
|
+
const liquidationStatuses = [
|
|
358
|
+
product_constants_1.PRODUCT_STATES.archived,
|
|
359
|
+
product_constants_1.PRODUCT_STATES.sellerLiquidated,
|
|
360
|
+
product_constants_1.PRODUCT_STATES.liquidationReady,
|
|
361
|
+
product_constants_1.PRODUCT_STATES.merchantDonated,
|
|
362
|
+
product_constants_1.PRODUCT_STATES.sellerDonated,
|
|
363
|
+
];
|
|
364
|
+
const statusToInclude = !hasShopifyId || (currentStatus.includes('SOLD') && isUnique) || liquidationStatuses.includes(currentStatus)
|
|
365
|
+
? 'DRAFT'
|
|
366
|
+
: undefined;
|
|
358
367
|
if (variantsFromInventory.length === 0) {
|
|
359
368
|
// Fallback: single-variant product (legacy behavior)
|
|
360
369
|
const variant = Object.assign(Object.assign({ id: '' }, baseVariantFields()), { inventoryQuantities: [
|