rerobe-js-orm 4.4.0 → 4.4.1
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.
|
@@ -1060,16 +1060,19 @@ const productYesNoOptions = [
|
|
|
1060
1060
|
exports.productYesNoOptions = productYesNoOptions;
|
|
1061
1061
|
const productClassOptions = [
|
|
1062
1062
|
{
|
|
1063
|
-
label: 'Unique
|
|
1063
|
+
label: 'Unique',
|
|
1064
1064
|
value: 'UNIQUE',
|
|
1065
|
+
description: 'One-of-a-kind, no variants',
|
|
1065
1066
|
},
|
|
1066
1067
|
{
|
|
1067
|
-
label: '
|
|
1068
|
+
label: 'Multiple',
|
|
1068
1069
|
value: 'MULTI',
|
|
1070
|
+
description: 'Many duplicates of the same product (e.g., gift cards, shopping bags, etc.)',
|
|
1069
1071
|
},
|
|
1070
1072
|
{
|
|
1071
|
-
label: 'Template
|
|
1073
|
+
label: 'Template',
|
|
1072
1074
|
value: 'TEMPLATE',
|
|
1075
|
+
description: 'Blueprint for cloning a variant of the product at checkout',
|
|
1073
1076
|
},
|
|
1074
1077
|
];
|
|
1075
1078
|
exports.productClassOptions = productClassOptions;
|
|
@@ -754,6 +754,7 @@ class ReRobeProductHelpers {
|
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
756
|
static convertToMetaCommerceProduct(productObj, merchantObj, targetMarketTaxRate = 0) {
|
|
757
|
+
var _a;
|
|
757
758
|
const { primaryDomain, currency } = merchantObj;
|
|
758
759
|
const availabilityMapper = (status) => {
|
|
759
760
|
if (!status)
|
|
@@ -845,6 +846,9 @@ class ReRobeProductHelpers {
|
|
|
845
846
|
size: productObj.standardSize || productObj.size || 'unknown',
|
|
846
847
|
material: this.materialCompJoinedString(productObj.materialComposition),
|
|
847
848
|
age_group: ageGroupMapper(productObj.primaryAgeCategory),
|
|
849
|
+
item_group_id: Array.isArray(productObj.tags)
|
|
850
|
+
? ((_a = productObj.tags.find((tag) => tag === null || tag === void 0 ? void 0 : tag.startsWith('item_group_id:'))) === null || _a === void 0 ? void 0 : _a.split(':')[1]) || ''
|
|
851
|
+
: '',
|
|
848
852
|
};
|
|
849
853
|
}
|
|
850
854
|
}
|