Orders disappear

Kustutatud
Alates Tundmatu

Hi,
I have a problem with orders.
Sometimes what happens is that orders disappear. Today I had one order on standby and triedn to create another one. When I have created the second one, the first one has disappeared. This is happening to all users, but not always. Has anyone reported that error, and is there a known solution to the problem?

Thank you,
Nejc

tim
Founder
Alates Sweden
Liige alates
tim

I have never heard of this before. What does you MySQL table lc_orders say?

Could it be that you give them an order status with the property to be archived?

LiteCart Fan
Alates Sweden
Liige alates

I did get this long time ago, and the problem was that I did not have correct order status in the payment modul.
But it was on all orders whit same payment.

tim
Founder
Alates Sweden
Liige alates
tim

It's important to distingiush what is a disappeared order, and what is an actual order but with a missing order status id (marked unprocessed).

For unprocessed orders the usual problem is:

  1. Forgot to set order status in the payment module
  2. The visitor failed to get routed back to the store from the payment window. Whereby verifying fails and order remains marked Unprocessed.
Kustutatud
Alates Tundmatu

It was not that. Let's say I created an order. It was marked On standby, and I created another order. Sometimes it happened that the first one got deleted somehow. it wasn't even present in database.

tim
Founder
Alates Sweden
Liige alates
tim

The session can only carry one order at a time. If your order did not check out successfully and you created a new, most likely it has been overwritten with the new data.

See pages/ajax/checkout_summary.inc.php

// Overwrite incompleted order in session
  if (!empty($order->data) && $order->data['customer']['id'] == customer::$data['id'] && empty($order->data['order_status_id'])) {
    $resume_id = $order->data['id'];
    $order = new ctrl_order('import_session');
    $order->data['id'] = $resume_id;
Kustutatud
Alates Tundmatu

So let's say this.
I create an order for 1 customer and Sumbit it. I leave this order status unchanged.
If then I create another order, before the first order has one of the statuses selected, it will oveerride previus one?

Is there a way aroudn this?
Thanks! :)

tim
Founder
Alates Sweden
Liige alates
tim

There is a way around this to always create a new order. Simply remove the all lines but $order = new ctrl_order('import_session');.

Kustutatud
Alates Tundmatu

Would it help is order (when created) would automaticly be assigned status let's say "In progress"?

tim
Founder
Alates Sweden
Liige alates
tim

Yes, that is what the system expects and is constructed for.

Kustutatud
Alates Tundmatu

Wouldn't then be better that system would automaticly assign a status to order? What if someone wants to  make 2 seperate orders, one right after another?

tim
Founder
Alates Sweden
Liige alates
tim

LiteCart doesn't set status as there is no obvious status to set and statues that comes out of the box can have been removed or renamed. A purchase can trigger pending, processing, aborted, what so ever. It is expected that you have a payment module and that returns an order status. In your case, a simple credit module. Otherwise you could squeeze in the following row in pages/order_process.inc.php before order is saved:

if (empty($order->data['order_status_id'])) $order->data['order_status_id'] = X; // Where X is the desired order status ID
Kustutatud
Alates Tundmatu

That was the problem, I was not using any of the payment modules. My bad, thanks for help.

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.