Re: Extra Fields for Customer Sign Up (Create Account) Page
I was curious so I downloaded and attempted to install. The plugin is a bit of a mess.
One reason it is failing is this -
Quote:
/var/www/html/zencart200/includes/languages/english/extra_definitions/extrafield_defines.php
Line #41 : if (EXTRAFIELD_REQUIRED == 'true') {
Line #47 : if (EXTRAFIELD_REQUIRED2 == 'true') {
Line #56 : if (EXTRAFIELD_REQUIRED3 == 'true') {
Line #64 : if (EXTRAFIELD_REQUIRED4 == 'true') {
The EXTRAFIELD_REQUIRED constants aren't defined anywhere - I'm guessing they were supposed to be set in admin but this plugin doesn't include this?
Adjusting this code to just assume always true might quickly sort this out - ie remove the if statements.
I don't know how you went about merging the files but the create_account file under modules needs a bit of a tweak compared to older versions.
So, short answer to your question is "no", unless there is someone else out there who is using this and has kept quiet.
Re: Extra Fields for Customer Sign Up (Create Account) Page
This was an out of the box ZC 2.0 install specifically to test on a fresh system.
I did not change anything just followed the instructions which over wrote the existing files.
Re: Extra Fields for Customer Sign Up (Create Account) Page
We are always looking for developers who would be willing to adopt orphaned plugins.
https://docs.zen-cart.com/dev/plugins/adoption/
It's a great way to help support the project.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
This was an out of the box ZC 2.0 install specifically to test on a fresh system.
I did not change anything just followed the instructions which over wrote the existing files.
That definitely won't work in 2.0.
How have you used the plugin in the past - did you use all four extra fields - was there a way to control which of the four extra fields you wanted?
The docs don't appear to mention this.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Forget my question, I can see what's supposed to be going on. Will take a proper look later.
Re: Extra Fields for Customer Sign Up (Create Account) Page
OK, I've updated the plugin and sent linuxguy2 a private link they can download from.
I look forward to hearing back about testing - I'll submit it after some feedback.
It's working for me anyway :)
Re: Extra Fields for Customer Sign Up (Create Account) Page
Great Job!!
NO Issues so far.
Tested with a ZC 2.0 out-of-the-box install and then with my customized ZC 2.0 install.
I'd say it's ready for primetime.
Tested with all 4 and only 1 & 4 Extra Fields
THANK YOU!!!
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
Great Job!!
NO Issues so far.
Tested with a ZC 2.0 out-of-the-box install and then with my customized ZC 2.0 install.
I'd say it's ready for primetime.
Tested with all 4 and only 1 & 4 Extra Fields
THANK YOU!!!
However,
I tried to get the extra fields to be included in the "Office Only" section of the Admins email and no joy.
Every thing looks OK and after 6 hours of debug I can't find the problem!
I modified "functions_email.php" and "lang.email_extras.php" just as I did with the older versons but no joy.
When I enable the "extrafield" it chokes on "submit".
With just "Company" enabled it doesn't choke but Company does not display in the admin email.
Code:
// LtoMod Add company, extrafield, street address, city, state, zip, extrafield2 and extrafield4
$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>';
foreach($moreinfo as $key => $val) {
$extra_info['TEXT'] .= $key . ": \t" . $val . "\n";
$extra_info['HTML'] .= '<tr><td class="extra-info-bold">' . $key . '</td><td>' . $val . '</td></tr>';
}
foreach ($moreinfo as $key => $val) {
$extra_info['TEXT'] .= zen_output_string_protected($key) . ": \t" . zen_output_string_protected($val) . "\n";
$extra_info['HTML'] .= '<tr><td class="extra-info-bold">' . zen_output_string_protected($key) . '</td><td>' . zen_output_string_protected($val) . '</td></tr>';
}
$extra_info['TEXT'] .= "\n\n";
$extra_info['HTML'] .= "</table>\n";
return $extra_info;
}
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
However,
I tried to get the extra fields to be included in the "Office Only" section of the Admins email and no joy.
Every thing looks OK and after 6 hours of debug I can't find the problem!
I modified "functions_email.php" and "lang.email_extras.php" just as I did with the older versons but no joy.
When I enable the "extrafield" it chokes on "submit".
With just "Company" enabled it doesn't choke but Company does not display in the admin email.
Do you have any logs you can share with us?
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
royaldave
Do you have any logs you can share with us?
Nothing in the logs. I think there may be a more basic issue here. Is it some setting in the configuration I'm missing?
I reviewed all the all the mods I did on the old version and especially create_account.php and functions_email.php and they look appropriate.
I'm going to do a fresh install without extrafields and see in the "Company' can be included in the "Office Only" Section
This is additional code I had in the old installation on the new install it creates the account but chokes before displaying the Welcome/Authorization screen.
Works on the old install.
PHP Code:
$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']);
// Worked on old installation $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);
LOGS
logmessage
Log reset by {xxxxser[1]}.
Accessed page [admin_activity.php]
Accessed page [index.php]
Accessed page [keepalive.php]
Accessed page [admin_activity.php]
Accessed page [admin_activity.php] with action=save. Review page_parameters and postdata for details.
Admin Activity Log accessed. Output format: CSV. Filter: all. (Download to browser)
Accessed page [index.php]
Accessed page [keepalive.php]
Accessed page [admin_activity.php]
Accessed page [admin_activity.php] with action=save. Review page_parameters and postdata for details.
Admin Activity Log accessed. Output format: CSV. Filter: all. (Download to browser)