@nuskin/ns-shop 5.19.5 → 5.19.7
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 +1 -1
- package/src/cart/cartService.js +2 -2
package/package.json
CHANGED
package/src/cart/cartService.js
CHANGED
|
@@ -328,7 +328,7 @@ function itemIsAvailable(product) {
|
|
|
328
328
|
async function addProductToCart(options) {
|
|
329
329
|
let cart = _getCart();
|
|
330
330
|
|
|
331
|
-
if (!itemIsAvailable(options.product)) {
|
|
331
|
+
if (!options.sapLineId && !itemIsAvailable(options.product)) {
|
|
332
332
|
throw new NsProductNotReleasedForSale('This product is not released for sale');
|
|
333
333
|
}
|
|
334
334
|
|
|
@@ -1305,7 +1305,7 @@ function checkContext(params){
|
|
|
1305
1305
|
if (context === 'skin_consult'){
|
|
1306
1306
|
return params.isMySite
|
|
1307
1307
|
} else {
|
|
1308
|
-
return params.isMySite
|
|
1308
|
+
return typeof params.isMySite === 'boolean' ? params.isMySite : window.location.href.search(/\bmysite\b/) >= 0;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
1311
|
|