Skip to content

Commit

Permalink
#5006 Fixed problem with the logic in CreateOrUpadeteShipping
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Sep 14, 2020
1 parent 655d47e commit f0d926d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -447,6 +447,8 @@ public void CreateOrUpadeteShipping(string orderNumber, string carrier, string s

decimal totalWeight = 0;

_shipmentService.InsertShipment(shipment);

foreach (var orderItem in _orderService.GetOrderItems(order.Id))
{
var product = _productService.GetProductById(orderItem.ProductId);
Expand All @@ -473,15 +475,16 @@ public void CreateOrUpadeteShipping(string orderNumber, string carrier, string s
{
OrderItemId = orderItem.Id,
Quantity = orderItem.Quantity,
WarehouseId = warehouseId
WarehouseId = warehouseId,
ShipmentId = shipment.Id
};

_shipmentService.InsertShipmentItem(shipmentItem);
}

shipment.TotalWeight = totalWeight;

_shipmentService.InsertShipment(shipment);
_shipmentService.UpdateShipment(shipment);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Nop.Plugin.Shipping.ShipStation/plugin.json
Expand Up @@ -2,7 +2,7 @@
"Group": "Shipping rate computation",
"FriendlyName": "ShipStation",
"SystemName": "Shipping.ShipStation",
"Version": "1.06",
"Version": "1.07",
"SupportedVersions": [ "4.40" ],
"Author": "nopCommerce team",
"DisplayOrder": 1,
Expand Down

0 comments on commit f0d926d

Please sign in to comment.