@nuskin/ns-product-lib 2.8.2-cx24-4101.1 → 2.9.0-cx24-4460.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,10 @@
1
- ## [2.8.2-cx24-4101.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.1...v2.8.2-cx24-4101.1) (2023-06-01)
1
+ # [2.9.0-cx24-4460.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.9.0-cx24-4460.1) (2023-06-20)
2
2
 
3
3
 
4
- ### Fix
5
-
6
- * version bump ns-common-lib (#CX24-4101) ([dbf9f8a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/dbf9f8aa81ae8b472a775deb8dd0222660a4cb34)), closes [#CX24-4101](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-4101)
7
-
8
- ## [2.8.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.8.1) (2023-05-23)
9
-
10
-
11
- ### Fix
4
+ ### New
12
5
 
13
- * Multiple variants add to cart not adding correct sku ([968ed05](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/968ed055b5f5024579ac256f26c0d58ba409fcb9))
6
+ * Change API Base URLs for My Site ([fb2e309](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fb2e30953e6e9089da20ac367bad9bf63300a89c))
7
+ * Change API Base URLs for My Site ([1f9ba11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1f9ba11f63ef85e9a444e39080e9277a41fa004d))
14
8
 
15
9
  # [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)
16
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.8.2-cx24-4101.1",
3
+ "version": "2.9.0-cx24-4460.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": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@nuskin/configuration-sdk": "2.2.3",
35
- "@nuskin/ns-common-lib": "1.4.7-cx24-4101.1",
35
+ "@nuskin/ns-common-lib": "1.4.5",
36
36
  "@nuskin/ns-util": "4.3.2",
37
37
  "axios": "0.27.2",
38
38
  "qs": "6.11.0"
@@ -68,7 +68,7 @@ const ProductData = {
68
68
 
69
69
  const filter = skuFilter.join(" OR ")
70
70
 
71
- const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
71
+ const url = `${config.MySite_API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
72
72
  const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
73
73
  axios.interceptors.response.use((res) => res, productNotFoundInterceptor);
74
74
  const response = await axios.request({
@@ -364,9 +364,8 @@ 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
- let productTitle = productData.properties.name;
369
- let productSku = product.identifier
367
+ let thumbnailImage = imageURL ? imageURL + '?width=40' : ''
368
+
370
369
 
371
370
  if (productData.sku && productData.sku.length > 1) {
372
371
  // exclude base product from variants
@@ -374,9 +373,6 @@ const ProductData = {
374
373
  variants[variant.identifier] = this.eqProductVariantMapper(variant);
375
374
  return variant;
376
375
  });
377
- const productArr = productData.sku.filter(p => p.default === true)
378
- productTitle = productArr[0].properties.name;
379
- productSku = productArr[0].identifier
380
376
  }
381
377
 
382
378
  const {
@@ -398,9 +394,9 @@ const ProductData = {
398
394
  product.availableQuantity = mapAvailableQuantity(product);
399
395
  product = {
400
396
  ...product,
401
- "sku": productSku,
397
+ "sku": product.identifier,
402
398
  "globalProductID": productData.identifier,
403
- "title": productTitle,
399
+ "title": productData.properties.name,
404
400
  "country": product.properties.market,
405
401
  "language": "en",
406
402
  "shortDescr": productData.properties.description,