Releases: dbltoe/email-address-exporter
Release list
v3.0.0 — rebuilt for Zen Cart v1.5.8 through v3.0.0
Rebuilt for current Zen Cart. Runs on v1.5.8 through v3.0.0 from a single codebase, on PHP 7.4 through 8.x — no version-specific downloads to choose between. Compatibility was verified against v1.5.8a, v2.0.0, v2.2.2 and the v3.0.0 development branch rather than assumed.
Added
- Filters, as an alternative to a saved Query Builder audience: country, state/zone and city; registration date range; purchase date range, order status, category (optionally including subcategories), and product ID. They combine with AND.
- Sixteen selectable export columns — name, contact details, full default address, newsletter flag, email format, account dates.
- JSON export, alongside CSV, TXT, XML and HTML.
- Consent filters, on by default — subscribers only, and excluding anyone whose email format is
NONE. - Counts of silently excluded customers. A date or location filter cannot match a customer whose registration date or default address was never recorded, so the page reports how many that affects instead of dropping them quietly.
- Optional digits-only telephone normalisation, and a UTF-8 BOM option for CSV so Excel stops mangling accented names.
- Two-column layout; nothing renders below 14px; all font sizes in relative units.
Fixed
Several had been wrong for a long time:
- Choosing CSV silently produced a TXT file — CSV was option id
0, which failed an!empty()test. - Company and telephone columns were always empty. The installer compared the seeded query with
===against uppercase SQL while Zen Cart seeds it lowercase, so its rewrite never ran and those fields never existed. - The "All Customers" audience never appeared — the page asked for category
newsletters, but that row is seeded underemail. - XML output was not well-formed and would not parse.
- CSV values were not quoted, so a comma or apostrophe corrupted the row. Now RFC 4180, with spreadsheet formula-injection protection.
- Free-text filters containing
&matched nothing. Zen Cart'sAdminRequestSanitizerhtml-encodes every POST value that is not a registered core parameter, on all supported carts. - A spurious error message on every page load.
- The export filename went into the
Content-Dispositionheader unsanitised.
Changed
- The installer no longer edits the shared
query_buildertable. That mutation never worked, was never reverted on uninstall, and affected the newsletter and gift-certificate modules too.
Installing
Upload the download's zc_plugins/ folder into your store root, merging it into the zc_plugins/ already there, so you end up with:
<your store root>/zc_plugins/EmailAddressExporter/v3.0.0/manifest.php
Then install from Modules → Plugin Manager. The page appears under Tools → Export Email Addresses.
If you end up with zc_plugins/zc_plugins/, it went one level too deep — move EmailAddressExporter up and delete the empty inner folder.
Credits
Created by DrByte, who also maintained it across many Zen Cart releases and converted it to the encapsulated plugin format. Later revisions by That Software Guy (swguy), Swifty8078 and Ooba_Scott. Builds on the audience and Query Builder functions in Zen Cart core.
Support thread: https://www.zen-cart.com/showthread.php/231172-Email-Address-Exporter
v2.0.0 is preserved on the 2.0.0 branch.