Zen Cart Logo
Forums / General Questions / Add a field into create account

Add a field into create account

Views: 51,600

Results 61 to 80 of 138
22 Jan 2009, 6:04 AM
#61
tharina avatar

tharina

New Zenner

Join Date:
Oct 2008
Posts:
49
Plugin Contributions:
0

Add a field into create account

has anyone got information how to add a dropdown list for references (where they heard about us) into the login section?

Tharina

22 Jan 2009, 10:03 PM
#62
johnfriend avatar

johnfriend

New Zenner

Join Date:
Dec 2008
Posts:
2
Plugin Contributions:
0

Re: Add a field into create account

I followed all the the suggested steps and all works, except when creating an account for the first time, a user receives this error when submitting their login info.

1062 Duplicate entry '2' for key 1
in:
[insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('2', '0', now())]

They still get an account, and everything saves to the database, but it doesnt transfer them to the confirmation page.

Any ideas how to fix this?

26 Jan 2009, 1:17 PM
#63
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Add a field into create account

Hi, after going over and over this I still can't seem to get it up and running. So I was wondering. If someone who has this Add field thing up and running on their site, could they post up for download the pages they updated to make it work with just one added field "With Comments like /* Add Additional Field Here */ ", so I and probably quite a few others can simply add as many fields to it as we like following the added code as a guide, and it would still work when uploaded to our sites.

Could this be a possibility.

Cheers
J#xx
(Scott Perry)

26 Jan 2009, 3:43 PM
#64
tharina avatar

tharina

New Zenner

Join Date:
Oct 2008
Posts:
49
Plugin Contributions:
0

Re: Add a field into create account

I added my old client database through phpadmin and now it shows this error messages above my customer panel in admin.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/evergree/public_html/shop/admin/customers.php on line 1155

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/evergree/public_html/shop/admin/customers.php on line 1157

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/evergree/public_html/shop/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /home/evergree/public_html/shop/admin/includes/classes/object_info.php on line 30

any ideas what I must do to fix it?

Tharina

5 Feb 2009, 12:12 PM
#65
alja avatar

alja

New Zenner

Join Date:
Oct 2006
Posts:
19
Plugin Contributions:
0

Re: Add a field into create account

Hi and thanks to those who share their knowledge...

Could some one help me out to include this taxid field in the order email and to print.

Thanks in advance.

12 Feb 2009, 10:36 PM
#66
ells avatar

ells

New Zenner

Join Date:
Nov 2008
Location:
Pacific Northwest
Posts:
24
Plugin Contributions:
0

Re: Add a field into create account

Thanks for sharing. I created a different type of field, but this thread gave me a good idea of what needed to be edited.

25 Feb 2009, 12:28 AM
#67
southpacific avatar

southpacific

New Zenner

Join Date:
Feb 2009
Location:
Sydney, Australia
Posts:
44
Plugin Contributions:
0

Re: Add a field into create account

Great post!

I'm sorry but this is probably a really stupid question.

How do I just echo the data from the customers table, without an editable field?

Thanks:blush:

26 Feb 2009, 1:19 PM
#68
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

Re: Add a field into create account

I have been right through all the instrcutions on this thread and still stumped. I am trying to add a field to allow customer to enter thier website address.
When I get to

  1. Now open file: includes/templates/YOURTEMPLATE/templates/tpl_modules_create_account.php

9a. Now search for the following code:

