@nuskin/ns-shop 7.7.0-pa-902.4 → 7.7.0-pa-902.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "7.7.0-pa-902.4",
3
+ "version": "7.7.0-pa-902.6",
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": {
@@ -439,11 +439,13 @@ const updateAnonymousPersistedCart = async (cartId, payload) => {
439
439
  */
440
440
  const removePersistedCart = async (cartId) => {
441
441
  const user = UserService.getUser();
442
+ const {country} = RunConfigService.getRunConfig();
443
+
442
444
  try {
443
445
  if (user && cartId) {
444
446
  await axios({
445
447
  method: 'DELETE',
446
- url: getUrl('deleteCart', cartId, {accountId: user.id}),
448
+ url: getUrl('deleteCart', cartId, {accountId: user.id, country}),
447
449
  headers: getHeaders(user.eid)
448
450
  });
449
451
  CartService.setCartProperties({id: '', version: -1});
@@ -5,7 +5,6 @@ import {RunConfigService, events, util, PersonalOfferStorageService, BrowserDete
5
5
  import {getCachedConfigField} from '@nuskin/configuration-sdk';
6
6
  import {UserService} from "@nuskin/ns-account";
7
7
  import PaymentAdapter from '../payment/PaymentAdapter';
8
- import pickupUtil from '../shipping/pickupUtil';
9
8
  import { storage } from "@nuskin/ns-util";
10
9
 
11
10
  let splitLineItems = [];
@@ -501,7 +500,7 @@ const populateCategory = (salesOrder) => {
501
500
  } else if (utmMedium && utmMedium.toLowerCase().includes('paidsearch')) {
502
501
  salesOrder.Category = 'PAIDSEARCH';
503
502
  } else if (utmMedium && utmMedium.toLowerCase().includes('paidsocial')) {
504
- salesOrder.Category = 'PAIDAD';
503
+ salesOrder.Category = 'PAIDAD';
505
504
  } else {
506
505
  salesOrder.Category = 'WEB';
507
506
  }
@@ -1141,7 +1140,7 @@ const toOrder = async (salesOrderDetail, adr, createResponse) => {
1141
1140
 
1142
1141
  const useShipMethodsApi = getCachedConfigField('useShipMethodsApi');
1143
1142
  if (useShipMethodsApi || salesOrderDetail.ShippingAvailableMethods && salesOrderDetail.ShippingAvailableMethods.length > 0) {
1144
- const shipMethods = useShipMethodsApi ? await pickupUtil.getShipMethods() : salesOrderDetail.ShippingAvailableMethods;
1143
+ const shipMethods = useShipMethodsApi ? await PickupUtil.getShipMethods() : salesOrderDetail.ShippingAvailableMethods;
1145
1144
  order.shippingAvailableMethods = sortShippingAvailableMethods(shipMethods);
1146
1145
  order.simulatedShippingMethod =
1147
1146
  order.shippingAvailableMethods.find(
@@ -1156,7 +1155,7 @@ const toOrder = async (salesOrderDetail, adr, createResponse) => {
1156
1155
  let oldPup = null;
1157
1156
  if (!useShipMethodsApi) oldPup = salesOrderDetail.Custom;
1158
1157
  let newPup = null;
1159
- if (useShipMethodsApi) newPup = await pickupUtil.getPickupPoints();
1158
+ if (useShipMethodsApi) newPup = await PickupUtil.getPickupPoints();
1160
1159
  setPickupPoints(oldPup, newPup, order);
1161
1160
  }
1162
1161
  }