The incomplete order #XXXX was deleted automatically (custom

For articles specific to version 5.x
Post Reply
myshop
Posts: 51
Joined: Tue Jun 23, 2009 5:48 am
Location: NSW Australia
Contact:

The incomplete order #XXXX was deleted automatically (custom

Post by myshop »

I thought that 5.5.4 was supposed to show and keep incomplete orders?

Throughout the logs I find entries like this:

The incomplete order #XXXX was deleted automatically (customer began new checkout).

Sure enough, the order is completely missing from the all orders and incomplete orders sections. Can someone advise why its doing this when the system is supposed to keep incomplete orders?
grantg
Posts: 112
Joined: Thu Oct 08, 2009 11:01 am

Re: The incomplete order #XXXX was deleted automatically (custom

Post by grantg »

Incomplete orders are stored depending on the length of time you have set in the settings (one day, week, month, 3 months)

An Incomplete order is generated between the customer clicking 'Pay Now' and the end check-out page - ie. after confirming their order details, selecting shipping method, selecting payment method and then clicking the continue button to complete the payment stage - if the customer does not complete the payment successfully, an Incomplete order is generated.

This will be wiped from the system if the customer then goes back to the check-out (ie. yourdomain.com/checkout.php is reloaded).
Cupar Garden Centre: CS-Cart Professional 2.2.5 (Converted from ISC 6.0.14 Ultimate)
Online Garden Centre: ISC 6.0.14 Professional
myshop
Posts: 51
Joined: Tue Jun 23, 2009 5:48 am
Location: NSW Australia
Contact:

Re: The incomplete order #XXXX was deleted automatically (custom

Post by myshop »

Hi Grantg
This will be wiped from the system if the customer then goes back to the check-out (ie. yourdomain.com/checkout.php is reloaded).
Well that is crazy!

My client uses MIGS gateway and he can login to that system and view all attempts - There are dozends of failed attempts all with their own cart generated order numbers. These are simply missing from the cart database - they are not in ALL ORDERS or INCOMPLETE.

The whole idea of the system keeping incomplete orders is so that we can see them - But if it deletes the incomplete order when the customer goes to checkout.php then whats the point of keeping them in the first place?

Senario:

Customer adds products to the cart - proceeds to checkout, adds their details, attempts a credit card transaction - It fails.
At this point we should be able to see the incomplete order in the cart database.
They then go back and add more products to the cart - Proceed to the checkout again (which takes them to checkout.php)
The incomplete order is deleted (if what you say is correct)
The customer bows out all together.

We have now completely lost any record of the incomplete order?!!

Crazy.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Fix: Show "Deleted" orders that were abandoned

Post by Martin »

Quick fix to the "Deleted order" functionality in 6.1.1 (probably applies to newer versions too).

The orders are being saved in the database but not being shown in the "Deleted orders" view so you just need to make the following change:

Open: /admin/includes/classes/class.orders.php

Find:

Code: Select all

			// Otherwise, only fetch complete orders
			else {
				$queryWhere .= " AND ordstatus > 0";
			}
Replace with:

Code: Select all

			// Otherwise, only fetch complete orders
			else {
//MOD Show orders dropped when customer started new cart
				if(!$searchDeletedOrders) {
					$queryWhere .= " AND ordstatus > 0";
				}
				//$queryWhere .= " AND ordstatus > 0";
//MOD END
			}
... and you will then find you can see those orders that somehow got lost when the customer started a new checkout or similar... Obviously you need to make sure your settings don't just purge everything but this appears to work just fine...



EDIT:
Worth noting that I realised that it allows you to see ALL of the orders that supposedly had been deleted. Bit strange that Interspire never provided a function to purge these properly as I'm sure it must be clogging up some stores databases but in this instance, very useful data has been revealed! :)
Post Reply