Skip to content

Releases: dbltoe/admin_add_customer

v1.2.0

Choose a tag to compare

@dbltoe dbltoe released this 03 Aug 22:57

A bugfix release, fixing three real issues found while investigating two user reports. Recommended for everyone currently running v1.1.0 or v1.0.0.

Fixes

  • "Call to undefined function zen_config()"wholesaleEnabled() called core's zen_config() helper, which is only available since ZC v3.0.0. On any earlier version, this fataled outright. Reported by a user on v2.1.0/PHP 8.2.1. Replaced with a defined()/constant() check — the same fallback zen_config() itself uses internally — so behavior is now identical across the whole v2.0.0–v3.0.0 range, not just the versions where zen_config() happens to exist.

  • Plugin "won't install" / activation link broken, on v2.0.0/v2.1.0 specifically — a plugin's own root-level filenames.php is only auto-loaded by Zen Cart core starting at v2.2.0 (confirmed directly against core's own bootstrap source at the v2.0.0, v2.1.0, v2.2.0, v2.2.1, and v2.2.2 tags). On v2.0.0/v2.1.0, this meant FILENAME_ADD_CUSTOMERS, BOX_CUSTOMERS_ADD_CUSTOMERS, and TABLE_ADMIN_ADD_USER_TOKENS never got defined on the admin side — breaking the admin menu right after install — and FILENAME_ADMIN_ADD_USER_ACTIVATE never got defined on the storefront side, breaking the activation link in every welcome email. admin/includes/extra_datafiles/ and catalog/includes/extra_datafiles/, unlike root-level filenames.php, have been auto-loaded per-plugin since v2.0.0, so a small file now lives in each (simply requiring the original filenames.php), closing the gap on every version this plugin supports.

  • "Call to undefined function create_coupon_code()" on stores with the New Signup Gift Voucher setting on — found while auditing every other core function this plugin calls, prompted by the two fixes above. On any store with NEW_SIGNUP_GIFT_VOUCHER_AMOUNT configured, every single customer creation (single-entry or CSV) fataled outright — that function never existed under that name in Zen Cart core, on any version. Replaced with Coupon::generateRandomCouponCode(), core's own current replacement, @since exactly the v2.0.0 floor this plugin targets.

No database schema changes from v1.1.0.

See readme.html for full installation instructions and the complete version history.

v1.1.1

Choose a tag to compare

@dbltoe dbltoe released this 03 Aug 22:53

A bugfix release, fixing three real issues found while investigating two user reports. Recommended for everyone currently running v1.1.0 or v1.0.0.

Fixes

  • "Call to undefined function zen_config()"wholesaleEnabled() called core's zen_config() helper, which is only available since ZC v3.0.0. On any earlier version, this fataled outright. Reported by a user on v2.1.0/PHP 8.2.1. Replaced with a defined()/constant() check — the same fallback zen_config() itself uses internally — so behavior is now identical across the whole v2.0.0–v3.0.0 range, not just the versions where zen_config() happens to exist.

  • Plugin "won't install" / activation link broken, on v2.0.0/v2.1.0 specifically — a plugin's own root-level filenames.php is only auto-loaded by Zen Cart core starting at v2.2.0 (confirmed directly against core's own bootstrap source at the v2.0.0, v2.1.0, v2.2.0, v2.2.1, and v2.2.2 tags). On v2.0.0/v2.1.0, this meant FILENAME_ADD_CUSTOMERS, BOX_CUSTOMERS_ADD_CUSTOMERS, and TABLE_ADMIN_ADD_USER_TOKENS never got defined on the admin side — breaking the admin menu right after install — and FILENAME_ADMIN_ADD_USER_ACTIVATE never got defined on the storefront side, breaking the activation link in every welcome email. admin/includes/extra_datafiles/ and catalog/includes/extra_datafiles/, unlike root-level filenames.php, have been auto-loaded per-plugin since v2.0.0, so a small file now lives in each (simply requiring the original filenames.php), closing the gap on every version this plugin supports.

  • "Call to undefined function create_coupon_code()" on stores with the New Signup Gift Voucher setting on — found while auditing every other core function this plugin calls, prompted by the two fixes above. On any store with NEW_SIGNUP_GIFT_VOUCHER_AMOUNT configured, every single customer creation (single-entry or CSV) fataled outright — that function never existed under that name in Zen Cart core, on any version. Replaced with Coupon::generateRandomCouponCode(), core's own current replacement, @since exactly the v2.0.0 floor this plugin targets.

