@nuskin/ns-product-lib 2.6.2-cx24-337703.1 → 2.6.2-cx24-3702.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2 -2
- package/package.json +2 -2
- package/src/productData.js +6 -3
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
## [2.6.2-cx24-
|
1
|
+
## [2.6.2-cx24-3702.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1...v2.6.2-cx24-3702.1) (2023-03-25)
|
2
2
|
|
3
3
|
|
4
4
|
### Fix
|
5
5
|
|
6
|
-
*
|
6
|
+
* Add to cart for variants always using first variants ([528c9d5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/528c9d54123c11aa7480ebf476a6de1e196f41c6))
|
7
7
|
|
8
8
|
## [2.6.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0...v2.6.1) (2023-03-16)
|
9
9
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "2.6.2-cx24-
|
3
|
+
"version": "2.6.2-cx24-3702.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.2.
|
36
|
+
"@nuskin/ns-util": "4.2.5",
|
37
37
|
"axios": "0.27.2",
|
38
38
|
"qs": "6.11.0"
|
39
39
|
},
|
package/src/productData.js
CHANGED
@@ -66,6 +66,7 @@ const ProductData = {
|
|
66
66
|
}
|
67
67
|
|
68
68
|
const filter = skuFilter.join(" OR ")
|
69
|
+
//axios.defaults.withCredentials = true;
|
69
70
|
|
70
71
|
const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
|
71
72
|
const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
|
@@ -295,7 +296,8 @@ const ProductData = {
|
|
295
296
|
},
|
296
297
|
"restrictedMarkets": [],
|
297
298
|
"addOns": [],
|
298
|
-
"equinoxProductId": eqVariant.identifier
|
299
|
+
"equinoxProductId": eqVariant.identifier,
|
300
|
+
"properties": eqVariant.properties
|
299
301
|
};
|
300
302
|
},
|
301
303
|
|
@@ -338,11 +340,11 @@ const ProductData = {
|
|
338
340
|
|
339
341
|
eqProductMapper: async function (productDataResponse, skus) {
|
340
342
|
let count = 0;
|
343
|
+
let variants = {};
|
341
344
|
const products = [];
|
342
345
|
|
343
346
|
for (const productData of productDataResponse) {
|
344
347
|
try {
|
345
|
-
let variants = {};
|
346
348
|
let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
|
347
349
|
let imageURL = product.properties.imageURL ? product.properties.imageURL : '';
|
348
350
|
let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
|
@@ -458,7 +460,8 @@ const ProductData = {
|
|
458
460
|
"restrictedMarkets": [],
|
459
461
|
"addOns": [],
|
460
462
|
"inventory": product.inventory || "", //inventory label
|
461
|
-
"equinoxProductId": productData.identifier
|
463
|
+
"equinoxProductId": productData.identifier,
|
464
|
+
"properties": product.properties
|
462
465
|
};
|
463
466
|
|
464
467
|
products.push(new Product(product));
|