@nuskin/ns-product-lib 2.7.0 → 2.7.1-cx24-3709.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/productData.js +13 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +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)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
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)
|
7
|
+
|
1
8
|
# [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)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -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": product
|
438
|
+
"WWHL": this.mapWWHL(product)
|
439
439
|
},
|
440
440
|
"cvMap": {
|
441
441
|
"WWHL": productCVPrice,
|
@@ -510,6 +510,18 @@ 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
|
+
|
513
525
|
mapEquinoxSKUExists: function(exists) {
|
514
526
|
// this could be avoided if only we are using response mapper
|
515
527
|
// for equinox products that exists.
|