You can do it pretty easy through uCommerce API (Unless you have a uCommerce version older than 2.5.0.0).
The following code is untested:
var baskets = PurchaseOrder.Find(x => x.IsBasket && x.OrderStatus.Name == "Basket");
foreach (var basket in baskets)
{
basket.Delete();
}
I would also only delete baskets older than a specific date otherwise you risk deleting a basket where a customer is about to go through checkout (That would be unfortunately).
Is any way in UI or by request to clear old purchese orders with status basket?
Is any way in UI or by request to clear old purchese orders with status basket? I see them a lot in my db and perfomance is slow.
Hi slava,
You can do it pretty easy through uCommerce API (Unless you have a uCommerce version older than 2.5.0.0).
The following code is untested:
I would also only delete baskets older than a specific date otherwise you risk deleting a basket where a customer is about to go through checkout (That would be unfortunately).
Best regards Martin
is working on a reply...