No database schema changes from v1.1.0.

See readme.html for full installation instructions and the complete version history.

v1.1.0

Choose a tag to compare

@dbltoe dbltoe released this 03 Aug 02:48

A docs, packaging, and admin-page polish release — no functional/database changes from v1.0.0.

Fixes

  • The welcome email's optional header-image URL had the plugin's version folder name hardcoded, which would have quietly broken the moment the folder was renamed for this release. Now derived from the actual on-disk folder name instead.
  • The new Read Me button (see below) would have 404'd on a live store — readme.html and its referenced screenshots/CSV guide now also ship inside zc_plugins/AdminAddUser/v1.1.0/, not just at the repository root.
  • Print Sign-Up Form (with Wholesale option) was overflowing past its own box on wide desktop screens. It and Print Sign-Up Form now each get a dedicated column width (35%/65%) so the longer label fits on one line.
  • The CSV-formatting help button in Bulk Upload (CSV) was squeezing the file field's own "no file chosen" text — moved to the bottom-left of the section.
  • The Bulk Upload file field no longer narrows to 50% width on desktop screens; stays at 75% from tablet up.
  • Field labels (.control-label) weren't reliably showing at core's own intended 1.2rem on this page — now explicitly set.
  • The "Reset the Customer's Password?" checkbox carried a form-control class meant for text inputs, rendering it oversized like a button. Removed.
  • Fixed a stale "encapsulated plugin" documentation link (Zen Cart moved the page).

Readability & layout

  • Section headings, field help text, field labels, and form fields (inputs/selects/textareas) all now render at a consistent, more readable 1.2rem, in rem instead of core's fixed pixel sizes — so they scale properly with a user's browser/OS text-size or zoom preference, especially on mobile/tablet.
  • Section headings gained a little breathing room (bottom margin) above the fields below them.
  • The page's main left/right split moved from Bootstrap's plain 33%/67% to a dedicated 40%/60%, giving the left column's fields (particularly the CSV file field) more room.
  • Download Blank CSV Template now sits on its own line above the two Print Sign-Up Form buttons, which sit side by side on wide screens and stack on mobile/tablet.

Plugin Manager / packaging

  • The Plugin Manager info box now shows Read Me and GitHub buttons, plus a plain Forum Support Thread link, matching the pattern established for Social Contact Footer.
  • Listed Author changed to "My Zen Cart Host (dbltoe)"; credit to lat9 for the original add_customers_from_admin foundation remains in the readme's introduction.
  • pluginId updated to this plugin's own new Zen Cart Plugins Library listing (2445), replacing a leftover reference to lat9's original listing.
  • Added a .gitattributes file forcing PDFs and images to always be treated as binary, preventing a possible silent corruption on a fresh clone (both sign-up-sheet PDFs use an uncompressed content stream that can fool git's text/binary detection).
  • Corrected the Installation section's description of what actually gets copied where.

See readme.html for full installation instructions and the complete version history.

v1.0.0

Choose a tag to compare

@dbltoe dbltoe released this 02 Aug 17:42

Initial release of Admin Add Customer, a Zen Cart encapsulated plugin for capturing customers with minimal friction — e.g. at a public event — and letting them complete their own registration later.

Based on lat9's original add_customers_from_admin mod, rewritten as a self-contained zc_plugins/ package compatible with Zen Cart v2.0.0 through the current v3.0.0-track master, and PHP 8.0 through 8.5.

Highlights

  • Minimal entry: only First Name, Last Name, and Email are required, one-by-one or via CSV bulk upload. Phone is optional; address is never collected up front.
  • Pending-activation flow: new customers start pending and are emailed an activation link. Clicking it fully activates the account and hands the customer off to your store's own standard login/account pages to fill in their address and anything else your configuration requires.
  • Optional Discount Pricing Group and Wholesale level assignment at entry, using core's own existing fields — no new Configuration page.
  • Delete Unclaimed Signups: clean up customers who registered but never completed their profile.
  • Optional welcome-email header banner image, matching core's own email styling.
  • Accessibility: WCAG A/AA pass on the admin page — proper heading structure, label/field associations, color contrast, and touch-target sizing.

See readme.html for full installation instructions and the complete version history.