@nuskin/ns-product-lib 2.5.1-cx24-3282m.1 → 2.5.1-cx24-3377.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 +1 -1
- package/src/product.js +6 -4
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
## [2.5.1-cx24-
|
1
|
+
## [2.5.1-cx24-3377.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0...v2.5.1-cx24-3377.1) (2023-03-02)
|
2
2
|
|
3
3
|
|
4
4
|
### Fix
|
5
5
|
|
6
|
-
*
|
6
|
+
* Multiple variants not loading properly ([0462248](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/04622485384522e90e843cc77d686692331bfa36))
|
7
7
|
|
8
8
|
# [2.5.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.4.1...v2.5.0) (2023-02-22)
|
9
9
|
|
package/package.json
CHANGED
package/src/product.js
CHANGED
@@ -303,9 +303,7 @@ const Product = function (productData) {
|
|
303
303
|
if (productStatusSku === this.sku) {
|
304
304
|
this.globalProductID = productStatus.globalProductID;
|
305
305
|
this.status = productStatus.status;
|
306
|
-
|
307
|
-
this.availableQuantity = productStatus.availableQuantity;
|
308
|
-
}
|
306
|
+
this.availableQuantity = productStatus.availableQuantity;
|
309
307
|
this.maxQuantity = productStatus.maxQuantity || 999;
|
310
308
|
this.locallyProduced = productStatus.locallyProduced || false;
|
311
309
|
if (productStatus.backordered) {
|
@@ -429,7 +427,11 @@ const Product = function (productData) {
|
|
429
427
|
return this.custTypes.includes("30");
|
430
428
|
};
|
431
429
|
|
432
|
-
this.isBase = function () {
|
430
|
+
this.isBase = function (option = {}) {
|
431
|
+
if (option && option.isEquinoxEnabled) {
|
432
|
+
return !!this.variants;
|
433
|
+
}
|
434
|
+
|
433
435
|
return this.sku.substring(2, 4) === "55";
|
434
436
|
};
|
435
437
|
|