@nuskin/ns-shop 7.1.1-pur-813.1 → 7.1.1-pur-813.3
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
|
@@ -153,12 +153,10 @@ const populateAttribution = (salesOrder) => {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
const populateShipping = (order, salesOrder) => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
code = method.Code;
|
|
161
|
-
}
|
|
156
|
+
const user = UserService.getUser();
|
|
157
|
+
const defaultCode = getCachedConfigField('defaultShipMethod');
|
|
158
|
+
const method = order.selectedShippingMethod;
|
|
159
|
+
const code = method ? method.Code : defaultCode;
|
|
162
160
|
|
|
163
161
|
//code = (util.countryCode === 'ZA') ? (order.selectedAddress.addressType == "home" ? "ZH" : "ST") : code;
|
|
164
162
|
|
|
@@ -1091,8 +1089,8 @@ const toOrder = async (salesOrderDetail, adr, createResponse) => {
|
|
|
1091
1089
|
order.shippingPayWithPoints = salesOrderDetail.Custom.map(item => item.Key).indexOf('ZZUSE_PTS') > -1;
|
|
1092
1090
|
}
|
|
1093
1091
|
|
|
1094
|
-
|
|
1095
|
-
|
|
1092
|
+
const useShipMethodsApi = getCachedConfigField('useShipMethodsApi');
|
|
1093
|
+
if (useShipMethodsApi || salesOrderDetail.ShippingAvailableMethods && salesOrderDetail.ShippingAvailableMethods.length > 0) {
|
|
1096
1094
|
const shipMethods = useShipMethodsApi ? await pickupUtil.getShipMethods() : salesOrderDetail.ShippingAvailableMethods;
|
|
1097
1095
|
order.shippingAvailableMethods = sortShippingAvailableMethods(shipMethods);
|
|
1098
1096
|
setShippingAvailableMethodsPickupInfo(order.shippingAvailableMethods);
|