@nuskin/product-components 3.19.2-mdigi-9080.2 → 3.19.2-td-4396.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc +1 -1
- package/docs/CHANGELOG.md +1 -1
- package/mixins/NsProductMixin.js +2 -45
- package/package.json +1 -1
package/.releaserc
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
## [3.19.2-
|
|
1
|
+
## [3.19.2-td-4396.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.19.1...v3.19.2-td-4396.1) (2026-01-09)
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -350,16 +350,6 @@ const NsProductMixin = {
|
|
|
350
350
|
},
|
|
351
351
|
methods: {
|
|
352
352
|
async init() {
|
|
353
|
-
const uniqueProduct = this.getUniqueProduct();
|
|
354
|
-
const productsList = Array.isArray(uniqueProduct.products)
|
|
355
|
-
? uniqueProduct.products
|
|
356
|
-
: [];
|
|
357
|
-
const idValue = productsList
|
|
358
|
-
.map(item => item.sku)
|
|
359
|
-
.filter(Boolean)
|
|
360
|
-
.map(String);
|
|
361
|
-
this.active = idValue.length ? idValue : this.sku;
|
|
362
|
-
console.log("the value is of Id is ...... " + this.sku);
|
|
363
353
|
this.setTranslations();
|
|
364
354
|
await this.$nextTick();
|
|
365
355
|
|
|
@@ -1168,8 +1158,9 @@ const NsProductMixin = {
|
|
|
1168
1158
|
};
|
|
1169
1159
|
EquinoxCartService.addProductToEquinoxCart(options)
|
|
1170
1160
|
.then(() => {
|
|
1171
|
-
|
|
1161
|
+
this.maxQuantity -= options.qty;
|
|
1172
1162
|
this.setStatus();
|
|
1163
|
+
events.publish(events.shop.ADD_TO_CART, options);
|
|
1173
1164
|
})
|
|
1174
1165
|
.catch(err => {
|
|
1175
1166
|
// TODO
|
|
@@ -1622,40 +1613,6 @@ const NsProductMixin = {
|
|
|
1622
1613
|
});
|
|
1623
1614
|
}
|
|
1624
1615
|
return text || "";
|
|
1625
|
-
},
|
|
1626
|
-
|
|
1627
|
-
deepEqual(varientValue, variantData) {
|
|
1628
|
-
return JSON.stringify(varientValue) === JSON.stringify(variantData);
|
|
1629
|
-
},
|
|
1630
|
-
|
|
1631
|
-
getUniqueProduct() {
|
|
1632
|
-
if (
|
|
1633
|
-
typeof sessionStorage === "undefined" ||
|
|
1634
|
-
!sessionStorage.getItem("personalOffer")
|
|
1635
|
-
) {
|
|
1636
|
-
return { products: [] };
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
const variantCheck = JSON.parse(
|
|
1640
|
-
sessionStorage.getItem("personalOffer")
|
|
1641
|
-
) || { products: [] };
|
|
1642
|
-
|
|
1643
|
-
if (!variantCheck.products || !Array.isArray(variantCheck.products)) {
|
|
1644
|
-
return { products: [] };
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
const unique = [];
|
|
1648
|
-
variantCheck.products.forEach(product => {
|
|
1649
|
-
const exists = unique.some(
|
|
1650
|
-
u =>
|
|
1651
|
-
u.sku === product.sku &&
|
|
1652
|
-
this.deepEqual(u.variantSelected, product.variantSelected)
|
|
1653
|
-
);
|
|
1654
|
-
if (!exists) {
|
|
1655
|
-
unique.push(product);
|
|
1656
|
-
}
|
|
1657
|
-
});
|
|
1658
|
-
return { products: unique };
|
|
1659
1616
|
}
|
|
1660
1617
|
}
|
|
1661
1618
|
};
|