@nuskin/ns-shop 7.9.1-td-4379.3 → 7.9.1-td-4379.5
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
CHANGED
|
@@ -400,7 +400,7 @@ function goToCartPage() {
|
|
|
400
400
|
} else if (!shoppingContext) {
|
|
401
401
|
const sessionUrl = getSessionShopURL();
|
|
402
402
|
if (sessionUrl) {
|
|
403
|
-
url = `https://${env}nuskin.com
|
|
403
|
+
url = `https://${env}nuskin.com${sessionUrl}`;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|
|
@@ -414,13 +414,13 @@ function getSessionShopURL() {
|
|
|
414
414
|
const sessionStorefront = sessionStorage.getItem('storefront') ? JSON.parse(sessionStorage.getItem('storefront')) : null;
|
|
415
415
|
let url;
|
|
416
416
|
|
|
417
|
-
if (
|
|
418
|
-
if (shoppingContext
|
|
417
|
+
if (shoppingContext && sessionStorefront && sessionStorefront.user) {
|
|
418
|
+
if (shoppingContext.context === "storefront" && sessionStorefront.user.shopUrl) {
|
|
419
419
|
const shopUrl = sessionStorefront.user.shopUrl;
|
|
420
|
-
url =
|
|
421
|
-
} else if (shoppingContext
|
|
420
|
+
url = `/${market.toLowerCase()}/${locale.toLowerCase()}/mysite/${shopUrl}/viewCart`;
|
|
421
|
+
} else if (shoppingContext.context === 'personal_offer' && sessionStorefront.user.sapId) {
|
|
422
422
|
const sapId = sessionStorefront.user.sapId;
|
|
423
|
-
url =
|
|
423
|
+
url = `/${market.toLowerCase()}/${locale.toLowerCase()}/personal-offer/${sapId}/viewCart`;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
|