Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
jackie.taferner
Ahh... sorry that must have been personalized to the name of their custom field. If you installed the module exactly as I built it, the custom field will be named "customers_extrafield"
So, I *think* this would be the correct code instead. Give it a shot and see what happens :)
Add this code at line 28:
Code:
$oID = zen_db_prepare_input($_GET['oID']);
//start extrafield
$sql = "SELECT o.customers_id, c.customers_extrafield from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c WHERE c.customers_id= o.customers_id and o.orders_id = '" . $oID . "'";
$chk_customers_extrafield = $db->Execute($sql);
$customers_extrafield = $chk_customers_extrafield->fields['customers_extrafield'];
//end extrafield
so now you can use the $customers_extrafield variable where you want, for example in one of the table cells:
Code:
<?php echo ENTRY_EXTRAFIELD; ?></b><?php echo ' ' . $customers_extrafield; ?>
I was hoping that someone might still be able to help me with a problem.
I am busy upgrading (my 4yo store) to ZC1.5.5 and this plugin would really make things so much easier.
Managed to install and everything is working fine. But I need the new fields to show up on my invoices.
Tried to implement the ideas as above in the invoice.php file.
However, on the invoice it only shows up 'ENTRY_EXTRAFIELD' (and not the text declared in the language file). Also, the field value (as entered by the customers) does not show up.
I am sure I am just missing something simple but, being only an amateur at this, I can't see the problem...
Any help, anyone?
Re: Extra Fields for Customer Sign Up (Create Account) Page
This module is in dire need of an update for ZC 1.5.6
Thanks for checking
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
This module is in dire need of an update for ZC 1.5.6
Thanks for checking
I uploaded ZC 1.5.6a tested in PHP 7.0 and 7.1 work in 1.55 too - If need some help just ask for
I use ONE extrafied in invoice (VAT NUMBER) - There are a SPANISH language file too in the updated file to use with IVA español
Enjoy
Re: Extra Fields for Customer Sign Up (Create Account) Page
PHP 7.x
ZC 1.5.6a green classic template
The update to 1.56 works GREAT! Thanks!!!
I have been using this plugin for several years now without issues.
However this year when I upgraded to 1.5.6a I am having issues adding the "extrafields" to the customer registration emails.
They are getting entered into the customer account and I am able to view and edit "Customer" information including the "extrafields" in the Admin interface. That tells me the information is getting into the database.
I entered the "extrafields" in email_functions.php as I did last time but the extrafields are not showing up in emails.
All the other customer information is showing up at the bottom of the admin "you have a new account" email like it's supposed to.
I would appreciate a bit of guidance.
Thanks
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
PHP 7.x
ZC 1.5.6a green classic template
The update to 1.56 works GREAT! Thanks!!!
I have been using this plugin for several years now without issues.
However this year when I upgraded to 1.5.6a I am having issues adding the "extrafields" to the customer registration emails.
They are getting entered into the customer account and I am able to view and edit "Customer" information including the "extrafields" in the Admin interface. That tells me the information is getting into the database.
I entered the "extrafields" in email_functions.php as I did last time but the extrafields are not showing up in emails.
All the other customer information is showing up at the bottom of the admin "you have a new account" email like it's supposed to.
I would appreciate a bit of guidance.
Thanks
I did this exact thing in ZC 1.5.1 and it worked like a charm.
In my curent installation of 1.5.6a the data is getting into the database AND into the customers account but NOT included in the email Admin receives when a new person registers.
In addition to installing the latest "Additional customer Fields" V 1.5.6 plugin I made these additions to
email_functions.php trying to get the "Company" name into the email but no joy.
I also tried inserting the "extrafield's" .
Code:
Around Line 600
// function email_collect_extra_info($from, $email_from, $login, $login_email, $login_phone='', $login_fax='', $moreinfo = array()) {
(Changed to)
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='', $moreinfo = array()) {
Around line 630
($login_phone !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_PHONE . '</td><td>' . $login_phone . '</td></tr>' : '') .
/////////////// Added Company Field //////////////////
($company !='' ? '<tr><td class="extra-info-bold">' . OFFICE_COMPANY . '</td><td>' . $company . '</td></tr>' : '') .
($login_fax !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_FAX . '</td><td>' . $login_fax . '</td></tr>' : '') .
Re: Extra Fields for Customer Sign Up (Create Account) Page
Quote:
Originally Posted by
linuxguy2
PHP 7.x
ZC 1.5.6a green classic template
The update to 1.56 works GREAT! Thanks!!!
I have been using this plugin for several years now without issues.
However this year when I upgraded to 1.5.6a I am having issues adding the "extrafields" to the customer registration emails.
They are getting entered into the customer account and I am able to view and edit "Customer" information including the "extrafields" in the Admin interface. That tells me the information is getting into the database.
I entered the "extrafields" in email_functions.php as I did last time but the extrafields are not showing up in emails.
All the other customer information is showing up at the bottom of the admin "you have a new account" email like it's supposed to.
I would appreciate a bit of guidance.
Thanks
Problem SOLVED
After many hours of toiling over a smoking keyboard the only logical conclusion was the "extra_info" array wasn't being created.
Hope this helps some other non-coder like myself in the future.
In includes/modules/your_template/create_account.php I hadn't added the necessary code to generate the "extra_info" array
Around line 440
ORIGINAL Code:
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']);
MODIFIE:Code:
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'], $company, $extrafield, $extrafield2, $street_address, $suburb, $city, $state, $postcode, $extrafield4);
Then of course this mod in /includes/functions/email_functions.php around line 590
ORIGINAL Code:
Code:
function email_collect_extra_info($from, $email_from, $login, $login_email, $login_phone='', $login_fax='', $moreinfo = array()) {
MODIFIED Code:
Code:
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='', $moreinfo = array()) {
AND modify/add: around line 610
Code:
$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>';
Re: Extra Fields for Customer Sign Up (Create Account) Page
Has anyone tried this with ZC 1.5.8 and more particularly PHP 8.2?
I see there are wholesale code changes with ZC1.5.8 so, I'm guessing, this plugin would need an update too. Anyone know what would be required?
Any guidance would be appreciated. Thanks.
1 Attachment(s)
Re: Extra Fields for Customer Sign Up (Create Account) Page
Has anyone tested Extra Fields for Customer Sign Up on ZC 2.0?
I have used Extra Fields many times in the past without issue. The last ZC version was 5.6. Today I installed Extra Fields for Customer Sign Up on ZC version 2.0
I tested on two different ZC installs (responsive_classic) template one of them was out of the box (NO MODS) and all I get is this.
Attachment 20611
Re: Extra Fields for Customer Sign Up (Create Account) Page
I'm guessing this is a partial blank screen with a debug log. Please post it.
1 Attachment(s)
Re: Extra Fields for Customer Sign Up (Create Account) Page
Turned on ALL logging options and nothing there. The first time an extra field entry is accessed it just stops displaying additional content. when viewing source in browser Nothing below the extra field in the page.
Do you know if this has been tested on ZC 2.0?
Attachment 20614