From 70e73c4bbb797e79b98271f1911c6070d2e495a6 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 15 Nov 2008 16:55:17 +0000 Subject: [PATCH] implemented delete/merge customer git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@184 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- doc/prog_protocol.html | 11 ++++++ src/customer.cpp | 59 +++++++++++++++++++++++++++---- www/inc/classes/customer.php | 80 ++++++++++++++++++++++++++++++++++++++++++ www/inc/db/db_mysql.php | 2 +- www/machine.php | 8 ++++- 5 files changed, 151 insertions(+), 9 deletions(-) diff --git a/doc/prog_protocol.html b/doc/prog_protocol.html index 37051fa..e6c8803 100644 --- a/doc/prog_protocol.html +++ b/doc/prog_protocol.html @@ -432,6 +432,17 @@ The "mail" attribute is optional - it is only reported for customers that have a The setcustomer transaction is used to set details of the customer. The request contains a customer XML object as listed above, but without the mail attribute. The response is empty. +

Deleting and Merging Customers

+ +The deletecustomer transaction can be used to attempt to delete a customer from the database. It will fail if this customer still has any data (eg. orders) stored in the database. The request contains the ID of the customer to be deleted. The request may optionally contain a second customer ID separated from the first with a single space - if it does, the first customer is merged into the second one. The response is empty.

+ +If customers are merged, the following rules are executed: +