VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Kuubs on May 27, 2024, 16:09:00 PM

Title: Order deleted? deleteOldPendingOrder
Post by: Kuubs on May 27, 2024, 16:09:00 PM
Hello

I have an order that is deleted. I cannot see if this is done by the system or by a user. In the model I have found this function:

deleteOldPendingOrder

Is it possible that the system deleted this order? The user actually paid the order after, so it paid a deleted order. In the database I can see the order_items still and it shows "Order deleted" in the comments which corresponds with the remove method in the tables file.

I find it weird because a lot of times i have Pending orders in my order list, and then a Confirmed order by the same user. Why does the system removes some orders and not the others? What is the treshhold for this? I find it weird that it removes orders it should never do this?
Title: Re: Order deleted? deleteOldPendingOrder
Post by: Milbo on May 27, 2024, 16:38:45 PM
If a user does cancels the payment, there is an old pending order. First we just tried to use this order, but that created trouble, so this function should just delete this cancelled order.
It uses the orderId/ordernumber of the cart.
Title: Re: Order deleted? deleteOldPendingOrder
Post by: Kuubs on May 27, 2024, 17:06:56 PM
Quote from: Milbo on May 27, 2024, 16:38:45 PMIf a user does cancels the payment, there is an old pending order. First we just tried to use this order, but that created trouble, so this function should just delete this cancelled order.
It uses the orderId/ordernumber of the cart.

Okay but is it possible it deletes an order that is pending and after it then is paid? How is it possible that an order is paid and the system deletes the order?

Is it possible to disable this function? Or is it necessary ??

Or isn't it possible that an order that is pending and then paid, and is this order removed by an adminsitrator?
Title: Re: Order deleted? deleteOldPendingOrder
Post by: Milbo on May 27, 2024, 17:10:45 PM
use the hidden config reuseorders, just add reuseorders="" in the file
Title: Re: Order deleted? deleteOldPendingOrder
Post by: Kuubs on May 27, 2024, 17:14:01 PM
Quote from: Milbo on May 27, 2024, 17:10:45 PMuse the hidden config reuseorders, just add reuseorders="" in the file

Okay, so this will probably bring out a lot more Pending or Cancelled orders? is that the only thing that will happen?

And it probably is

reuseorders=0

instead of

reusorders=""