@nuskin/ns-shop 5.21.2 → 5.21.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
|
@@ -860,10 +860,15 @@ let setSelectedShipMethod = function(order, matchMethod = {}) {
|
|
|
860
860
|
}
|
|
861
861
|
};
|
|
862
862
|
|
|
863
|
-
|
|
863
|
+
/**
|
|
864
|
+
* Parses pickup points from SAP response, in case shipping method is set to pickup points!
|
|
865
|
+
* @param {Object[]} custom The Custom array on the salesorderrequest
|
|
866
|
+
* @param {Object} order
|
|
867
|
+
*/
|
|
864
868
|
function setPickupPoints(custom, order) {
|
|
869
|
+
const pupLocations = custom || [];
|
|
865
870
|
if (order.selectedShippingMethod && PickupUtil.supports(order.selectedShippingMethod.Code)) {
|
|
866
|
-
order.pickupPoints = PickupUtil.parse(
|
|
871
|
+
order.pickupPoints = PickupUtil.parse(pupLocations);
|
|
867
872
|
if (order.selectedPickupPoint) {
|
|
868
873
|
order.selectedPickupPoint = order.pickupPoints.find(pickupPoint => order.selectedPickupPoint.id === pickupPoint.id);
|
|
869
874
|
}
|