@nuskin/ns-shop 7.6.0-td-1017.2.1 → 7.6.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/ns-shop",
|
|
3
|
-
"version": "7.6.0
|
|
3
|
+
"version": "7.6.0",
|
|
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,11 +26,10 @@
|
|
|
26
26
|
"@nuskin/ns-common-lib": "1.4.8",
|
|
27
27
|
"@nuskin/ns-feature-flags": "1.5.0",
|
|
28
28
|
"@nuskin/ns-loyalty-web": "1.5.7",
|
|
29
|
-
"@nuskin/ns-product-lib": "2.
|
|
29
|
+
"@nuskin/ns-product-lib": "2.20.0",
|
|
30
30
|
"@nuskin/nuskinjquery": "2.3.1",
|
|
31
31
|
"@nuskin/order-model": "3.1.3",
|
|
32
|
-
"@nuskin/product-lib": "2.4.
|
|
33
|
-
"axios": "1.8.3",
|
|
32
|
+
"@nuskin/product-lib": "2.4.0",
|
|
34
33
|
"decimal.js": "10.4.3",
|
|
35
34
|
"jp-conversion": "0.0.7",
|
|
36
35
|
"lodash": "4.17.21",
|
|
@@ -40,11 +39,12 @@
|
|
|
40
39
|
"@babel/preset-env": "^7.23.8",
|
|
41
40
|
"@nuskin/configuration-sdk": "3.0.0",
|
|
42
41
|
"@nuskin/exclusive-offer-sdk": "1.4.1",
|
|
43
|
-
"@nuskin/ns-account": "5.
|
|
42
|
+
"@nuskin/ns-account": "5.13.0",
|
|
44
43
|
"@nuskin/ns-jsanalyzer": "1.0.1",
|
|
45
|
-
"@nuskin/ns-product": "3.
|
|
44
|
+
"@nuskin/ns-product": "3.51.0",
|
|
46
45
|
"@nuskin/ns-util": "4.7.2",
|
|
47
46
|
"axios-mock-adapter": "1.22.0",
|
|
47
|
+
"axios": "1.9.0",
|
|
48
48
|
"babel-cli": "6.26.0",
|
|
49
49
|
"babel-core": "6.26.3",
|
|
50
50
|
"babel-jest": "29.7.0",
|
|
@@ -83,20 +83,7 @@
|
|
|
83
83
|
"@nuskin/ns-account": "5.x",
|
|
84
84
|
"@nuskin/ns-loyalty": "2.x",
|
|
85
85
|
"@nuskin/ns-product": "3.x",
|
|
86
|
-
"@nuskin/ns-util": "4.x"
|
|
87
|
-
|
|
88
|
-
"resolutions": {
|
|
89
|
-
"lodash": "4.17.21",
|
|
90
|
-
"moment": "2.30.1",
|
|
91
|
-
"json5": "2.2.3",
|
|
92
|
-
"ip": "2.0.1",
|
|
93
|
-
"axios": "1.8.3",
|
|
94
|
-
"merge": "2.1.1",
|
|
95
|
-
"glob-parent": "6.0.2",
|
|
96
|
-
"follow-redirects": "1.15.5",
|
|
97
|
-
"execa": "0.7.0",
|
|
98
|
-
"tough-cookie": "4.1.3",
|
|
99
|
-
"y18n": "4.0.1",
|
|
100
|
-
"kind-of": "6.0.3"
|
|
86
|
+
"@nuskin/ns-util": "4.x",
|
|
87
|
+
"axios": "1.x"
|
|
101
88
|
}
|
|
102
89
|
}
|
|
@@ -461,8 +461,7 @@ function _assembleAdrProperties(requestData, options) {
|
|
|
461
461
|
isBackOrdered: requestData.skus && requestData.skus[requestData.skus.length - 1].backOrdered || false,
|
|
462
462
|
imageURL: options.product.fullImage || '',
|
|
463
463
|
name: options.product.title,
|
|
464
|
-
productId: options.product.equinoxProductId || ''
|
|
465
|
-
productionBom: options.product && options.product.properties && options.product.properties.productionBom || false
|
|
464
|
+
productId: options.product.equinoxProductId || ''
|
|
466
465
|
};
|
|
467
466
|
}
|
|
468
467
|
|
|
@@ -6,8 +6,10 @@ import {getCachedConfigField} from '@nuskin/configuration-sdk';
|
|
|
6
6
|
import {UserService} from "@nuskin/ns-account";
|
|
7
7
|
import PaymentAdapter from '../payment/PaymentAdapter';
|
|
8
8
|
import pickupUtil from '../shipping/pickupUtil';
|
|
9
|
+
import { storage } from "@nuskin/ns-util";
|
|
9
10
|
|
|
10
11
|
let splitLineItems = [];
|
|
12
|
+
const utmInfo = storage.getItem(storage.metadata.UTM_INFO) || {};
|
|
11
13
|
const addToCustomList = (customList, type, key, value) => {
|
|
12
14
|
if (value) {
|
|
13
15
|
let found = false;
|
|
@@ -484,6 +486,7 @@ function removeItems(cartItems, sapSkus) {
|
|
|
484
486
|
}
|
|
485
487
|
|
|
486
488
|
const populateCategory = (salesOrder) => {
|
|
489
|
+
const utmMedium = utmInfo.utm_medium;
|
|
487
490
|
if (ShoppingContext.isContext(ShoppingContext.MOBILE_AFFILIATE)) {
|
|
488
491
|
salesOrder.Category = "MOBILE AFFILIATE";
|
|
489
492
|
} else if (ShoppingContext.isContext(ShoppingContext.MOBILE_CONSUMER)) {
|
|
@@ -495,6 +498,10 @@ const populateCategory = (salesOrder) => {
|
|
|
495
498
|
} else if (util.getSponsorId()) {
|
|
496
499
|
// affiliates don't use a subdomain. So if we have a sponsor and it isn't a pitch then we consider it a storefront
|
|
497
500
|
salesOrder.Category = "STOREFRONT";
|
|
501
|
+
} else if (utmMedium && utmMedium.toLowerCase().includes('paidsearch')) {
|
|
502
|
+
salesOrder.Category = 'PAIDSEARCH';
|
|
503
|
+
} else if (utmMedium && utmMedium.toLowerCase().includes('paidsocial')) {
|
|
504
|
+
salesOrder.Category = 'PAIDAD';
|
|
498
505
|
} else {
|
|
499
506
|
salesOrder.Category = 'WEB';
|
|
500
507
|
}
|
|
@@ -1033,6 +1040,12 @@ const populateSalesOrder = (action, adr) => {
|
|
|
1033
1040
|
if (user && user.isGuest) {
|
|
1034
1041
|
addToCustomList(salesOrder.Custom, "FLAG", "GUEST", "TRUE");
|
|
1035
1042
|
}
|
|
1043
|
+
addToCustomList(salesOrder.Custom, "UTM", "SOURCE", utmInfo.utm_source);
|
|
1044
|
+
addToCustomList(salesOrder.Custom, "UTM", "MEDIUM", utmInfo.utm_medium);
|
|
1045
|
+
addToCustomList(salesOrder.Custom, "UTM", "CAMPAIGN", utmInfo.utm_campaign);
|
|
1046
|
+
addToCustomList(salesOrder.Custom, "UTM", "CAMPAIGN_ID", utmInfo.utm_id);
|
|
1047
|
+
addToCustomList(salesOrder.Custom, "UTM", "CONTENT", utmInfo.utm_content);
|
|
1048
|
+
addToCustomList(salesOrder.Custom, "UTM", "TERM", utmInfo.utm_term);
|
|
1036
1049
|
const microsite = getCachedConfigField('microsite');
|
|
1037
1050
|
if (microsite) {
|
|
1038
1051
|
salesOrder.Reason = "CUSTOM";
|