@open-tender/utils 0.5.41 → 0.5.43
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/dist/cjs/utils/cart.js +1 -5
- package/dist/esm/utils/cart.js +1 -5
- package/package.json +1 -1
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -82,11 +82,7 @@ const makeUpsellItems = (itemIds, itemLookup) => {
|
|
|
82
82
|
.map(id => itemLookup[id])
|
|
83
83
|
.filter(i => i)
|
|
84
84
|
.map(i => (0, exports.makeOrderItem)(i))
|
|
85
|
-
.filter(i => !i.isSoldOut)
|
|
86
|
-
.filter(i => {
|
|
87
|
-
const belowMin = i.groups.filter(g => !g.isSize && (g.quantity || 0) < g.min);
|
|
88
|
-
return belowMin.length === 0;
|
|
89
|
-
});
|
|
85
|
+
.filter(i => !i.isSoldOut);
|
|
90
86
|
};
|
|
91
87
|
exports.makeUpsellItems = makeUpsellItems;
|
|
92
88
|
const makeUpsellItemIds = (item, cartIds, soldOut) => {
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -74,11 +74,7 @@ export const makeUpsellItems = (itemIds, itemLookup) => {
|
|
|
74
74
|
.map(id => itemLookup[id])
|
|
75
75
|
.filter(i => i)
|
|
76
76
|
.map(i => makeOrderItem(i))
|
|
77
|
-
.filter(i => !i.isSoldOut)
|
|
78
|
-
.filter(i => {
|
|
79
|
-
const belowMin = i.groups.filter(g => !g.isSize && (g.quantity || 0) < g.min);
|
|
80
|
-
return belowMin.length === 0;
|
|
81
|
-
});
|
|
77
|
+
.filter(i => !i.isSoldOut);
|
|
82
78
|
};
|
|
83
79
|
export const makeUpsellItemIds = (item, cartIds, soldOut) => {
|
|
84
80
|
const upsellItems = item ? item.upsellItems : null;
|
package/package.json
CHANGED