@nuskin/ns-shop 7.1.0 → 7.1.1-pur-813.2

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.1.0",
3
+ "version": "7.1.1-pur-813.2",
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": {
@@ -57,7 +57,7 @@ let ProductService = function() {
57
57
  const url = UrlService.getSiteUrl() + "/content/products/" + tokenizedSku + "/" +
58
58
  options.language + ".service." + options.country + ".json";
59
59
  const response = await axios.get(url);
60
- retVal = createDataFromSkuSearch(response, options);
60
+ retVal = createDataFromSkuSearch(response.data, options);
61
61
  }
62
62
  } catch (err) {
63
63
  console.error("There was a problem retrieving product data", err);
@@ -1091,8 +1091,8 @@ const toOrder = async (salesOrderDetail, adr, createResponse) => {
1091
1091
  order.shippingPayWithPoints = salesOrderDetail.Custom.map(item => item.Key).indexOf('ZZUSE_PTS') > -1;
1092
1092
  }
1093
1093
 
1094
- if (salesOrderDetail.ShippingAvailableMethods && salesOrderDetail.ShippingAvailableMethods.length > 0) {
1095
- const useShipMethodsApi = getCachedConfigField('useShipMethodsApi');
1094
+ const useShipMethodsApi = getCachedConfigField('useShipMethodsApi');
1095
+ if (useShipMethodsApi || salesOrderDetail.ShippingAvailableMethods && salesOrderDetail.ShippingAvailableMethods.length > 0) {
1096
1096
  const shipMethods = useShipMethodsApi ? await pickupUtil.getShipMethods() : salesOrderDetail.ShippingAvailableMethods;
1097
1097
  order.shippingAvailableMethods = sortShippingAvailableMethods(shipMethods);
1098
1098
  setShippingAvailableMethodsPickupInfo(order.shippingAvailableMethods);