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

Add a field into create account

Views: 51,595

Results 21 to 40 of 138
25 Oct 2007, 2:35 AM
#21
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Add a field into create account

I have followed the directions to a T from CraigW and tdtaylor (for the error trapping) and I can type whatever I want into my tax_id field and it will create the account without an error.

I have it set to be a required field, and it is supposed to be no less than 10 characters. So for example if I type 24-347 and try to submit the create new account form, it should trip an error but it does not.

I also tried to go back to an old mod called taxid_v1.0 and tried to get it to work in zc 1.3.7 (but the code has changed too much from 1.2.6 for this mod to work).

Can anyone please give any insight into why this isn't working. If you need an example of the web site, go to https://www.swansoninc.com

tia...

0be1

9 Dec 2007, 6:52 PM
#22
torvista avatar

torvista

Totally Zenned

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

Re: Add a field into create account

Hi,
excellent post, very useful.

I have followed the instructions in the first section to provide the extra field for the customer sign-up screen (not customer editing).

I have an error where the text "TAX ID" as defined in includes/languages/my_template/english.php
is not being displayed on the admin-customer-edit account page (which uses admin/customers.php).
Instead it shows ENTRY_TAXID_NUMBER next to the field. Functionally it works.
If I add the two DEFINE statements from english.php into customer.php it displays the text correctly.
The customised english.php is definitely in use as the correct TAX ID is shown on the customer login page.

I don't know enough about PHP and variables (yet) to know why one page can use this predefined text string but not another so any help would be much appreciated,

regards
Steve
ps using Zen Cart 1.38 on a local windows pc

19 Dec 2007, 9:37 PM
#23
prattski avatar

prattski

New Zenner

Join Date:
Nov 2007
Posts:
19
Plugin Contributions:
0

Re: Add a field into create account

I'm not quite sure what's going on on my end here. I've done everything listed in the tutorial on how to get this to work. And it works fine in the Admin section. However, on the customer create account page, I can't get the error checking to work. I leave all the fields blank and when I hit submit, it says nothing about my new field (called "Job Title").

Also, it doesn't do this in Firefox, but in Safari, if I click on the city field, or first name, or last name, the cursor then jumps to the Job Title textbox almost immediately. The only way I can get the cursor to stay on a different field is to tab through.

Any suggestions for either of these issues?

25 Dec 2007, 10:44 PM
#24
torvista avatar

torvista

Totally Zenned

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

Re: Add a field into create account

Hi,
I need some help regarding the customer editing their existing taxid as detailed above.

It appears to work, it accepts the change and there are no error messages but on returning back to the edit account page, the number has not changed. The edit does not get inserted into the table: it always shows the original number.
I can edit it through admin ok.

I am sure I have copied the changes correctly but can others verify the customer edit function works for them on 1.38a?

thanks
Steve

25 Dec 2007, 10:59 PM
#25
torvista avatar

torvista

Totally Zenned

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

Re: Add a field into create account

Dammit, missed the 7 minute timeout!

Anyway, before editing
\includes\modules\pages\account_edit\header_php.php

I had copied and renamed the original to
\includes\modules\pages\account_edit\header_php original.php

I thought that was the sensible thing to do.

I found that while the header_php original.php was still in the same directory the edit would not work despite no errors or problems showing up.

regards
Steve

17 Jan 2008, 8:27 PM
#26
velvetangels avatar

velvetangels

New Zenner

Join Date:
Sep 2007
Posts:
27
Plugin Contributions:
0

Re: Add a field into create account

xlr82quik:

11c. Now search for:

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

DO NOT ERASE THIS CODE SIMPLY GO DIRECTLY UNDER THIS CODE AND ADD IN THE FOLLOWING CODE:

<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>

I just wanted to give some insite that helped me.

I am using 1.3.8a and followed this to the letter and it worked perfect.
the only problem i had was what i quoted above.

