Setting Order as Shipped does not set Order to a Complete status

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I'm wondering if there is a bug with completing an order.  From what it sounds like, when you mark an order as "Shipped", it is also supposed to set the order status as "Complete".

I am looking through the OrderManager.cs file at the 'Ship()' method.  This method updates the order with status 'ShippingStatusEnum.Shipped'.  Then it calls 'CheckOrderStatus(order.OrderId)' which in turn sets the order status/paid date.  In order to set the order as "Complete" it does a check against '!CanDeliver(order)'.  The problem I think is that the order status is "Shipped" here which returns true instead of false (like we want here).  So the order never actually gets set to "Complete".

Please check and see if this is a bug.
Thanks
13 years ago
What about delivery - all three conditions, shipped, paid and delivered have to be entered in Admin before it goes to complete ?
13 years ago
Yidna wrote:
What about delivery - all three conditions, shipped, paid and delivered have to be entered in Admin before it goes to complete ?


It seems like delivered was added in 1.7, and that the order is not going to complete unless we set it to delivered, however I think that's kind of confusing since we don't know when the order gets delivered, it's complete once it leaves our hands.

Can someone from the NOP team confirm how it's supposed to work.
13 years ago
It's by design. You should see "Set as delivered" button (admin area > order details page) after "Set as shipped" button is clicked. Click it, and your order will be completed.
11 years ago
Hi All,

I have been looking at this exact thing this afternoon.

I agree with the points in that once the order has been shipped it should change it's status to Complete.

You shouldn't have to click delivered to make it complete as you cannot monitor the delivery of every order unless you are willing to physically track every order you have dispatched throughout the days and check when someone has signed for it. That is very unrealistic.

Also connected to this is the Message template for sending to a customer once their item has been delivered, this is a little strange as the customer will know it's been delivered as they would have received it.

We have got version 2.8 so the latest and this is still the case it seems from the questions raised in 2008. Will something like this be changed in the next version so that once an item is shipped it's status goes to complete.

Thanks
11 years ago
oops not 2008 two years ago. :)
11 years ago
Unfortunately all my orders will have to remain as incomplete because I don't want to appear an idiot by clicking the "Order has been delivered" button and sending an e-mail to tell the client that their order has been delivered - of course they already know this!
Better logic would probably dictate having an "Order has NOT been delivered" button to click when the customer asks where is it and the courier doesn't know either!
11 years ago
This is how it works out of the box. If you want to change this behavior, you have to customize the solution.

1. Open \Libraries\Nop.Services\Orders\OrderProcessingService.cs file
2. Find "CheckOrderStatus" method
3. Replace
if (order.ShippingStatus == ShippingStatus.ShippingNotRequired || order.ShippingStatus == ShippingStatus.Delivered)

with
if (order.ShippingStatus == ShippingStatus.ShippingNotRequired || order.ShippingStatus == ShippingStatus.Shipped)
11 years ago
Or alternately, in OrderController.cs, change the "true" to "false" based on Deliver(Shipment shipment, bool notifyCustomer)


        public ActionResult SetAsDelivered(int id)
        {
            ...
                _orderProcessingService.Deliver(shipment, true);


(might this be a good place for a Setting ? :)


Having said that, though, consider that a follow-up email may get a customer buying from you again and again :)
11 years ago
I resolved this with an update trigger on the order table.  See my next post for details.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.