@nuskin/ns-product-lib 2.8.0-cx24-3684.6 → 2.8.1-cx24-4061.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +41 -0
- package/package.json +1 -1
- package/src/productData.js +9 -5
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1
|
+
## [2.8.1-cx24-4061.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.8.1-cx24-4061.1) (2023-05-09)
|
2
|
+
|
3
|
+
|
4
|
+
### Fix
|
5
|
+
|
6
|
+
* Multiple variants add to cart not adding correct sku ([1c20e6e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1c20e6e394ed9bf680be2cd7a2f500d83288b87a))
|
7
|
+
|
8
|
+
# [2.8.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1...v2.8.0) (2023-05-02)
|
9
|
+
|
10
|
+
|
11
|
+
### Fix
|
12
|
+
|
13
|
+
* added event pricing (#CX24-3684) ([49d1467](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/49d1467eecb69437adb16e9c85d07c52dca21d26)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
14
|
+
* 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)
|
15
|
+
* event price #(CX24-3684) ([1ca87d4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1ca87d4993f85aefd5f67664d3febae0fb672e6c))
|
16
|
+
* product price (#CX24-3684) ([20fd37a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/20fd37a7710270e8186ee65070806813e465ce79)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
17
|
+
* Rebased to master ([65b08a7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/65b08a7d2ed14ae431ac2a9218ad138716c5ea1c))
|
18
|
+
* remove price as default for setPrice promotion (#CX24-3684) ([2598be7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2598be77b40fff57344c832bac65f8271c7f5958)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
19
|
+
* 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)
|
20
|
+
* 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)
|
21
|
+
|
22
|
+
### Release
|
23
|
+
|
24
|
+
* Automated changes by GitLab pipeline [skip ci] ([2500244](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/250024436200ef9299c225537185e8001e784a92))
|
25
|
+
* Automated changes by GitLab pipeline [skip ci] ([aed231f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/aed231f9baf55fe4fd0061e20337a21124dcb4dd))
|
26
|
+
* Automated changes by GitLab pipeline [skip ci] ([6d772f9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/6d772f957657f24f90b16a182c6ac8649d9478f5))
|
27
|
+
* Automated changes by GitLab pipeline [skip ci] ([2200f5e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2200f5ecefceaee439a538ce43025ecef0e4b886))
|
28
|
+
* Automated changes by GitLab pipeline [skip ci] ([d011666](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d0116663310d182996e0fadd43030e4aae9d749d))
|
29
|
+
* Automated changes by GitLab pipeline [skip ci] ([df963dc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/df963dc9f542995f60fd7ddd2365c7fb1211c691))
|
30
|
+
* Automated changes by GitLab pipeline [skip ci] ([8f9d9e1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8f9d9e1660ba775619b192c8e91920b99e8762e9))
|
31
|
+
* Automated changes by GitLab pipeline [skip ci] ([edf7159](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/edf7159c70c164b5511f8d9a19d49663dad75296))
|
32
|
+
* Automated changes by GitLab pipeline [skip ci] ([0a2a6a0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0a2a6a00edb579cf167928e0e9dd2d82089124a3))
|
33
|
+
|
34
|
+
### Update
|
35
|
+
|
36
|
+
* fix promotion price (#CX24-3684) ([7a1a2bc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7a1a2bcb4d9f05e57c77f71d5a17dec595578e14)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
37
|
+
* fix promotion price (#CX24-3684) ([2dedc98](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2dedc985d2107872791406aca8a195e0132a597d)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
38
|
+
* fix promotion price (#CX24-3684) ([e289808](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e2898085b94f901e5225890e90db5679f9c66888)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
39
|
+
* set discounted price as WWHL for promotion (#CX24-3684) ([4b42a29](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/4b42a298b16dfd361bdd146b3023efd871d7be19)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
40
|
+
* set discounted price as WWHL for promotion (#CX24-3684) ([1638ca5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1638ca52656b6e2d51d31b595b6a880956435533)), closes [#CX24-3684](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3684)
|
41
|
+
|
1
42
|
# [2.8.0-cx24-3684.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0-cx24-3684.5...v2.8.0-cx24-3684.6) (2023-04-19)
|
2
43
|
|
3
44
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -364,8 +364,9 @@ const ProductData = {
|
|
364
364
|
let variants = {};
|
365
365
|
let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
|
366
366
|
let imageURL = product.properties.imageURL ? product.properties.imageURL : '';
|
367
|
-
let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
|
368
|
-
|
367
|
+
let thumbnailImage = imageURL ? imageURL + '?width=40' : '';
|
368
|
+
let productTitle = productData.properties.name;
|
369
|
+
let productSku = product.identifier
|
369
370
|
|
370
371
|
if (productData.sku && productData.sku.length > 1) {
|
371
372
|
// exclude base product from variants
|
@@ -373,6 +374,9 @@ const ProductData = {
|
|
373
374
|
variants[variant.identifier] = this.eqProductVariantMapper(variant);
|
374
375
|
return variant;
|
375
376
|
});
|
377
|
+
const productArr = productData.sku.filter(p => p.default === true)
|
378
|
+
productTitle = productArr[0].properties.name;
|
379
|
+
productSku = productArr[0].identifier
|
376
380
|
}
|
377
381
|
|
378
382
|
const {
|
@@ -394,9 +398,9 @@ const ProductData = {
|
|
394
398
|
product.availableQuantity = mapAvailableQuantity(product);
|
395
399
|
product = {
|
396
400
|
...product,
|
397
|
-
"sku":
|
401
|
+
"sku": productSku,
|
398
402
|
"globalProductID": productData.identifier,
|
399
|
-
"title":
|
403
|
+
"title": productTitle,
|
400
404
|
"country": product.properties.market,
|
401
405
|
"language": "en",
|
402
406
|
"shortDescr": productData.properties.description,
|
@@ -513,7 +517,7 @@ const ProductData = {
|
|
513
517
|
};
|
514
518
|
},
|
515
519
|
|
516
|
-
mapEquinoxSKUExists: function(exists) {
|
520
|
+
mapEquinoxSKUExists: function (exists) {
|
517
521
|
// this could be avoided if only we are using response mapper
|
518
522
|
// for equinox products that exists.
|
519
523
|
// @todo: clean-up
|