If you turn the fax number off then it wont display this code because you are putting it in the if (ACCOUNT_FAX_NUMBER == 'true') {

if you put it above this after the last </tr> and add a </tr> at the end it will work perfect.

          <tr>
            <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
            <td class="main">
<?php
  if ($error == true) {
    if ($entry_telephone_error == true) {
      echo zen_draw_input_field('customers_telephone', $cInfo->customers_telephone, zen_set_field_length(TABLE_CUSTOMERS, 'customers_telephone', 15)) . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR;
    } else {
      echo $cInfo->customers_telephone . zen_draw_hidden_field('customers_telephone');
    }
  } else {
    echo zen_draw_input_field('customers_telephone', $cInfo->customers_telephone, zen_set_field_length(TABLE_CUSTOMERS, 'customers_telephone', 15), true);
  }
?></td>
          </tr>
          <!-- put the code below here to display it in customer edit page -->
      <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>
//add this so that it has the end of <tr>
</tr>
          
<?php
  if (ACCOUNT_FAX_NUMBER == 'true') {
25 May 2008, 10:46 AM
#27
tianxin avatar

tianxin

New Zenner

Join Date:
Sep 2005
Posts:
30
Plugin Contributions:
0

Re: Add a field into create account

hihi. if i want to add 2 fields, 1 with dropdown option.. how to do that?

1 with 3 dropdown options for school name ( abc university , def high school, ghi private school)
the 2nd will be student ID.. all numbers no hyphens allowed.

how to add the dropdown field ?
also the student ID, how to add the field + do an error check ? This field is same like the tax field you have added in the first page?

im quite a newbie. please help to give me as detailed instructions as possible. thanks!!

31 Jul 2008, 11:40 PM
#28
aatech avatar

aatech

New Zenner

Join Date:
Dec 2006
Posts:
87
Plugin Contributions:
0

Re: Add a field into create account

How Do We Make The Field we Added To Show up in the Invoice? anyone know?

15 Sep 2008, 6:14 PM
#29
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'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 and it's huge pain.

16 Sep 2008, 11:06 AM
#30
capanno avatar

capanno

New Zenner

Join Date:
Apr 2008
Location:
South Africa
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

Thanks for this thread its really helpful.

2 things,

1, how do I add checkboxes? I need a user to specify their preference in music genres.
2, and is it possible for a user to fill out these field after he created his or her account? (in the edit account field)

22 Sep 2008, 7:53 AM
#31
capanno avatar

capanno

New Zenner

Join Date:
Apr 2008
Location:
South Africa
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

Anyone? Im kinda rushed. Any help will be greatly appreciated.

22 Sep 2008, 6:08 PM
#32
margecc avatar

margecc

Zen Follower

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

Re: Add a field into create account

margecc:

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 and it's huge pain.

Any ideas?

26 Sep 2008, 2:24 AM
#33
flyteline avatar

flyteline

New Zenner

Join Date:
Sep 2008
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

I need some help. I followed all the instructions and it all works basicaly except on the sign up registration form the field I created does not show up?

The field does show up in the admin. panel for editing customers. The only place I am stuck at is on the signup form itself the field is not appearing? However the change on that form to say ADDITIONAL CONTACT is there. So that change was ok but the new filed on the form does not appear. This is the only place having problem so I must be doing something wrong. I checked everything and looks ok.

What is the exact spot to change to have it show on the registration form?

26 Sep 2008, 2:37 AM
#34
flyteline avatar

flyteline

New Zenner

Join Date:
Sep 2008
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

need some help. I followed all the instructions and it all works basicaly except on the sign up registration form the field I created does not show up?

The field does show up in the admin. panel for editing customers. The only place I am stuck at is on the signup form itself the field is not appearing? However the change on that form to say ADDITIONAL CONTACT is there. So that change was ok but the new filed on the form does not appear. This is the only place having problem so I must be doing something wrong. I checked everything and looks ok.

What is the exact spot to change to have it show on the registration form? :unsure:

9 Oct 2008, 2:56 PM
#35
capanno avatar

capanno

New Zenner

Join Date:
Apr 2008
Location:
South Africa
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

Bump again...

please!

21 Oct 2008, 1:05 PM
#36
capanno avatar

capanno

New Zenner

Join Date:
Apr 2008
Location:
South Africa
Posts:
25
Plugin Contributions:
0

Re: Add a field into create account

Bump! Anyone?

23 Nov 2008, 1:31 PM
#37
rottiejoe avatar

rottiejoe

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Add a field into create account

Hi,

I have tried to use this code in a new website which i am testing at the moment but when I adjust all of the code and I try a test account the new account is placed into the database and I can see and edit it in the Admin. My problem is when setting up the account it freezes after clicking on submit and just leaves a blank page and I have no idea why. I HAVE stuck to the directions as below and tried it several times but no joy. One question and I cannot see why it would cause this but I installed my test Zen cart using my CP Simple Scripts, does this cause any known issues such as this.

Hope someone has come across this and found a solution

Regards

Rottie:dontgetit

23 Nov 2008, 1:36 PM
#38
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add a field into create account

If the site works fine without the customization of adding new fields, then it would seem something you've done has broken it.

You might gain some insight about the blank-page problem by using the debug utility mentioned in step 2a of this FAQ: https://www.zen-cart.com/tutorials/index.php?article=82

23 Nov 2008, 4:13 PM
#39
rottiejoe avatar

rottiejoe

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Add a field into create account

Thanks Doc,

That helped a treat, and I may look like an old Dog but im only a pup at heart and have a lot to learn.

regards

Rottie

3 Dec 2008, 9:43 PM
#40
wilpackpackaging avatar

wilpackpackaging

New Zenner

Join Date:
Aug 2008
Location:
Rockford, IL
Posts:
60
Plugin Contributions:
1

Re: Add a field into create account

Help!!! I followed the instructions for placing the Taxid Field into the account setup page. Everything worked fine.

I followed the instructions for customer edit of Taxid Field and now I cannot access the admin page. All I get is a blank page. :frusty:

I tried re-uploading the files prior to the changes (my backup files) and still I cannot access the admin page. I tried re-uploading the changed files and I still cannot access the admin page.

The client side seems to be working fine. The Taxid field is there and as a client I can log in and change my tax id, however as the administrator I cannot view the admin login page. :frusty:

I tried the tutorials for troubleshooting blank pages and the Debug Error-Logging Utility and gleaned no useful information there.

I even tried the "Attempt to show errors on-screen." still the admin page is blank with no information showing where there should be information at the top. :frusty:

I am now at a loss as to what to do next.

My website is http://www.wilpackpackaging.com/catalog

My admin page is http://www.wilpackpackaging.com/catalog/admin

Please help!