Orders disappear

Raderad
Från Okänd

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
Från Sweden
Medlem sedan maj 2013
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
Från Sweden
Medlem sedan juli 2013

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
Från Sweden
Medlem sedan maj 2013
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.
Raderad
Från Okänd

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
Från Sweden
Medlem sedan maj 2013
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;
Raderad
Från Okänd

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
Från Sweden
Medlem sedan maj 2013
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');.

Raderad
Från Okänd

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

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

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

Raderad
Från Okänd

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
Från Sweden
Medlem sedan maj 2013
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
Raderad
Från Okänd

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

Den här tråden har stängts på grund av lång inaktivitet. Det går inte att posta inlägg till den.
Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.