@nuskin/ns-product-lib 2.5.0-cx24-2931.1.12 → 2.5.0-cx24-3168.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +30 -61
- package/package.json +1 -1
- package/src/product.js +4 -0
- package/src/productData.js +9 -4
package/CHANGELOG.md
CHANGED
@@ -1,105 +1,74 @@
|
|
1
|
-
# [2.5.0-cx24-
|
1
|
+
# [2.5.0-cx24-3168.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.9...v2.5.0-cx24-3168.1) (2023-01-11)
|
2
2
|
|
3
3
|
|
4
|
-
###
|
5
|
-
|
6
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([407402f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/407402fbcfb3a782dec95b5ff1038c1fb3fe31ca))
|
7
|
-
|
8
|
-
# [2.5.0-cx24-2931.1.11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.10...v2.5.0-cx24-2931.1.11) (2022-12-14)
|
9
|
-
|
10
|
-
|
11
|
-
### Update
|
12
|
-
|
13
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([fc2010c](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fc2010cdf7dfb7ecd53940d64e94f43c045135c5))
|
14
|
-
|
15
|
-
# [2.5.0-cx24-2931.1.10](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.9...v2.5.0-cx24-2931.1.10) (2022-12-14)
|
16
|
-
|
17
|
-
|
18
|
-
### Update
|
19
|
-
|
20
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([73cd345](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/73cd3459f0d3a4486a6b7798bdb1dab0231e7c5a))
|
21
|
-
|
22
|
-
# [2.5.0-cx24-2931.1.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.8...v2.5.0-cx24-2931.1.9) (2022-12-14)
|
23
|
-
|
24
|
-
|
25
|
-
### Update
|
4
|
+
### Fix
|
26
5
|
|
27
|
-
*
|
6
|
+
* Equinox API called for non equinox market (CX24-3168) ([14a43f1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/14a43f14134644aeb0792a116c6955eccf5831af))
|
28
7
|
|
29
|
-
# [2.5.0-cx24-
|
8
|
+
# [2.5.0-cx24-2179.2.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.8...v2.5.0-cx24-2179.2.9) (2022-12-20)
|
30
9
|
|
31
10
|
|
32
|
-
###
|
11
|
+
### Fix
|
33
12
|
|
34
|
-
*
|
13
|
+
* eq market event pricing and name (#CX24-2179) ([213b59a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/213b59a33a208ffad0a6726521ce7f365d34d36e)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
14
|
+
* Slow response of add-to-cart button function for Equinox Cart ([14394b2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/14394b299afbd53254a3ec053ad41e68ed526dfe))
|
15
|
+
* Unit Tests ([ace52c6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/ace52c6418991d0263a1e1f8d99901e724abf923))
|
35
16
|
|
36
|
-
|
17
|
+
### Release
|
37
18
|
|
19
|
+
* Automated changes by GitLab pipeline [skip ci] ([eb755fa](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/eb755fae1e1f1f221a34d92f5ff4e64787a4132d))
|
20
|
+
* Automated changes by GitLab pipeline [skip ci] ([6a75f7a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/6a75f7a5f8b2f3b17e4d7387af37cad4f367b45c))
|
38
21
|
|
39
22
|
### Update
|
40
23
|
|
41
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([
|
42
|
-
|
43
|
-
# [2.5.0-cx24-2931.1.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.5...v2.5.0-cx24-2931.1.6) (2022-12-14)
|
24
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([6934570](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/69345701e6b44754ffeb648ead56f0288aadeb16))
|
44
25
|
|
26
|
+
# [2.5.0-CX24.3.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.4.2-CX24.2.1...v2.5.0-CX24.3.1) (2022-12-06)
|
45
27
|
|
46
|
-
|
47
|
-
|
48
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([527d80f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/527d80fee9396e87cf1e92c223790c33bcba681f))
|
28
|
+
* 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)
|
49
29
|
|
50
|
-
# [2.5.0-cx24-
|
30
|
+
# [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)
|
51
31
|
|
52
32
|
|
53
33
|
### New
|
54
34
|
|
55
|
-
*
|
56
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([34b6954](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/34b6954dcd751a390ee2395fe1a3ca42481affc8))
|
57
|
-
|
58
|
-
### Update
|
35
|
+
* 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)
|
59
36
|
|
60
|
-
|
61
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([11655c4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/11655c46484aa6e6e359522c707c64f496755976))
|
37
|
+
# [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)
|
62
38
|
|
63
|
-
# [2.5.0-cx24-2931.1.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.3...v2.5.0-cx24-2931.1.4) (2022-12-14)
|
64
39
|
|
40
|
+
### New
|
65
41
|
|
66
|
-
|
67
|
-
|
68
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([9abdf43](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9abdf4326fa55692045f5a3cc91f5725afe94cb2))
|
42
|
+
* added eq promoion bypass for setPriceAndPvFromType v3 (#CX24-2179) ([79fe156](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/79fe1562d0cafc44f8945e57c316c8ba0b55a88b)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
69
43
|
|
70
|
-
# [2.5.0-cx24-
|
44
|
+
# [2.5.0-cx24-2179.2.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.3...v2.5.0-cx24-2179.2.4) (2022-12-05)
|
71
45
|
|
72
46
|
|
73
|
-
###
|
47
|
+
### New
|
74
48
|
|
75
|
-
*
|
49
|
+
* added eq promoion bypass for setPriceAndPvFromType v2 (#CX24-2179) ([25bde9a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/25bde9a8e19b1e4e44e37457dfb087e0a6212ee1)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
76
50
|
|
77
|
-
# [2.5.0-cx24-
|
51
|
+
# [2.5.0-cx24-2179.2.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.2...v2.5.0-cx24-2179.2.3) (2022-12-05)
|
78
52
|
|
79
53
|
|
80
|
-
###
|
54
|
+
### New
|
81
55
|
|
82
|
-
*
|
83
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([65c81f5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/65c81f5486712690f9cda8faf4e2264238009e82))
|
56
|
+
* added eq promoion bypass for setPriceAndPvFromType (#CX24-2179) ([716cefc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/716cefc2a2522287e017709a8b2cfef5a7ce5e07)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
84
57
|
|
85
|
-
# [2.5.0-cx24-
|
58
|
+
# [2.5.0-cx24-2179.2.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.1...v2.5.0-cx24-2179.2.2) (2022-12-05)
|
86
59
|
|
87
60
|
|
88
|
-
###
|
61
|
+
### New
|
89
62
|
|
90
|
-
*
|
91
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([4a1949a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/4a1949a20213478994ff51e4b035f52271b7a840))
|
92
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([9a0c9cb](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9a0c9cb75a39cd1b77bd6272ac573d4f9b628975))
|
93
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([622c608](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/622c60867b07f0fccd316423cba1500a8470e9e2))
|
94
|
-
* use configuration-sdk to pull the configurations (CX24-2931) ([c276e62](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/c276e6223953cf72b791887274a5f11d218696e0))
|
63
|
+
* added eq promotion support- debug sales event (#CX24-2179) ([992a2cf](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/992a2cfb178b3e12a6b8a0229ae5f6f607fb41d3)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
95
64
|
|
96
|
-
# [2.5.0-
|
65
|
+
# [2.5.0-cx24-2179.2.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.4.2-CX24.2.1...v2.5.0-cx24-2179.2.1) (2022-12-02)
|
66
|
+
>>>>>>> CX24.2
|
97
67
|
|
98
68
|
|
99
69
|
### Fix
|
100
70
|
|
101
71
|
* [Equinox market] Admin > Move up/down/top/bottom of featured products and edit bundle is not working ([a89af4a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a89af4a5d00c6a68fcaeff22f128554270add21e))
|
102
|
-
* eq market event pricing and name (#CX24-2179) ([213b59a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/213b59a33a208ffad0a6726521ce7f365d34d36e)), closes [#CX24-2179](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-2179)
|
103
72
|
|
104
73
|
### Release
|
105
74
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -75,6 +75,7 @@ const Product = function(productData) {
|
|
75
75
|
//equinox inventory / stock label
|
76
76
|
//@example "IN STOCK"
|
77
77
|
this.inventory = "";
|
78
|
+
this.equinoxProductId = "";
|
78
79
|
|
79
80
|
this.setMarketAttributes = function(productStatus) {
|
80
81
|
if (productStatus.marketAttributes) {
|
@@ -532,6 +533,7 @@ const Product = function(productData) {
|
|
532
533
|
retData.restrictedMarkets = this.restrictedMarkets;
|
533
534
|
retData.addOns = this.addOns;
|
534
535
|
retData.inventory = this.inventory;
|
536
|
+
retData.equinoxProductId = this.equinoxProductId;
|
535
537
|
|
536
538
|
return retData;
|
537
539
|
};
|
@@ -671,6 +673,8 @@ const Product = function(productData) {
|
|
671
673
|
if (data.agelocme) {
|
672
674
|
this.agelocme = new Agelocme(data.agelocme);
|
673
675
|
}
|
676
|
+
|
677
|
+
this.equinoxProductId = data.equinoxProductId;
|
674
678
|
}
|
675
679
|
};
|
676
680
|
|
package/src/productData.js
CHANGED
@@ -17,7 +17,11 @@ const ProductData = {
|
|
17
17
|
const localeMarket = `${locale}_${market}`;
|
18
18
|
|
19
19
|
if (isEquinoxEnabled) {
|
20
|
-
|
20
|
+
const marketConfig = await contentstack.isMarketEnabled(market);
|
21
|
+
|
22
|
+
if (marketConfig !== null) {
|
23
|
+
return await this.getProductFromEquinox(skus, localeMarket, marketConfig.store_id);
|
24
|
+
}
|
21
25
|
}
|
22
26
|
|
23
27
|
return await this.getProductFromLegacy(skus, localeMarket);
|
@@ -202,7 +206,8 @@ const ProductData = {
|
|
202
206
|
"earn": true
|
203
207
|
},
|
204
208
|
"restrictedMarkets": [],
|
205
|
-
"addOns": []
|
209
|
+
"addOns": [],
|
210
|
+
"equinoxProductId": eqVariant.identifier
|
206
211
|
};
|
207
212
|
},
|
208
213
|
|
@@ -360,8 +365,8 @@ const ProductData = {
|
|
360
365
|
},
|
361
366
|
"restrictedMarkets": [],
|
362
367
|
"addOns": [],
|
363
|
-
"inventory": data.sku[count].inventory || "" //inventory label
|
364
|
-
|
368
|
+
"inventory": data.sku[count].inventory || "", //inventory label
|
369
|
+
"equinoxProductId": data.identifier
|
365
370
|
};
|
366
371
|
let newProduct = new Product(prod);
|
367
372
|
return newProduct
|