@nuskin/ns-shop 7.2.3-mdigi-2491.3 → 7.2.3-td-1017.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.
- package/package.json +3 -3
- package/src/cart/cart.js +2 -10
- package/src/order/orderAdapter.js +10 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/ns-shop",
|
|
3
|
-
"version": "7.2.3-
|
|
3
|
+
"version": "7.2.3-td-1017.1",
|
|
4
4
|
"description": "The description that will amaze and astound your audience when they read it",
|
|
5
5
|
"main": "src/shop.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@nuskin/ns-common-lib": "1.4.7",
|
|
27
27
|
"@nuskin/ns-feature-flags": "1.4.7",
|
|
28
28
|
"@nuskin/ns-loyalty-web": "1.5.6",
|
|
29
|
-
"@nuskin/ns-product-lib": "2.19.
|
|
29
|
+
"@nuskin/ns-product-lib": "2.19.7-td-1017.1",
|
|
30
30
|
"@nuskin/nuskinjquery": "2.3.1",
|
|
31
31
|
"@nuskin/order-model": "3.1.3",
|
|
32
|
-
"@nuskin/product-lib": "2.
|
|
32
|
+
"@nuskin/product-lib": "2.3.1-td-1017.1",
|
|
33
33
|
"@nuskin/ns-util": "4.7.0",
|
|
34
34
|
"axios": "1.6.5",
|
|
35
35
|
"decimal.js": "10.4.3",
|
package/src/cart/cart.js
CHANGED
|
@@ -1329,16 +1329,8 @@ export default function Cart(cartData) {
|
|
|
1329
1329
|
const customPayloadMetadata = storage.metadata.CUSTOM_EVENT_PAYLOAD;
|
|
1330
1330
|
let customPayload = storage.getItem(customPayloadMetadata);
|
|
1331
1331
|
if (customPayload) {
|
|
1332
|
-
if (customPayload.
|
|
1333
|
-
|
|
1334
|
-
const product = json.ecommerce.add && json.ecommerce.add.products && json.ecommerce.add.products[0];
|
|
1335
|
-
if (product) {
|
|
1336
|
-
Object.assign(product, customPayload);
|
|
1337
|
-
}
|
|
1338
|
-
} else {
|
|
1339
|
-
if (customPayload.constructor === {}.constructor) {
|
|
1340
|
-
Object.assign(json, customPayload);
|
|
1341
|
-
}
|
|
1332
|
+
if (customPayload.constructor === {}.constructor) {
|
|
1333
|
+
Object.assign(json, customPayload);
|
|
1342
1334
|
}
|
|
1343
1335
|
storage.removeItem(customPayloadMetadata);
|
|
1344
1336
|
}
|
|
@@ -497,14 +497,14 @@ const populateCategory = (salesOrder) => {
|
|
|
497
497
|
} else if (util.getSponsorId()) {
|
|
498
498
|
// affiliates don't use a subdomain. So if we have a sponsor and it isn't a pitch then we consider it a storefront
|
|
499
499
|
salesOrder.Category = "STOREFRONT";
|
|
500
|
-
}
|
|
501
|
-
if (utmInfo
|
|
500
|
+
} else if(utmInfo?.utm_medium){
|
|
501
|
+
if (utmInfo?.utm_medium.includes('paidsearch')) {
|
|
502
502
|
salesOrder.Category = 'PAIDSEARCH';
|
|
503
|
-
} else if (utmInfo
|
|
503
|
+
} else if (utmInfo?.utm_medium.includes('paidsocial')) {
|
|
504
504
|
salesOrder.Category = 'PAIDAD';
|
|
505
505
|
} else {
|
|
506
506
|
salesOrder.Category = 'WEB';
|
|
507
|
-
}
|
|
507
|
+
}
|
|
508
508
|
} else {
|
|
509
509
|
salesOrder.Category = 'WEB';
|
|
510
510
|
}
|
|
@@ -1040,14 +1040,12 @@ const populateSalesOrder = (action, adr) => {
|
|
|
1040
1040
|
if (user && user.isGuest) {
|
|
1041
1041
|
addToCustomList(salesOrder.Custom, "FLAG", "GUEST", "TRUE");
|
|
1042
1042
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo.utm_term);
|
|
1050
|
-
}
|
|
1043
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_SOURCE", utmInfo?.utm_source);
|
|
1044
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_MEDIUM", utmInfo?.utm_medium);
|
|
1045
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN", utmInfo?.utm_campaign);
|
|
1046
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN_ID", utmInfo?.utm_id);
|
|
1047
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_CONTENT", utmInfo?.utm_content);
|
|
1048
|
+
addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo?.utm_term);
|
|
1051
1049
|
const microsite = getCachedConfigField('microsite');
|
|
1052
1050
|
if (microsite) {
|
|
1053
1051
|
salesOrder.Reason = "CUSTOM";
|