View Full Version : Inactive User

04-30-2011, 04:13 PM
A complaint about problems with the multi-customer deletion routines in this contribution (which I had never used since I always used the single customer delete) prompted me to take another look at this contribution. What I saw prompted a major rewrite.

Changes made:
*Bug fixed all places where posted variables had to be read so they could be used but they weren't read.
*Added a pulldown to determined how many months old the last login (or creation if there is no last login) must be before a customers account can be displayed or deleted. Accounts newer than this cannot be deleted even if the date range for a multi-delete gets set to a date that would otherwise include them.
*Added an entry that the the account creation date must be older than in order to delete orders with no logins. The old version could have deleted a brand new customer (hence no login date) that was in the middle of placing an order.
*Customers that have placed orders are now shown in the listing since customers that have not ordered in several years can hardly be called active.
*During either multiple delete you can now delete all customers that match the range, only those that have not placed orders, or only those that are not subscribed to newsletters.
*Deletion now exactly matches the routine used by customers.php. At least one step was missing in the previous versions.
*The pages to confirm deletion of multiple customers now list the customers that will be deleted under the confirm and cancel buttons so you can make sure you are deleting the right people. If deletion is confirmed the customers that are deleted will be listed as they are removed.

Updating from a prior version is as simple as replacing the two PHP files. You can also remove the functions added to htmloutput.php and general.php by previous versions of this contribution if you like since they are no longer used.

Full install with instructions is attached.

More... (http://addons.oscommerce.com/info/2048)