@nuskin/ns-product-lib 2.7.2-cx24-3684.1 → 2.7.2-cx24-3964.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2 -11
- package/package.json +2 -2
- package/src/product.js +1 -2
- package/src/productData.js +19 -22
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,9 @@
|
|
1
|
-
## [2.7.2-cx24-
|
1
|
+
## [2.7.2-cx24-3964.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1...v2.7.2-cx24-3964.1) (2023-04-28)
|
2
2
|
|
3
3
|
|
4
4
|
### Fix
|
5
5
|
|
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))
|
6
|
+
* Products in sales event not showing adjusted price and sales ribbon #CX24-3964 ([1242901](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/124290157798010c82b5e30a273b342fe707e884)), closes [#CX24-3964](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3964)
|
16
7
|
|
17
8
|
## [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)
|
18
9
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "2.7.2-cx24-
|
3
|
+
"version": "2.7.2-cx24-3964.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.
|
36
|
+
"@nuskin/ns-util": "4.4.0",
|
37
37
|
"axios": "0.27.2",
|
38
38
|
"qs": "6.11.0"
|
39
39
|
},
|
package/src/product.js
CHANGED
@@ -75,7 +75,7 @@ const Product = function (productData) {
|
|
75
75
|
//equinox inventory / stock label
|
76
76
|
//@example "IN STOCK"
|
77
77
|
this.inventory = "";
|
78
|
-
|
78
|
+
|
79
79
|
// equinox specific properties
|
80
80
|
this.equinoxProductId = "";
|
81
81
|
this.properties = {};
|
@@ -262,7 +262,6 @@ const Product = function (productData) {
|
|
262
262
|
|
263
263
|
if (option.isEqPromotion) {
|
264
264
|
//retain product.price as original price
|
265
|
-
this.setPrice(this.getPricing(priceType));
|
266
265
|
this.setCv(this.getCvWithType(priceType));
|
267
266
|
this.setPv(this.getPvWithType(priceType));
|
268
267
|
this.priceType = priceType;
|
package/src/productData.js
CHANGED
@@ -48,11 +48,11 @@ const ProductData = {
|
|
48
48
|
},
|
49
49
|
|
50
50
|
/**
|
51
|
-
*
|
52
|
-
* @param {string[]} skus
|
53
|
-
* @param {string} locale
|
54
|
-
* @param {ConfigMap} config
|
55
|
-
* @returns
|
51
|
+
*
|
52
|
+
* @param {string[]} skus
|
53
|
+
* @param {string} locale
|
54
|
+
* @param {ConfigMap} config
|
55
|
+
* @returns
|
56
56
|
*/
|
57
57
|
searchEquinoxProduct: async function (skus, locale, config) {
|
58
58
|
let skuFilter = [];
|
@@ -140,7 +140,6 @@ const ProductData = {
|
|
140
140
|
const discountedPrice = eventName ? computedPrice : eqVariant.priceFacets["Regular Price"];
|
141
141
|
const productCVPrice = eventName ? CVPrice : eqVariant.priceFacets.CV;
|
142
142
|
const productPVPrice = eventName ? PVPrice : eqVariant.priceFacets.PV;
|
143
|
-
const wholeSalePrice = eventName ? defaultProductPrice : eqVariant.priceFacets["Wholesale Price"];
|
144
143
|
|
145
144
|
return {
|
146
145
|
"sku": eqVariant.identifier,
|
@@ -253,12 +252,12 @@ const ProductData = {
|
|
253
252
|
"price": discountedPrice,
|
254
253
|
"priceMap": {
|
255
254
|
"WRTL": productPrice,
|
256
|
-
"WADW-WRTL":
|
257
|
-
"WADR":
|
258
|
-
"RTL":
|
259
|
-
"WWHL":
|
260
|
-
"WADW":
|
261
|
-
"WHL":
|
255
|
+
"WADW-WRTL": eqVariant.priceFacets["Regular Price"],
|
256
|
+
"WADR": eqVariant.priceFacets["Regular Price"],
|
257
|
+
"RTL": eqVariant.priceFacets["Regular Price"],
|
258
|
+
"WWHL": eqVariant.priceFacets["Wholesale Price"],
|
259
|
+
"WADW": eqVariant.priceFacets["Wholesale Price"],
|
260
|
+
"WHL": eqVariant.priceFacets["Wholesale Price"]
|
262
261
|
},
|
263
262
|
"cvMap": {
|
264
263
|
"WWHL": productCVPrice,
|
@@ -388,11 +387,9 @@ const ProductData = {
|
|
388
387
|
PVPrice
|
389
388
|
} = this.getEqProductPromotions(product);
|
390
389
|
const productPrice = eventName ? defaultProductPrice : product.priceFacets["Regular Price"];
|
391
|
-
const discountedPrice = eventName ? computedPrice : product.priceFacets["
|
390
|
+
const discountedPrice = eventName ? computedPrice : product.priceFacets["Regular Price"];
|
392
391
|
const productCVPrice = eventName ? CVPrice : product.priceFacets.CV;
|
393
392
|
const productPVPrice = eventName ? PVPrice : product.priceFacets.PV;
|
394
|
-
const wholeSalePrice = eventName ? defaultProductPrice : product.priceFacets["Wholesale Price"];
|
395
|
-
|
396
393
|
|
397
394
|
product.childSkus = await this.fetchChildSkus(product);
|
398
395
|
product.availableQuantity = mapAvailableQuantity(product);
|
@@ -436,13 +433,13 @@ const ProductData = {
|
|
436
433
|
"priceType": "WRTL",
|
437
434
|
"price": discountedPrice,
|
438
435
|
"priceMap": {
|
439
|
-
"WRTL": productPrice,
|
440
|
-
"WADW-WRTL":
|
441
|
-
"WADR":
|
442
|
-
"RTL":
|
443
|
-
"WADW":
|
444
|
-
"WHL":
|
445
|
-
"WWHL":
|
436
|
+
"WRTL": productPrice,
|
437
|
+
"WADW-WRTL": product.priceFacets["Regular Price"],
|
438
|
+
"WADR": product.priceFacets["Regular Price"],
|
439
|
+
"RTL": product.priceFacets["Regular Price"],
|
440
|
+
"WADW": product.priceFacets["Wholesale Price"],
|
441
|
+
"WHL": product.priceFacets["Wholesale Price"],
|
442
|
+
"WWHL": product.priceFacets["Wholesale Price"]
|
446
443
|
},
|
447
444
|
"cvMap": {
|
448
445
|
"WWHL": productCVPrice,
|