nopSolutions/nopCommerce · error · Exception
This shipment is not yet ready for pickup
Error message
This shipment is not yet ready for pickup
What it means
Thrown by OrderProcessingService.DeliverAsync for an in-store-pickup order when the shipment has not yet been marked ready for pickup (ReadyForPickupDateUtc is null). The condition (order.PickupInStore && !shipment.ReadyForPickupDateUtc.HasValue) enforces the pickup lifecycle: a pickup order must first be flagged ReadyForPickup before it can be marked Delivered (i.e., handed to the customer).
Source
Thrown at src/Libraries/Nop.Services/Orders/OrderProcessingService.cs:2326
}
/// <summary>
/// Marks a shipment as delivered
/// </summary>
/// <param name="shipment">Shipment</param>
/// <param name="notifyCustomer">True to notify customer</param>
/// <returns>A task that represents the asynchronous operation</returns>
public virtual async Task DeliverAsync(Shipment shipment, bool notifyCustomer)
{
ArgumentNullException.ThrowIfNull(shipment);
var order = await _orderService.GetOrderByIdAsync(shipment.OrderId) ?? throw new Exception("Order cannot be loaded");
if (!order.PickupInStore && !shipment.ShippedDateUtc.HasValue)
throw new Exception("This shipment is not shipped yet");
if (order.PickupInStore && !shipment.ReadyForPickupDateUtc.HasValue)
throw new Exception("This shipment is not yet ready for pickup");
if (shipment.DeliveryDateUtc.HasValue)
throw new Exception("This shipment is already delivered");
shipment.DeliveryDateUtc = DateTime.UtcNow;
await _shipmentService.UpdateShipmentAsync(shipment);
if (!await _orderService.HasItemsToAddToShipmentAsync(order) &&
!await _orderService.HasItemsToShipAsync(order) &&
!await _orderService.HasItemsToReadyForPickupAsync(order) &&
!await _orderService.HasItemsToDeliverAsync(order))
{
order.ShippingStatusId = (int)ShippingStatus.Delivered;
await _orderService.UpdateOrderAsync(order);
}
//add a note
await AddOrderNoteAsync(order, $"Shipment# {shipment.Id} has been delivered");
View on GitHub (pinned to 64bdf2ff08)
Solutions
- Call ReadyForPickupAsync first: if (order.PickupInStore && !shipment.ReadyForPickupDateUtc.HasValue) await _orderProcessingService.ReadyForPickupAsync(shipment, false);
- Before DeliverAsync, check shipment.ReadyForPickupDateUtc and prompt the user to mark the shipment ready first.
- In the UI, hide/require the ReadyForPickup step before enabling Deliver for pickup orders.
- Fix the integration to mark the shipment ready before or in the same flow as delivered.
Example fix
// before
await _orderProcessingService.DeliverAsync(shipment, true);
// after
if (order.PickupInStore && !shipment.ReadyForPickupDateUtc.HasValue)
await _orderProcessingService.ReadyForPickupAsync(shipment, false);
await _orderProcessingService.DeliverAsync(shipment, true); Defensive patterns
Strategy: validation
Validate before calling
var order = await _orderService.GetOrderByIdAsync(shipment.OrderId);
if (order is null) return;
if (order.PickupInStore && !shipment.ReadyForPickupDateUtc.HasValue)
{
// mark ready for pickup first
return;
}
await _orderProcessingService.DeliverAsync(shipment, true); Prevention
- Call ReadyForPickupAsync before DeliverAsync for in-store-pickup orders.
- Require the ReadyForPickup step in the UI before enabling Deliver.
- Integrations must mark ready before (or with) delivered.
When it happens
Trigger: Calling DeliverAsync on a PickupInStore shipment without first calling ReadyForPickupAsync. Happens when an admin marks the order 'delivered/picked up' directly, or a webhook reports pickup before the 'ready for pickup' step was recorded.
Common situations: Staff handing the goods to the customer and clicking 'Delivered' without first clicking 'Ready for pickup'; an integration that only consumes a 'picked up' event and skips the ready step.
Related errors
- This shipment is not shipped yet
- This shipment is already marked as 'ready for pickup'
- This shipment is already delivered
- Enter delivery date
- Recurring payment is not active
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/f6ae66ec60cff9bb.
Report an issue: GitHub.