@nuskin/ns-shop 7.2.3-mdigi-2491.3 → 7.2.3

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.2.3-mdigi-2491.3",
3
+ "version": "7.2.3",
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": {
@@ -31,7 +31,7 @@
31
31
  "@nuskin/order-model": "3.1.3",
32
32
  "@nuskin/product-lib": "2.2.1",
33
33
  "@nuskin/ns-util": "4.7.0",
34
- "axios": "1.6.5",
34
+ "axios": "1.7.9",
35
35
  "decimal.js": "10.4.3",
36
36
  "jp-conversion": "0.0.7",
37
37
  "lodash": "4.17.21",
@@ -91,7 +91,7 @@
91
91
  "moment": "2.29.4",
92
92
  "json5": "2.2.3",
93
93
  "ip": "2.0.1",
94
- "axios": "1.6.8",
94
+ "axios": "1.7.9",
95
95
  "merge": "2.1.1",
96
96
  "glob-parent": "6.0.2",
97
97
  "follow-redirects": "1.15.5",
@@ -9,7 +9,7 @@ import pickupUtil from '../shipping/pickupUtil';
9
9
  import { storage } from "@nuskin/ns-util";
10
10
 
11
11
  let splitLineItems = [];
12
- const utmInfo = storage.getItem(storage.metadata.UTM_INFO);
12
+ const utmInfo = storage.getItem(storage.metadata.UTM_INFO) || {};
13
13
  const addToCustomList = (customList, type, key, value) => {
14
14
  if (value) {
15
15
  let found = false;
@@ -497,14 +497,10 @@ 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
- } else if (utmInfo && utmInfo.utm_medium) {
501
- if (utmInfo.utm_medium.includes('paidsearch')) {
502
- salesOrder.Category = 'PAIDSEARCH';
503
- } else if (utmInfo.utm_medium.includes('paidsocial')) {
504
- salesOrder.Category = 'PAIDAD';
505
- } else {
506
- salesOrder.Category = 'WEB';
507
- }
500
+ } else if (utmInfo.utm_medium && utmInfo.utm_medium.includes('paidsearch')) {
501
+ salesOrder.Category = 'PAIDSEARCH';
502
+ } else if (utmInfo.utm_medium && utmInfo.utm_medium.includes('paidsocial')) {
503
+ salesOrder.Category = 'PAIDAD';
508
504
  } else {
509
505
  salesOrder.Category = 'WEB';
510
506
  }
@@ -1040,14 +1036,12 @@ const populateSalesOrder = (action, adr) => {
1040
1036
  if (user && user.isGuest) {
1041
1037
  addToCustomList(salesOrder.Custom, "FLAG", "GUEST", "TRUE");
1042
1038
  }
1043
- if (utmInfo) {
1044
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_SOURCE", utmInfo.utm_source);
1045
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_MEDIUM", utmInfo.utm_medium);
1046
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN", utmInfo.utm_campaign);
1047
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN_ID", utmInfo.utm_id);
1048
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_CONTENT", utmInfo.utm_content);
1049
- addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo.utm_term);
1050
- }
1039
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_SOURCE", utmInfo.utm_source);
1040
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_MEDIUM", utmInfo.utm_medium);
1041
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN", utmInfo.utm_campaign);
1042
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CAMPAIGN_ID", utmInfo.utm_id);
1043
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_CONTENT", utmInfo.utm_content);
1044
+ addToCustomList(salesOrder.Custom, "FLAG", "UTM_TERM", utmInfo.utm_term);
1051
1045
  const microsite = getCachedConfigField('microsite');
1052
1046
  if (microsite) {
1053
1047
  salesOrder.Reason = "CUSTOM";