@nuskin/ns-product-lib 2.5.0-cx24-2179.2.6 → 2.5.0-cx24-2179.2.8
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 +0 -1
- package/src/productData.js +6 -7
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [2.5.0-cx24-2179.2.8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.7...v2.5.0-cx24-2179.2.8) (2022-12-06)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* event pricing and name (#CX24-2179) ([04a9ce6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/04a9ce6389988676a0634308ad964bee5c0aa4ab)), 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.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)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* 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)
|
14
|
+
|
1
15
|
# [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)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -232,7 +232,6 @@ const Product = function(productData) {
|
|
232
232
|
// : (_priceType ? _priceType : this.priceType),
|
233
233
|
const priceType = _priceType ? _priceType : this.priceType;
|
234
234
|
const eventPricing = getEventPricing(this, priceType, _activeEvents);
|
235
|
-
console.log({context: 'NsProductLib.setPriceAndPvFromType', eventPricing: eventPricing});
|
236
235
|
|
237
236
|
let changed = false;
|
238
237
|
if ((
|
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"],
|
@@ -363,7 +363,6 @@ const ProductData = {
|
|
363
363
|
return newProduct
|
364
364
|
});
|
365
365
|
|
366
|
-
console.log({context: "NsProductLib.eqProductMapper", product: prodArr});
|
367
366
|
let data = {
|
368
367
|
products: this._sortProductsBySku(skus, prodArr),
|
369
368
|
count: productDataResponse.length
|