@nuskin/ns-product-lib 2.7.1-cx24-3879.2 → 2.8.0-cx24-3705.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -11
- package/package.json +1 -1
- package/src/product.js +1 -5
- package/src/productData.js +5 -3
package/CHANGELOG.md
CHANGED
@@ -1,17 +1,9 @@
|
|
1
|
-
|
1
|
+
# [2.8.0-cx24-3705.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.8.0-cx24-3705.1) (2023-04-14)
|
2
2
|
|
3
3
|
|
4
|
-
###
|
5
|
-
|
6
|
-
* Payload for subscription products are missing when added to cart from MySite homepage ([20b0ed2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/20b0ed2661b4d213147cef9e77d268b167b49421))
|
7
|
-
|
8
|
-
## [2.7.1-cx24-3879.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1-cx24-3879.1) (2023-04-13)
|
9
|
-
|
10
|
-
|
11
|
-
### Fix
|
4
|
+
### Update
|
12
5
|
|
13
|
-
*
|
14
|
-
* Payload for subscription products are missing when added to cart from MySite homepage ([d49957f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d49957f44d9ce6b6469b0bc94bc8f8050d00f35a))
|
6
|
+
* setting correct title if multiple variants ([9574804](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9574804094f65261ff45c9658ba4e4d4baf0bdf2))
|
15
7
|
|
16
8
|
# [2.7.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.2...v2.7.0) (2023-04-05)
|
17
9
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -337,11 +337,7 @@ const Product = function (productData) {
|
|
337
337
|
return this.addCvWithType(csvKey, productStatus.csv[csvKey]);
|
338
338
|
}, this);
|
339
339
|
}
|
340
|
-
|
341
|
-
if(this.equinoxProductId == "") {
|
342
|
-
this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
|
343
|
-
}
|
344
|
-
|
340
|
+
this.orderTypes = ProductUtils.mergeOrderTypes(this.orderTypes, productStatus.orderType);
|
345
341
|
if (productStatus.childSkus) {
|
346
342
|
this.childSkus = productStatus.childSkus;
|
347
343
|
}
|
package/src/productData.js
CHANGED
@@ -364,7 +364,7 @@ const ProductData = {
|
|
364
364
|
let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
|
365
365
|
let imageURL = product.properties.imageURL ? product.properties.imageURL : '';
|
366
366
|
let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
|
367
|
-
|
367
|
+
let productTitle = productData.properties.name
|
368
368
|
|
369
369
|
if (productData.sku && productData.sku.length > 1) {
|
370
370
|
// exclude base product from variants
|
@@ -372,6 +372,8 @@ const ProductData = {
|
|
372
372
|
variants[variant.identifier] = this.eqProductVariantMapper(variant);
|
373
373
|
return variant;
|
374
374
|
});
|
375
|
+
const productArr = productData.sku.filter(p => p.default === true)
|
376
|
+
productTitle = productArr[0].properties.name
|
375
377
|
}
|
376
378
|
|
377
379
|
const {
|
@@ -393,7 +395,7 @@ const ProductData = {
|
|
393
395
|
...product,
|
394
396
|
"sku": product.identifier,
|
395
397
|
"globalProductID": productData.identifier,
|
396
|
-
"title":
|
398
|
+
"title": productTitle,
|
397
399
|
"country": product.properties.market,
|
398
400
|
"language": "en",
|
399
401
|
"shortDescr": productData.properties.description,
|
@@ -510,7 +512,7 @@ const ProductData = {
|
|
510
512
|
};
|
511
513
|
},
|
512
514
|
|
513
|
-
mapEquinoxSKUExists: function(exists) {
|
515
|
+
mapEquinoxSKUExists: function (exists) {
|
514
516
|
// this could be avoided if only we are using response mapper
|
515
517
|
// for equinox products that exists.
|
516
518
|
// @todo: clean-up
|