Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

Zen Cart Delete Spam Customers

Zen Cart Delete Spam Customers

The Delete Spam Customers plugin allows you to easily remove accounts added by bad guys.

Donate: This is free software. Show your appreciation by supporting my efforts. Donate

Relevance: Zen Cart™ 1.5.4 and above

Current Version: 1.2 (version history)

Support Thread: Delete Spam Customers Support Thread

Cost: Free, but donation appreciated

Installed Cost: $200.00 Buy Professional Installation by That Software Guy

Installation Difficulty: High - requires customization based on what's happening.

Installation Instructions: click here for installation instructions

Location: Zen Cart Plugins, under Admin Tools

Download: Delete Spam Customers in Zen Cart Plugins

FAQ: click here for FAQ

Related Mods: I also recommend the following mods if you are having issues with bogus accounts:

Overview:

Delete Spam Customers allows you to delete accounts that were added by bad guys. The query it uses by default is to remove accounts from Zimbabwe (the last entry in the countries list), but it can be modified to match whatever patterns the bad guys are using. In version 1.1 or higher, multiple queries can be performed to catch different patterns.

Installation Instructions:

  1. Back up everything! Try this in a test environment prior to installing it on a live shop.
  2. Copy the contents of the unzipped folder to the root directory of your shop.
  3. Run the delete_spam_customers.sql file against your database, using Admin > Tools > Install SQL Patches.
  4. Run Delete Spam Customers from under Admin > Customers.


Major Versions

  • 1.2 01/13/2022 - Don't remove customers with orders
  • 1.1 03/01/2021 - Permit multiple queries to be done
  • 1.0 06/11/2019 - First Release

FAQ

Q: I got hit with a block of spam signups and the customer IDs were 550 to 599. How do I delete those?
A: Add a new query in admin/delete_spam_customers.php as follows:
$queries[] = array(
   'name' => 'New Accounts',
   'string' => "SELECT customers_id FROM " . TABLE_CUSTOMERS . " WHERE customers_id BETWEEN 550 AND 599"
);


Q: I got hit with a block of spam signups and the company field for those customers is always "google". How do I delete those?
A: Add a new query in admin/delete_spam_customers.php as follows:
$queries[] = array(
   'name' => 'Fake Google accounts',
   'string' => "SELECT customers_id FROM " . TABLE_ADDRESS_BOOK . " WHERE entry_company = 'google'"
); 


Q: I got hit with a block of spam signups between 08/01/2019 and 08/30/2019. How do I delete those?
A: Add a new query in admin/delete_spam_customers.php as follows:
$queries[] = array(
   'name' => 'August Accounts',
   'string' => "SELECT customers_info_id as customers_id FROM " . TABLE_CUSTOMERS_INFO . " WHERE customers_info_date_account_created > '2018-08-01' AND customers_info_date_account_created ≤ '2018-08-30'"
); 


Q: My spam signups all use email addresses from @mail.ru. How do I delete those?
A: Add a new query in admin/delete_spam_customers.php as follows:
$queries[] = array(
   'name' => '.ru emails',
   'string' => "SELECT customers_id FROM " . TABLE_CUSTOMERS . " WHERE customers_email_address LIKE '%@mail.ru'"
 );


Q: I want to delete accounts with no orders that are over 30 days old. How do I do this?
A: Add a new query in admin/delete_spam_customers.php as follows:
// delete spam customers - account older than 30 days but no orders
$recent = date('Y-m-d', strtotime("-30 days"));
$queries[] = array(
 'name' => 'account older than 30 days but no orders',
 'string' => "SELECT customers_id FROM " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci WHERE c.customers_id = ci.customers_info_id AND customers_info_date_account_created <= '" . $recent . "' AND  NOT EXISTS (select orders_id FROM " . TABLE_ORDERS . " o WHERE o.customers_email_address = c.customers_email_address)"
);


Q: I want to remove accounts that haven't logged in for more than two years. Can I use delete spam customers, even though these weren't spammers?
A: Yes you can! Add a new query in admin/delete_spam_customers.php as follows:
$queries[] = array(
   'name' => 'No login for 2 years',
   'string' => "SELECT customers_info_id as customers_id FROM " . TABLE_CUSTOMERS_INFO . " WHERE customers_info_date_of_last_logon < '" . date('Y-m-d', strtotime("-2 years")) . "'"
);