@nuskin/ns-shop 6.3.0 → 6.4.0
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
package/src/cart/cartService.js
CHANGED
|
@@ -13,7 +13,8 @@ import QualificationService from '../qualification/qualificationService.js';
|
|
|
13
13
|
import {ProductStatus} from '@nuskin/ns-product-lib';
|
|
14
14
|
import webLoyalty from '@nuskin/ns-loyalty-web';
|
|
15
15
|
import axios from 'axios';
|
|
16
|
-
import { getCachedConfigField, getConfiguration } from '@nuskin/configuration-sdk';
|
|
16
|
+
import { getCachedConfigField, getCachedConfiguration, getConfiguration } from '@nuskin/configuration-sdk';
|
|
17
|
+
import equinoxCartService from './equinoxCartService';
|
|
17
18
|
|
|
18
19
|
export default {
|
|
19
20
|
goToCartPage,
|
|
@@ -1286,7 +1287,18 @@ function gotoPage(page) {
|
|
|
1286
1287
|
}
|
|
1287
1288
|
|
|
1288
1289
|
function goToCartPage(params = {}) {
|
|
1289
|
-
|
|
1290
|
+
const config = getCachedConfiguration('Equinox_Markets');
|
|
1291
|
+
const country = RunConfigService.getRunConfig().country;
|
|
1292
|
+
|
|
1293
|
+
if (
|
|
1294
|
+
equinoxLocalStorage.isEquinoxEnabled()
|
|
1295
|
+
&& config.active
|
|
1296
|
+
&& config.country_code === country
|
|
1297
|
+
) {
|
|
1298
|
+
equinoxCartService.goToCartPage();
|
|
1299
|
+
} else {
|
|
1300
|
+
gotoPage(getCartPage(params));
|
|
1301
|
+
}
|
|
1290
1302
|
}
|
|
1291
1303
|
|
|
1292
1304
|
function checkContext(params){
|
|
@@ -255,7 +255,8 @@ async function _equinoxRequest(options) {
|
|
|
255
255
|
function goToCartPage() {
|
|
256
256
|
const [locale, market] = UrlService.getLocale().split("_")
|
|
257
257
|
const currentEnvironment = RunConfigService.getEnvironmentCode();
|
|
258
|
-
|
|
258
|
+
const env = currentEnvironment !== 'prod' ? 'test.' : '';
|
|
259
|
+
window.location = `https://mysite.${env}mynuskin.com/${market.toLowerCase()}/${locale.toLowerCase()}/viewCart`
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
$(async function () {
|