Contributions

Reports (Category Index)
Search: 

All Customers Report

All Customers Report v1.0 - March 22, 2005

written by Jared Call at client's suggestion
some code nicked and modified from /catalog/admin/customers.php
Released under the GNU General Public License


What this contrib does:
=========================

This contribution simply generates a list of all customers and their mailing addresses, alphabetized by last name (surname). Depending on several things, it may take several seconds to generate. The resulting data can be easily copied/pasted into spreadsheets for mailing list labels, importing into other customer management software, etc.

Disclaimer: This contrib has been designed for and tested with osCommerce 2.2 MS2. While it should easily work, perhaps with minor modifications, with other versions of osCommerce, it has not been tested as such.

If you find this contribution useful, please support the osCommerce project by becoming an osCommerce Community Sponsor. At the time of this writing, details of Community Sponsorship can be found at http://www.oscommerce.com/about/news,111 .

Expand All / Collapse All

SQL Query for MySQL 5 alexjudd 17 Jul 2007

We had some problems with the original JOINs in the query in MySQL 5 so below is an updated SQL statement to replace the one around line 117 which does the same, but works on all MySQL versions we tested.

Regards

$customers_query_raw = "SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_dob, c.customers_telephone, c.customers_gender, c.hear, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM " . TABLE_CUSTOMERS . " c LEFT JOIN " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id JOIN " . TABLE_COUNTRIES . " co ON a.entry_country_id = co.countries_id LEFT JOIN " . TABLE_ZONES . " z ON a.entry_zone_id = z.zone_id ORDER BY $db_orderby $sorted";

Version 2.1c fleetsoft 11 Mar 2007
2.1b - fixes to ver 2.1a fleetsoft 4 Mar 2007
More Bug Fixes graphinex 10 Jun 2006
SQL query jocg 15 Jan 2006
2.1a jcall 30 Dec 2005
File for the french version smalto 7 Sep 2005
French version n.mathon 8 Jul 2005
ACR V2.0 Robert Goth 24 Jun 2005
v1.1 Jared Call 26 Apr 2005
All Customers Report Jared Call 22 Mar 2005
All Customers Report Jared Call 22 Mar 2005

Note: Contributions are used at own risk.