Use this procedure to delete all of the orders of a specific customer.
Perform the following:
Use the following code sample:
var manager = OrdersManager.GetManager();
var customer = manager.GetCustomer(customerId);
var orders = manager.GetOrders().Where(o => o.Customer.Id == customer.Id);
var customerAddresses = manager.GetCustomerAddresses().Where(a => a.Parent.Id == customer.Id);
var customerStatistics = manager.GetCustomerStatistics().Where(s => s.Id == customer.StatisticId);
var moneysSpent = manager.GetCustomerMoneys().Where(m => m.Parent == customer);
As a result all orders made by a specific customer are deleted.
For more information on deleting a customer see: For developers: Delete customers
Back To Top