Hello,
I installed the module and sql statement, and all went well. Everything is in the admin, but I see no new fields in on the signup form. Also, there is no label for the STATE field. Anybody else have this problem? Thanks.
Hello,
I installed the module and sql statement, and all went well. Everything is in the admin, but I see no new fields in on the signup form. Also, there is no label for the STATE field. Anybody else have this problem? Thanks.
Check the "Customer Details" setup in your Admin under the Configuration menu.
Hi,
how can I add the extrafields to admin/invoice.php and to includes/modules/print_invoice.php?
Thanks for the help!![]()
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
Hi, I'm using Zen-cart 1.5.1 ver.
Can I use it or no?
Last edited by Park; 23 Jan 2014 at 02:32 AM.
ZC 1.5.1 and "Extra Fields for customer sign up" "EXFCSU"
This isn't exactly what you asked for but it may give you some ideas how to use EXFCSU for your purposes. I'm showing the core folders but you can apply this to your "Overrides" folders.
In addition to the standard installation of EXFCSU this is how I expanded the EXF(s) to collect additional information in the registration form " create_account.php " & then add that information to the EXTRA_INFO in the admin copy of the registration sign up emails.
In "includes\modules\create_account.php" around line 733
$extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax'], $company, $extrafield, $extrafield2, $street_address, $suburb, $city, $state, $postcode, $extrafield4);
=========================
In "includes\languages\emglish\email_extras.php" around line 20
define('OFFICE_USE','<strong>Office Use Only:</strong>');
define('OFFICE_LOGIN_NAME','<strong>Login Name:</strong>');
define('OFFICE_LOGIN_EMAIL','<strong>Email:</strong>');
// Add company, extrafield, street address, city, state, zip, & extrafield2 defines
define('OFFICE_COMPANY','<strong>Company Name:</strong>');
define('OFFICE_EXTRAFIELD','<strong>Tax ID#:</strong>');
define('OFFICE_STREET_ADDRESS','<strong>Street Address:</strong>');
define('OFFICE_STREET_ADDRESS_LINE2','<strong>Address Line 2:</strong>');
define('OFFICE_CITY','<strong>City:</strong>');
define('OFFICE_STATE','<strong>State:</strong>');
define('OFFICE_POSTCODE','<strong>Zip Code:</strong>');
define('OFFICE_EXTRAFIELD2','<strong>Current Customer:</strong>');
define('OFFICE_EXTRAFIELD4','<strong>My Store:</strong>');
====================
In "\includes\functions\functions_email.php" around line 508
I'm using HTML email but the same could be applied to TEXT emails.
* Function to build array of additional email content collected and sent on admin-copies of emails:
*
*/
function email_collect_extra_info($from, $email_from, $login, $login_email, $login_phone='', $login_fax='', $company='', $extrafield='', $extrafield2='', $street_address='', $suburb='', $city='', $state='', $postcode='', $extrafield4='') {
// get host_address from either session or one time for both email types to save server load
if (!$_SESSION['customers_host_address']) {
if (SESSION_IP_TO_HOST_ADDRESS == 'true') {
$email_host_address = @gethostbyaddr($_SERVER['REMOTE_ADDR']);
} else {
$email_host_address = OFFICE_IP_TO_HOST_ADDRESS;
}
} else {
$email_host_address = $_SESSION['customers_host_address'];
}
// generate footer details for "also-send-to" emails
$extra_info=array();
$extra_info['TEXT'] =
OFFICE_USE . "\t" . "\n" .
OFFICE_FROM . "\t" . $from . "\n" .
OFFICE_EMAIL. "\t" . $email_from . "\n" .
(trim($login) !='' ? OFFICE_LOGIN_NAME . "\t" . $login . "\n" : '') .
(trim($login_email) !='' ? OFFICE_LOGIN_EMAIL . "\t" . $login_email . "\n" : '') .
($login_phone !='' ? OFFICE_LOGIN_PHONE . "\t" . $login_phone . "\n" : '') .
($login_fax !='' ? OFFICE_LOGIN_FAX . "\t" . $login_fax . "\n" : '') .
OFFICE_IP_ADDRESS . "\t" . $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'] . "\n" .
OFFICE_HOST_ADDRESS . "\t" . $email_host_address . "\n" .
OFFICE_DATE_TIME . "\t" . date("D M j Y G:i:s T") . "\n\n";
// LtoMod Add company, extrafield, street address, city, state, zip, & extrafield2
$extra_info['HTML'] = '<table width="100%" class="extra-info">' .
'<tr><td class="extra-info-bold" colspan="2">' . OFFICE_USE . '</td></tr>' .
'<tr><td width="20%" class="extra-info-bold">' . OFFICE_FROM . '</td><td>' . $from . '</td></tr>' .
//'<tr><td class="extra-info-bold">' . OFFICE_EMAIL. '</td><td>' . $email_from . '</td></tr>' .
($login_email !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_EMAIL . '</td><td>' . $login_email . '</td></tr>' : '') .
($login !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_NAME . '</td><td>' . $login . '</td></tr>' : '') .
($company != '' ? '<tr><td class="extra-info-bold">' . OFFICE_COMPANY . '</td><td>' . $company . '</td></tr>' : '') .
($extrafield != '' ? '<tr><td class="extra-info-bold">' . OFFICE_EXTRAFIELD . '</td><td>' . $extrafield . '</td></tr>' : '') .
($street_address != '' ? '<tr><td class="extra-info-bold">' . OFFICE_STREET_ADDRESS . '</td><td>' . $street_address . '</td></tr>' : '') .
($suburb != '' ? '<tr><td class="extra-info-bold">' . OFFICE_STREET_ADDRESS_LINE2 . '</td><td>' . $suburb . '</td></tr>' : '') .
($city != '' ?'<tr><td class="extra-info-bold">' . OFFICE_CITY . '</td><td>' . $city . '</td></tr>' : '') .
($state != '' ? '<tr><td class="extra-info-bold">' . OFFICE_STATE . '</td><td>' . $state . '</td></tr>' : '') .
($postcode != '' ? '<tr><td class="extra-info-bold">' . OFFICE_POSTCODE . '</td><td>' . $postcode . '</td></tr>' : '') .
($login_phone !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_PHONE . '</td><td>' . $login_phone . '</td></tr>' : '') .
($login_fax !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_FAX . '</td><td>' . $login_fax . '</td></tr>' : '') .
($extrafield2 != '' ? '<tr><td width="20%" class="extra-info-bold">' . OFFICE_EXTRAFIELD2 . '</td><td>' . $extrafield2 . '</td></tr>' : '') .
($extrafield4 != '' ? '<tr><td class="extra-info-bold">' . OFFICE_EXTRAFIELD4 . '</td><td>' . $extrafield4 . '</td></tr>' : '') .
'<tr><td class="extra-info-bold">' . " " . '</td><td>' . " " . '</td></tr>' .
'<tr><td class="extra-info-bold">' . OFFICE_IP_ADDRESS . '</td><td>' . $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'] . '</td></tr>' .
'<tr><td class="extra-info-bold">' . OFFICE_HOST_ADDRESS . '</td><td>' . $email_host_address . '</td></tr>' .
'<tr><td class="extra-info-bold">' . OFFICE_DATE_TIME . '</td><td>' . date('D M j Y G:i:s T') . '</td></tr>' . '</table>';
return $extra_info;
}
I installed your add on, but the extra fields are not showing up on the create account page or in the customer's "My Account" page. They do, however, show up in the Admin > Configuration > Customer Details section as "Display Extra Field #1", etc.
I tried to follow instructions carefully, but apparently missed something. Any help would be appreciated. I'm using version 1.3.9. Thank you in advance.
Last edited by johninreno; 27 Mar 2014 at 06:21 PM.
@johninreno, sounds like you may have missed one of the installation steps.
Did you:
2. Change the name of /YOUR_TEMPLATE/ folders to the name of your template folder
3. Open the 2 language files and define the names of your new field(s):
/includes/languages/english/extra_definitions/extrafield_defines.php
/admin/includes/languages/english/customers.php
4. Upload all contents to your main Zen Cart store directory
Using Zen Cart Version 1.5.1 Does this plugin work for this version? Also, which customer database(s) are the four new fields being added to?
Bookmarks