Minimum Customer Account Information for Zen Cart 1.5.0 to 1.5.3

Version 1.4.2 by lat9

Current Support Thread at Zen Cart Forums: http://www.zen-cart.com/showthread.php?198921-Minimum-Customer-Account-Information-Support-Thread

Version History:


What it does

You've got a store that sells only virtual products, so none of your products require shipping information. None of the payment methods you accept require you to send the customer's full address prior to processing, so why make the customer enter their address information for your store?

This plugin reduces the information gathered during account creation to:

  1. Gender, if your admin's Configuration->Customer Details->Gender is set to true.
  2. First Name
  3. Last Name
  4. Country, if your admin's Configuration->Customer Details->Minimum Account: Include Country? is set to true, for v1.3.0 and later of this plugin.
  5. Forum Nick Name, if your admin's Configuration->My Store->Enable phpBB linkage? is set to true and the phpbb installation is properly configured.
  6. Telephone Number, if your admin's Configuration->Customer Details->Telephone Number is set to true.
  7. Fax Number, if your admin's Configuration->Customer Details->Fax Number is set to true.
  8. Company, if your admin's Configuration->Customer Details->Company is set to true.
  9. Date of Birth, if your admin's Configuration->Customer Details->Date of Birth is set to true.
  10. Email Address, with its matching Confirm Email Address.
  11. Password, with its matching Confirm Password.
  12. Newsletter subscription check-box and HTML/Text-only radio buttons

Since all products in the store are virtual, the checkout_shipping page is bypassed … reducing the number of steps in your store's checkout to two (checkout_payment and checkout_confirmation). The invoices generated by your store's admin contain no references to shipping addresses. There's no "Packing Slip" link on your admin's Customers->Orders page, since there's nothing to pack!

Starting with v1.3.0, you can require that the customer choose their host country as part of the account-creation process. A customer's country will default to your store's Configuration->Customer Details->Create Account Default Country ID if the country is not required. The country setting is needed for PHP versions 5.4 and later, since the absence of a valid entry_country_id field in your store's address_book table can result in the generation of many myDebug*.log files when a customer places an order!

Please note that the "Country" field, if enabled, does not show on any invoices generated by your store — it's only there to provide your store with a demographic.

Notes:

  1. This plugin has been tested and works with PayPal® Express Checkout. If you use another payment processor, you will need to verify its interactions with this plugin.
  2. The first time you sign into your Zen Cart admin after installing v1.3.0 or later, your address_book table will be modified to change any entry_country_id values of 0 to your store's "Create Account Default Country ID".

Installation

There are core-file overwrites in this plugin; you should always backup your cart’s database and files prior to making any changes.

  1. Verify that your products and shipping are set up properly in your database:
  2. Copy the files to your cart, after renaming the "YOUR_TEMPLATE" directories to match your custom template’s name and the "YOUR_ADMIN" directory to match your renamed admin folder; core file overwrites are identified like this:
    1. /email/email_template_checkout.html
    2. /includes/classes/class.phpbb.php
    3. /includes/functions/functions_customers.php
    4. /includes/languages/english/extra_definitions/YOUR_TEMPLATE/minacct.php
    5. /includes/languages/english/YOUR_TEMPLATE/account.php
    6. /includes/languages/english/YOUR_TEMPLATE/checkout_confirmation.php
    7. /includes/languages/english/YOUR_TEMPLATE/checkout_payment.php
    8. /includes/languages/english/YOUR_TEMPLATE/create_account_success.php
    9. /includes/languages/english/YOUR_TEMPLATE/login.php
    10. /includes/modules/pages/account_edit/header_php.php
    11. /includes/modules/pages/account_history_info/header_php_minacct.php
    12. /includes/modules/pages/checkout_confirmation/header_php_minacct.php
    13. /includes/modules/pages/checkout_payment/header_php_minacct.php
    14. /includes/modules/pages/login/on_load_main.js
    15. /includes/modules/YOUR_TEMPLATE/contact_info.php
    16. /includes/modules/YOUR_TEMPLATE/create_account.php
    17. /includes/templates/YOUR_TEMPLATE/css/stylesheet_contact_info.css
    18. /includes/templates/YOUR_TEMPLATE/images/icons/ci_accept.png
    19. /includes/templates/YOUR_TEMPLATE/images/icons/ci_delete.png
    20. /includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php
    21. /includes/templates/YOUR_TEMPLATE/templates/tpl_account_edit_default.php
    22. /includes/templates/YOUR_TEMPLATE/templates/tpl_account_history_info_default.php
    23. /includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php
    24. /includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.php
    25. /includes/templates/YOUR_TEMPLATE/templates/tpl_create_account_success_default.php
    26. /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_contact_info.php
    27. /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php
    28. /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_order_totals.php
    29. /YOUR_ADMIN/customers.php
    30. /YOUR_ADMIN/invoice.php
    31. /YOUR_ADMIN/orders.php
    32. /YOUR_ADMIN/includes/auto_loaders/config.minacct_init.php
    33. /YOUR_ADMIN/includes/init_includes/init_minacct.php
    34. /YOUR_ADMIN/includes/languages/english/invoice.php

Un-install

Replace the admin and catalog core files that were previously overwritten and then delete the new catalog files that were previously copied. The lines and/or sections that were modified (i.e. added, changed or deleted) are marked by comments using the tag minacct, so you can use your admin's Developers Tool Kit to search for those files.

Note: If your store uses the Zen Cart/phpBB linkage, you should review and incorporate the changes identified by this thread if you are uninstalling Minimum Customer Account Information.