@nuskin/product-components 3.2.1 → 3.2.2-cx24-3504.2
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/CHANGELOG.md +15 -0
- package/mixins/NsProductMixin.js +42 -18
- package/package.json +1 -1
package/.releaserc
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [3.2.2-cx24-3504.2](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.2-cx24-3504.1...v3.2.2-cx24-3504.2) (2023-03-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Fix
|
|
5
|
+
|
|
6
|
+
* adr button for equinox ([ffb452a](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/ffb452af972bbe4f2f90eac8fecc7132cae221e5))
|
|
7
|
+
* adr button for equinox ([e12a0bc](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/e12a0bc537d8050df7cff8f3e7644fd167ba1665))
|
|
8
|
+
|
|
9
|
+
## [3.2.2-cx24-3504.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.1...v3.2.2-cx24-3504.1) (2023-03-12)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Fix
|
|
13
|
+
|
|
14
|
+
* adr button for equinox ([4d425f0](https://code.tls.nuskin.io/ns-am/ux/product-components/commit/4d425f00d6d0ad1d39c5e32f5f987155c2416eed))
|
|
15
|
+
|
|
1
16
|
## [3.2.1](https://code.tls.nuskin.io/ns-am/ux/product-components/compare/v3.2.0...v3.2.1) (2023-03-08)
|
|
2
17
|
|
|
3
18
|
|
package/mixins/NsProductMixin.js
CHANGED
|
@@ -962,24 +962,48 @@ const NsProductMixin = {
|
|
|
962
962
|
*/
|
|
963
963
|
handleAddToAdr() {
|
|
964
964
|
if (!this.disableAddToAdr) {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
965
|
+
getConfiguration(["Equinox_Markets"]).then(config => {
|
|
966
|
+
let options = {
|
|
967
|
+
sku: this.activeSku,
|
|
968
|
+
qty: this.selectedQuantity,
|
|
969
|
+
adr: !AdrService.isAdrOverride(),
|
|
970
|
+
referrer: this.referrer
|
|
971
|
+
};
|
|
972
|
+
if (
|
|
973
|
+
config.Equinox_Markets.active &&
|
|
974
|
+
equinoxLocalStorage.isEquinoxEnabled()
|
|
975
|
+
) {
|
|
976
|
+
ProductDataService.getProductData(this.activeSku).then(
|
|
977
|
+
productData => {
|
|
978
|
+
options.product = new ShopProduct(productData.products[0]);
|
|
979
|
+
|
|
980
|
+
EquinoxCartService.addProductToEquinoxCart(options)
|
|
981
|
+
.then(() => {
|
|
982
|
+
this.maxQuantity -= options.qty;
|
|
983
|
+
this.setStatus();
|
|
984
|
+
events.publish(events.shop.ADD_TO_CART, options);
|
|
985
|
+
events.publish(events.shop.SHOW_ADD_TO_BAG, options);
|
|
986
|
+
this.$emit("added-to-adr", options);
|
|
987
|
+
})
|
|
988
|
+
.catch(error => {
|
|
989
|
+
console.error("Failed to add to ADR.", error);
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
);
|
|
993
|
+
} else {
|
|
994
|
+
CartService.addProductToCart(options)
|
|
995
|
+
.then(() => {
|
|
996
|
+
this.maxQuantity -= options.qty;
|
|
997
|
+
this.setStatus();
|
|
998
|
+
events.publish(events.shop.ADD_TO_CART, options);
|
|
999
|
+
events.publish(events.shop.SHOW_ADD_TO_BAG, options);
|
|
1000
|
+
this.$emit("added-to-adr", options);
|
|
1001
|
+
})
|
|
1002
|
+
.catch(error => {
|
|
1003
|
+
console.error("Failed to add to ADR.", error);
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
983
1007
|
}
|
|
984
1008
|
},
|
|
985
1009
|
|