<?php if (ACCOUNT_FAX_NUMBER == 'true') { ?> <br class="clearBoth" /> <label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label> <?php echo zen_draw_input_field('fax', $account->fields['customers_fax'], 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?> <?php } ?>

I open the file and find the above section but it is slightly different to what I have. This is not in my file
$account->fields['customers_fax'],

So I tried entering

<br class="clearBoth" /> <label class="inputLabel" for="website"><?php echo ENTRY_WEBSITE_NUMBER; ?></label> <?php echo zen_draw_input_field('website', ' ','id="website"') . (zen_not_null(ENTRY_WESITE_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_WEBSITE_NUMBER_TEXT . '</span>': ''); ?> <?php } ?>

And if I make the changes as suggested then view the page /index.php?main_page=login The ID and Password fields are still there , but everything else has gone. :ohmy:

help, please :D

4 Mar 2009, 9:21 AM
#69
keenskin avatar

keenskin

New Zenner

Join Date:
Nov 2005
Posts:
49
Plugin Contributions:
0

Re: Add a field into create account

I followed the instruction below, everthing works fine EXCEPT
when I edit any of the newely added customer info from ADMIN panel,
then all the customer info is gone, except the one in zencart default customer field.

Do I miss something? Anybody have same problem as me. Please help!

thanks in advance,,

Tharina:

word doc did not upload sorry
I replaced taxid with cellphone, children, children_ages and occupation.

5 Mar 2009, 6:21 PM
#70
mnemos avatar

mnemos

New Zenner

Join Date:
Jan 2009
Posts:
8
Plugin Contributions:
0

Re: Add a field into create account

Works like a charm. Added 2 fields, they populate the database. How do I get them in to show up in invoice???

5 Mar 2009, 7:49 PM
#71
mnemos avatar

mnemos

New Zenner

Join Date:
Jan 2009
Posts:
8
Plugin Contributions:
0

Re: Add a field into create account

mnemos:

Works like a charm. Added 2 fields, they populate the database. How do I get them in to show up in invoice???
Can't edit ... Little snag also: while from the signup it all works, editing the new data from the admin area seems to get the data lost. Any ideas?

28 Mar 2009, 12:55 AM
#72
ivanc avatar

ivanc

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Add a field into create account

and no one bothers to answer the question about displaying the Tax ID in the invoice?

28 Mar 2009, 9:10 AM
#73
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Add a field into create account

Hi,
to display the taxid in the invoice either you can edit the ordering code so the taxid is included in the order information posted to the order table (would be better in future zen core) or you can get the taxid from customer table using the customer info from the order info as the reference.
I found the code for the second option by accident and I preferred it as it leaves the base code intact.

So, in admin/invoice.php add this query at line 28

$oID = zen_db_prepare_input($_GET['oID']);
//THESE LINES ADDED TO GET INFO FROM CUSTOMERS TABLE
$sql = "SELECT o.customers_id, c.customers_taxid from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c WHERE c.customers_id= o.customers_id and o.orders_id = '" . $oID . "'";
$chk_customers_taxid = $db->Execute($sql);
$customers_taxid = $chk_customers_taxid->fields['customers_taxid'];

so now you can use the $customers_taxid variable where you want, for example in one of the table cells

<?php echo ENTRY_TAXID_NUMBER; ?></b><?php echo ' ' . $customers_taxid; ?>

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

29 Mar 2009, 5:15 PM
#74
ivanc avatar

ivanc

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Add a field into create account

thank you very much steve/torvista, that worked :clap:

but there's one more problem - tax id is now 'always on'

for my purposes (and I presume many others) it would be ideal if taxid would show up in the invoice only when company name is displayed

I have managed to make zc display Tax ID line in create account only when company name is set to 'true' in admin-configuration-customer details

and it was simple: just added this to create_account.php

if (ACCOUNT_COMPANY == 'true') $taxid = zen_db_prepare_input($_POST['taxid']);

but I dont know how to do the same thing for the invoice

any ideas?

16 Apr 2009, 7:30 PM
#75
ivanc avatar

ivanc

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: Add a field into create account

bump...

16 Apr 2009, 8:48 PM
#76
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Add a field into create account

I posted this back in Sept, but not had any response. It's a huge pain for us, so I was really hoping someone had an idea.

I've got a bit of a weird problem. The field added very easily and the instructions were great.

However, I added my field right below the phone and fax numbers called "customsid". When a customer does not fill in his fax number (which is not required) but fills in this customsid, in admin it shows the customs id in the fax field. If he fills in the fax field, then it puts it in the correct place.

Any ideas what I did wrong? Either way I get the number, but I have to manually move it down to the customs id box from Admin and it's huge pain.

This is where it puts it in the admin when they don't fill out the fax number and we have to manually cut and paste it into the correct field.

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

16 Apr 2009, 9:19 PM
#77
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Add a field into create account

Hi I had a similar mix up problem, to fix it go into admin/tools/developers tool box, go to the bottom where it says "look up in all files" and type in "Your field Name", ie: customsid select all files catalogue/admin and you should get a long list of files with that name included, when it comes up carefully check all the lines of code with your fieldname in and make sure that customers_fax is not mixed up anywhere in your customsid lines of code and vise versa.

Good luck and hope you fix it !

Cheers
J#xx
(Scott Perry)

17 Apr 2009, 1:13 AM
#78
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Add a field into create account

Thank you so much Scott!! That worked. Really need to pay more attention when doing these things!!

Thanks, Colleen
www.af-company.com
To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

17 Apr 2009, 7:55 AM
#79
j_xx avatar

j_xx

New Zenner

Join Date:
Dec 2008
Location:
Uk
Posts:
79
Plugin Contributions:
0

Re: Add a field into create account

No problem !, glad it works !

Cheers
J#xx
(Scott Perry)

11 Dec 2009, 2:44 PM
#80
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Add a field into create account

I changed 'fax' to "company description" and moved it up the create account page

But it echo's in a one line text field, but I want it to echo in a multiline text area, or just eco as text in the admin customers information.

For the create account page, I just changed;

<?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>

to

<textarea name="fax" id="fax"></textarea>

and this send the information fine, but when it is viewed in the admin customers information, is shows in a small one line box

anyone know how to echo it in a multiline text area, or just echo in the customers information as text

 <tr>
<td class="main"><?php echo 'Tax ID:'; ?></td>
<td class="main">
<?php
if ($processed == true) {
echo $cInfo->customers_taxid . zen_draw_hidden_field('customers_taxid');
} else {
echo zen_draw_input_field('customers_taxid', $cInfo->customers_taxid, zen_set_field_length(TABLE_CUSTOMERS, 'customers_taxid', 15));
}
?>
</td>