@nuskin/ns-shop 7.0.5-cx1-13272.3 → 7.0.5-cx1-13272.4
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/package.json
CHANGED
package/src/cart/cartService.js
CHANGED
|
@@ -236,7 +236,9 @@ async function checkForMissingEventNames(order) {
|
|
|
236
236
|
// check to see if cart item has eventName but sapItem does not.
|
|
237
237
|
const orderItems = cart.getItems({cartOrderItems: true});
|
|
238
238
|
orderItems.map((item) => {
|
|
239
|
-
const sapItem = order.sapItems.find((sapItem) =>
|
|
239
|
+
const sapItem = order.sapItems.find((sapItem) => (
|
|
240
|
+
sapItem.product.sku === item.product.sku && sapItem.adr === item.adr
|
|
241
|
+
));
|
|
240
242
|
if (sapItem && item.eventName && !sapItem.eventName)
|
|
241
243
|
outOfSync = true;
|
|
242
244
|
});
|
|
@@ -544,7 +544,8 @@ async function addSapItem(newItem, sapItem, sapSkus, adr, isAdrItem, replace) {
|
|
|
544
544
|
})
|
|
545
545
|
|
|
546
546
|
// eventName would have gotten nulled out. Fix it here.
|
|
547
|
-
product
|
|
547
|
+
if (item?.product)
|
|
548
|
+
item.product.eventName = savedEventName;
|
|
548
549
|
|
|
549
550
|
return item;
|
|
550
551
|
}
|