@nuskin/ns-product-lib 2.5.0-cx24-2179.2.5 → 2.5.0-cx24-2179.2.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/product.js +1 -1
- package/src/productData.js +6 -6
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [2.5.0-cx24-2179.2.7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.6...v2.5.0-cx24-2179.2.7) (2022-12-05)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* added eq promoion bypass for setPriceAndPvFromType v5 (#CX24-2179) ([f5b62e5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f5b62e5e82f1830d4105ffc965b64e9a7fc88d9b)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
7
|
+
|
8
|
+
# [2.5.0-cx24-2179.2.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.5...v2.5.0-cx24-2179.2.6) (2022-12-05)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* added eq promoion bypass for setPriceAndPvFromType v4 (#CX24-2179) ([abcdd30](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/abcdd30223107786c0c2f9d1a8946053ef6dcef5)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
14
|
+
|
1
15
|
# [2.5.0-cx24-2179.2.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.4...v2.5.0-cx24-2179.2.5) (2022-12-05)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -335,7 +335,7 @@ const Product = function(productData) {
|
|
335
335
|
let variant = this.getVariant(productStatusSku);
|
336
336
|
|
337
337
|
if (variant) {
|
338
|
-
if (variant.addPricingFromStatus(productStatus, priceType)) {
|
338
|
+
if (variant.addPricingFromStatus(productStatus, priceType, option)) {
|
339
339
|
variant.setMarketAttributes(productStatus);
|
340
340
|
updateBaseRanges(this, variant);
|
341
341
|
modified = true;
|
package/src/productData.js
CHANGED
@@ -109,7 +109,7 @@ const ProductData = {
|
|
109
109
|
|
110
110
|
const { eventName, eventLabels, computedPrice, defaultProductPrice} = this.getEqProductPromotions(eqVariant);
|
111
111
|
const productPrice = eventName ? defaultProductPrice : eqVariant.priceFacets["Regular Price"];
|
112
|
-
const
|
112
|
+
const discountedPrice = eventName ? computedPrice : eqVariant.priceFacets["Regular Price"];
|
113
113
|
|
114
114
|
return {
|
115
115
|
"sku": eqVariant.identifier,
|
@@ -149,9 +149,9 @@ const ProductData = {
|
|
149
149
|
"cv": (eqVariant.priceFacets.CV) ? eqVariant.priceFacets.CV : '',
|
150
150
|
"pv":eqVariant.priceFacets.PV,
|
151
151
|
"priceType": "WRTL",
|
152
|
-
"price":
|
152
|
+
"price": discountedPrice,
|
153
153
|
"priceMap": {
|
154
|
-
"WRTL":
|
154
|
+
"WRTL": productPrice,
|
155
155
|
"WADW-WRTL": eqVariant.priceFacets["Regular Price"],
|
156
156
|
"WADR": eqVariant.priceFacets["Regular Price"],
|
157
157
|
"RTL": eqVariant.priceFacets["Regular Price"],
|
@@ -263,7 +263,7 @@ const ProductData = {
|
|
263
263
|
|
264
264
|
const { eventName, eventLabels, computedPrice, defaultProductPrice} = this.getEqProductPromotions(data.sku[count]);
|
265
265
|
const productPrice = eventName ? defaultProductPrice : data.sku[count].priceFacets["Regular Price"];
|
266
|
-
const
|
266
|
+
const discountedPrice = eventName ? computedPrice : data.sku[count].priceFacets["Regular Price"];
|
267
267
|
|
268
268
|
prod = {
|
269
269
|
"sku": data.sku[count].identifier,
|
@@ -303,9 +303,9 @@ const ProductData = {
|
|
303
303
|
"cv": (data.sku[count].priceFacets.CV) ? data.sku[count].priceFacets.CV : '',
|
304
304
|
"pv": data.sku[count].priceFacets.PV,
|
305
305
|
"priceType": "WRTL",
|
306
|
-
"price":
|
306
|
+
"price": discountedPrice,
|
307
307
|
"priceMap": {
|
308
|
-
"WRTL":
|
308
|
+
"WRTL": productPrice,
|
309
309
|
"WADW-WRTL": data.sku[count].priceFacets["Regular Price"],
|
310
310
|
"WADR": data.sku[count].priceFacets["Regular Price"],
|
311
311
|
"RTL": data.sku[count].priceFacets["Regular Price"],
|