Re: Extra Fields for Customer Sign Up (Create Account) Page
I'm guessing that in the old installation, you edited includes/functions/functions_email.php and changed function email_collect_extra_info() to account for these extra arguments.
Rather than do that, it would be better for you to populate the moreinfo array with this data.
add , $moreinfo as the last call to email_collect_extra_info in includes/modules/YOUR_TEMPLATE/create_account, i.e.
$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'], $moreinfo);
then right before this line:
$moreinfo = [];
if (EXTRAFIELD_REQUIRED == 'true') {
$moreinfo[ENTRY_EXTRAFIELD] = $extrafield;
}
if (EXTRAFIELD_REQUIRED2 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD2] = $extrafield2;
}
if (EXTRAFIELD_REQUIRED3 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD3] = $extrafield3;
}
if (EXTRAFIELD_REQUIRED4 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD4] = $extrafield4;
}
Note to @royaldave - we need a notifier here too so this can be done without changing this core file.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
swguy
I'm guessing that in the old installation, you edited includes/functions/functions_email.php and changed function email_collect_extra_info() to account for these extra arguments.
Rather than do that, it would be better for you to populate the moreinfo array with this data.
add , $moreinfo as the last call to email_collect_extra_info in includes/modules/YOUR_TEMPLATE/create_account, i.e.
$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'], $moreinfo);
then right before this line:
$moreinfo = [];
if (EXTRAFIELD_REQUIRED == 'true') {
$moreinfo[ENTRY_EXTRAFIELD] = $extrafield;
}
if (EXTRAFIELD_REQUIRED2 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD2] = $extrafield2;
}
if (EXTRAFIELD_REQUIRED3 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD3] = $extrafield3;
}
if (EXTRAFIELD_REQUIRED4 == 'true') {
$moreinfo[ENTRY_EXTRAFIELD4] = $extrafield4;
}
Note to @royaldave - we need a notifier here too so this can be done without changing this core file.
Well, you made that look easy... Thank You Both!!
Yes in the old installations I did modify the files you referenced.
I implemented the changes you recommended and it did pull the extrafields into the Office Only section of the Admin email.
So I should be good to go.
I plan to add the company name and address.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
Well, you made that look easy... Thank You Both!!
Yes in the old installations I did modify the files you referenced.
I implemented the changes you recommended and it did pull the extrafields into the Office Only section of the Admin email.
So I should be good to go.
I plan to add the company name and address.
One more time,
Need a way to include the Company Name, Address Line 2, City and Zip Code to the "Office Only" section of the Sign Up form email.
Because this is information is already collected on the sign up form why not have a way to add it to the email?
I am already using the other 4 "Extra Fields for Customer Sign Up (Create Account) Page" fields to collect other data.
Rather than Hacking the core code I'd appreciate some guidance.
Thanks
Re: Extra Fields for Customer Sign Up (Create Account) Page
I have suggested that RoyalDave look into using the Observer Notifier feature in Zen Cart to build this plugin without needing to modify core code at all. If and when he does that, you'll be able to tag on to his work.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
swguy
I have suggested that RoyalDave look into using the Observer Notifier feature in Zen Cart to build this plugin without needing to modify core code at all. If and when he does that, you'll be able to tag on to his work.
Thanks!
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
Thanks!
V2.4 is now available as mentioned.
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
royaldave
V2.4 is now available as mentioned.
Thanks!
I'll check it out in the AM