@nuskin/ns-product-lib 2.6.0-cx24-3377.2 → 2.6.0-cx24-3377.4

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # [2.6.0-cx24-3377.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.3...v2.6.0-cx24-3377.4) (2023-03-09)
2
+
3
+
4
+ ### New
5
+
6
+ * Fix multiple variants not loading properly (CX24-3377) ([1b37ed5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1b37ed513dbd9a8751b8378d5133582b88fdcb97))
7
+ * Fix multiple variants not loading properly (CX24-3377) ([ae2c91f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/ae2c91fa98838e60745009e4b66b8c728fad58b8))
8
+
9
+ # [2.6.0-cx24-3377.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.2...v2.6.0-cx24-3377.3) (2023-03-08)
10
+
11
+
12
+ ### New
13
+
14
+ * Fix multiple variants not loading properly (CX24-3377) ([da9eff4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/da9eff46094279a657d6318d96291b94fddcfcf9))
15
+ * Fix multiple variants not loading properly (CX24-3377) ([c6e06c4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/c6e06c488ecdd74876c9cb989a8766b473e7d1f2))
16
+ * Fix multiple variants not loading properly (CX24-3377) ([9b75c96](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9b75c96f681bd3c780bf8ba0ac018d525abe7033))
17
+
1
18
  # [2.6.0-cx24-3377.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3377.1...v2.6.0-cx24-3377.2) (2023-03-08)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.0-cx24-3377.2",
3
+ "version": "2.6.0-cx24-3377.4",
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": {
package/src/product.js CHANGED
@@ -427,8 +427,8 @@ const Product = function (productData) {
427
427
  return this.custTypes.includes("30");
428
428
  };
429
429
 
430
- this.isBase = function (option = {}) {
431
- if (option && option.isEquinoxEnabled) {
430
+ this.isBase = function () {
431
+ if (this.equinoxProductId != "" && this.sku == this.variants[0].sku) {
432
432
  return !!this.variants;
433
433
  }
434
434
  return this.sku.substring(2, 4) === "55";
@@ -545,14 +545,14 @@ const Product = function (productData) {
545
545
  console.error("setMeCommerceProductData is deprecated!");
546
546
  };
547
547
 
548
- this.setBaseUrl = function (baseUrl, option = {}) {
548
+ this.setBaseUrl = function (baseUrl) {
549
549
  this.thumbnail = ProductUtils.applyBaseUrl(this.thumbnail, baseUrl);
550
550
  this.fullImage = ProductUtils.applyBaseUrl(this.fullImage, baseUrl);
551
551
 
552
- if (this.isBase(option)) {
552
+ if (this.isBase()) {
553
553
  for (const variantSku in this.variants) {
554
554
  const variant = this.variants[variantSku];
555
- variant.setBaseUrl(baseUrl, option);
555
+ variant.setBaseUrl(baseUrl);
556
556
  }
557
557
  }
558
558
  };
@@ -255,6 +255,7 @@ const ProductData = {
255
255
  "variantDropdownLabel": eqVariant.properties.variantSelectLabel || "",
256
256
  "variantDropdownPlaceholder": "Select Type",
257
257
  "variantsLabel": eqVariant.properties.variantSelectLabel || "",
258
+ "variants": {},
258
259
  "groupOffer": false,
259
260
  "personalOffer": false,
260
261
  "savedEventName": eventName,