@nuskin/ns-product-lib 2.7.1-cx24-3684.2 → 2.7.2-cx24-3684.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,54 @@
1
- ## [2.7.1-cx24-3684.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1-cx24-3684.1...v2.7.1-cx24-3684.2) (2023-04-16)
1
+ ## [2.7.2-cx24-3684.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1...v2.7.2-cx24-3684.1) (2023-04-16)
2
2
 
3
3
 
4
4
  ### Fix
5
5
 
6
+ * added event pricing (#CX24-3684) ([49d1467](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/49d1467eecb69437adb16e9c85d07c52dca21d26)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
6
7
  * added event pricing (#CX24-3684) ([fca7e9b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fca7e9b9f01d99682ddff162db40b4a727d018c1)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
8
+ * Rebased to master ([65b08a7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/65b08a7d2ed14ae431ac2a9218ad138716c5ea1c))
9
+ * set original price as wholesale price (#CX24-3684) ([047c01c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/047c01c04a7ba6b9b1a2a30d997574460fda36ea)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
10
+ * set original price as wholesale price (#CX24-3684) ([e1d5650](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e1d5650da1bee59b19977c9af5da58b6ff08485d)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
11
+
12
+ ### Release
13
+
14
+ * Automated changes by GitLab pipeline [skip ci] ([edf7159](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/edf7159c70c164b5511f8d9a19d49663dad75296))
15
+ * Automated changes by GitLab pipeline [skip ci] ([0a2a6a0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0a2a6a00edb579cf167928e0e9dd2d82089124a3))
7
16
 
8
- ## [2.7.1-cx24-3684.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1-cx24-3684.1) (2023-04-13)
17
+ ## [2.7.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1) (2023-04-15)
9
18
 
10
19
 
11
20
  ### Fix
12
21
 
13
- * set original price as wholesale price (#CX24-3684) ([e1d5650](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e1d5650da1bee59b19977c9af5da58b6ff08485d)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
22
+ * updating text in unit testing ([65393d6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/65393d6492b0696a24daa56f79b768cc38e1c7ae))
23
+
24
+ # [2.8.0-cx24-3705.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0-cx24-3705.1...v2.8.0-cx24-3705.2) (2023-04-14)
25
+
26
+
27
+ ### Update
28
+
29
+ * setting correct title if multiple variants ([583e74d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/583e74d41acc7213cd86a48df9076a453da8bb93))
30
+
31
+ # [2.8.0-cx24-3705.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.8.0-cx24-3705.1) (2023-04-14)
32
+
33
+
34
+ ### Update
35
+
36
+ * setting correct title if multiple variants ([9574804](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9574804094f65261ff45c9658ba4e4d4baf0bdf2))
37
+
38
+ ## [2.7.1-cx24-3879.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1-cx24-3879.1...v2.7.1-cx24-3879.2) (2023-04-13)
39
+
40
+
41
+ ### Fix
42
+
43
+ * Payload for subscription products are missing when added to cart from MySite homepage ([20b0ed2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/20b0ed2661b4d213147cef9e77d268b167b49421))
44
+
45
+ ## [2.7.1-cx24-3879.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1-cx24-3879.1) (2023-04-13)
46
+
47
+
48
+ ### Fix
49
+
50
+ * Payload for subscription products are missing when added to cart from MySite homepage ([7b7ac3b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7b7ac3bd7c0b196aa9a7e97e885f7e296ef7e97d))
51
+ * Payload for subscription products are missing when added to cart from MySite homepage ([d49957f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d49957f44d9ce6b6469b0bc94bc8f8050d00f35a))
14
52
 
15
53
  # [2.7.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.2...v2.7.0) (2023-04-05)
16
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.1-cx24-3684.2",
3
+ "version": "2.7.2-cx24-3684.1",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@nuskin/configuration-sdk": "2.2.3",
35
35
  "@nuskin/ns-common-lib": "1.4.5",
36
- "@nuskin/ns-util": "4.2.7",
36
+ "@nuskin/ns-util": "4.3.2",
37
37
  "axios": "0.27.2",
38
38
  "qs": "6.11.0"
39
39
  },
package/src/product.js CHANGED
@@ -338,7 +338,11 @@ const Product = function (productData) {
338
338
  return this.addCvWithType(csvKey, productStatus.csv[csvKey]);
339
339
  }, this);
340
340
  }
341
- this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
341
+ //only remap the orderTypes for legacy (which we'll know when equinoxProductId is blank)
342
+ if(this.equinoxProductId == "") {
343
+ this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
344
+ }
345
+
342
346
  if (productStatus.childSkus) {
343
347
  this.childSkus = productStatus.childSkus;
344
348
  }
@@ -365,7 +365,7 @@ const ProductData = {
365
365
  let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
366
366
  let imageURL = product.properties.imageURL ? product.properties.imageURL : '';
367
367
  let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
368
-
368
+ let productTitle = productData.properties.name
369
369
 
370
370
  if (productData.sku && productData.sku.length > 1) {
371
371
  // exclude base product from variants
@@ -373,6 +373,10 @@ const ProductData = {
373
373
  variants[variant.identifier] = this.eqProductVariantMapper(variant);
374
374
  return variant;
375
375
  });
376
+ const productArr = productData.sku.filter(p => p.default === true)
377
+ productTitle = productArr[0].properties.name;
378
+ product = productArr[0]
379
+
376
380
  }
377
381
 
378
382
  const {
@@ -396,7 +400,7 @@ const ProductData = {
396
400
  ...product,
397
401
  "sku": product.identifier,
398
402
  "globalProductID": productData.identifier,
399
- "title": productData.properties.name,
403
+ "title": productTitle,
400
404
  "country": product.properties.market,
401
405
  "language": "en",
402
406
  "shortDescr": productData.properties.description,
@@ -513,7 +517,7 @@ const ProductData = {
513
517
  };
514
518
  },
515
519
 
516
- mapEquinoxSKUExists: function(exists) {
520
+ mapEquinoxSKUExists: function (exists) {
517
521
  // this could be avoided if only we are using response mapper
518
522
  // for equinox products that exists.
519
523
  // @todo: clean-up