@nuskin/ns-product-lib 2.6.0-cx24-3464.3 → 2.6.0-cx24-3464.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/productData.js +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [2.6.0-cx24-3464.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3464.4...v2.6.0-cx24-3464.5) (2023-03-10)
|
2
|
+
|
3
|
+
|
4
|
+
### Update
|
5
|
+
|
6
|
+
* get child skus to be used for add-to-cart #CX24-3464 ([20439ce](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/20439ce10c3ae8ca2bf35912b7309e1bf5b12da1)), closes [#CX24-3464](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3464)
|
7
|
+
|
8
|
+
# [2.6.0-cx24-3464.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3464.3...v2.6.0-cx24-3464.4) (2023-03-10)
|
9
|
+
|
10
|
+
|
11
|
+
### Update
|
12
|
+
|
13
|
+
* get child skus to be used for add-to-cart #CX24-3464 ([fd47876](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fd478765fdbaa0cc11c1832a7667977923df1aef)), closes [#CX24-3464](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3464)
|
14
|
+
|
1
15
|
# [2.6.0-cx24-3464.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3464.2...v2.6.0-cx24-3464.3) (2023-03-10)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -338,7 +338,6 @@ const ProductData = {
|
|
338
338
|
|
339
339
|
for (const productData of productDataResponse) {
|
340
340
|
let product = (productData.type && productData.type === "kit") ? productData : productData.sku[count];
|
341
|
-
const childSkus = await this.fetchChildSkus(product);
|
342
341
|
let imageURL = product.properties.imageURL;
|
343
342
|
const regex = /\d+\.\d+/
|
344
343
|
let thumbnailImage = ''
|
@@ -425,7 +424,7 @@ const ProductData = {
|
|
425
424
|
"WHL": product.priceFacets.PV
|
426
425
|
},
|
427
426
|
"orderTypes": this._setOrderType(product.properties),
|
428
|
-
childSkus,
|
427
|
+
childSkus: await this.fetchChildSkus(product),
|
429
428
|
"custTypes": this.switchCustType(product.properties.customerTypes),
|
430
429
|
"division": productData.properties.division,
|
431
430
|
"backOrderDate": null,
|
@@ -483,8 +482,9 @@ const ProductData = {
|
|
483
482
|
*/
|
484
483
|
fetchChildSkus: async function(product) {
|
485
484
|
if (product.type === productTypes.kit) {
|
486
|
-
const config = getCachedConfigurations(['Equinox_Markets']);
|
485
|
+
const config = getCachedConfigurations(['Equinox_Markets']).Equinox_Markets;
|
487
486
|
const { skukits } = product.properties;
|
487
|
+
const { locale } = product.tempProperties[0];
|
488
488
|
|
489
489
|
if (!skukits) {
|
490
490
|
return [];
|
@@ -495,10 +495,10 @@ const ProductData = {
|
|
495
495
|
return { sku, qty };
|
496
496
|
});
|
497
497
|
const skus = kits.map(k => k.sku);
|
498
|
-
const products = await this.getProductFromEquinox(skus,
|
498
|
+
const products = await this.getProductFromEquinox(skus, locale, config);
|
499
499
|
console.log(products);
|
500
500
|
}
|
501
|
-
|
501
|
+
|
502
502
|
return [];
|
503
503
|
},
|
504
504
|
|