@nuskin/ns-shop 5.21.6 → 5.21.8
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/package.json +3 -3
- package/src/cart/cartService.js +8 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/ns-shop",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.8",
|
|
4
4
|
"description": "The description that will amaze and astound your audience when they read it",
|
|
5
5
|
"main": "src/shop.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@nuskin/nuskinjquery": "2.3.1",
|
|
31
31
|
"axios": "0.21.1",
|
|
32
32
|
"decimal.js": "10.2.1",
|
|
33
|
-
"firebase": "
|
|
33
|
+
"firebase": "9.9.4",
|
|
34
34
|
"jp-conversion": "0.0.7",
|
|
35
35
|
"lodash": "4.17.20"
|
|
36
36
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"jest-localstorage-mock": "2.2.0",
|
|
63
63
|
"jest-mock-axios": "2.4.0",
|
|
64
64
|
"jest-sonar-reporter": "2.0.0",
|
|
65
|
-
"jquery": "3.
|
|
65
|
+
"jquery": "3.6.1",
|
|
66
66
|
"karma": "0.13.21",
|
|
67
67
|
"karma-babel-preprocessor": "6.0.1",
|
|
68
68
|
"karma-chrome-launcher": "0.2.2",
|
package/src/cart/cartService.js
CHANGED
|
@@ -384,11 +384,14 @@ async function addProductToCart(options) {
|
|
|
384
384
|
*/
|
|
385
385
|
async function addSkuToCart(options) {
|
|
386
386
|
let retVal,
|
|
387
|
-
response = await ProductService.getProductBySku(options)
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
response = await ProductService.getProductBySku(options),
|
|
388
|
+
product = response.success ? response.product : null;
|
|
389
|
+
|
|
390
|
+
if (product &&
|
|
391
|
+
((options.isAdr === null || options.isAdr === undefined) ||
|
|
392
|
+
(options.isAdr === true && product.hasAdrOption()) ||
|
|
393
|
+
(options.isAdr === false && product.hasOrderOption()))) {
|
|
394
|
+
let isAdr = (product.isAdrOnly() || options.isAdr) && !AdrService.isAdrOverride(),
|
|
392
395
|
qty = options.qty || 1,
|
|
393
396
|
maxQty = options.maxQty || 999,
|
|
394
397
|
isPitchCart;
|