@nuskin/ns-product-lib 2.7.1-cx24-3709.1 → 2.7.1-cx24-3879.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,10 @@
1
- ## [2.7.1-cx24-3709.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1-cx24-3709.1) (2023-04-12)
1
+ ## [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)
2
2
 
3
3
 
4
4
  ### Fix
5
5
 
6
- * use originalPrice when product has a promotion #CX24-3709 ([b755d1c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b755d1c633595389dba3711354d27948e71e98de)), closes [#CX24-3709](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3709)
6
+ * 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))
7
+ * 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))
7
8
 
8
9
  # [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)
9
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.7.1-cx24-3709.1",
3
+ "version": "2.7.1-cx24-3879.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": {
package/src/product.js CHANGED
@@ -337,7 +337,11 @@ const Product = function (productData) {
337
337
  return this.addCvWithType(csvKey, productStatus.csv[csvKey]);
338
338
  }, this);
339
339
  }
340
- this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
340
+ //only remap the orderTypes for legacy
341
+ if(this.equinoxProductId !== "") {
342
+ this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
343
+ }
344
+
341
345
  if (productStatus.childSkus) {
342
346
  this.childSkus = productStatus.childSkus;
343
347
  }
@@ -435,7 +435,7 @@ const ProductData = {
435
435
  "RTL": product.priceFacets["Regular Price"],
436
436
  "WADW": product.priceFacets["Wholesale Price"],
437
437
  "WHL": product.priceFacets["Wholesale Price"],
438
- "WWHL": this.mapWWHL(product)
438
+ "WWHL": product.priceFacets["Wholesale Price"]
439
439
  },
440
440
  "cvMap": {
441
441
  "WWHL": productCVPrice,
@@ -510,18 +510,6 @@ const ProductData = {
510
510
  };
511
511
  },
512
512
 
513
- mapWWHL: function(product) {
514
- if (
515
- product.promotion
516
- && product.promotion.length > 0
517
- && product.priceFacets["Regular Price"]
518
- ) {
519
- return product.priceFacets["Regular Price"];
520
- }
521
-
522
- return product.priceFacets["Wholesale Price"];
523
- },
524
-
525
513
  mapEquinoxSKUExists: function(exists) {
526
514
  // this could be avoided if only we are using response mapper
527
515
  // for equinox products that exists.