Forums / Basic Configuration / page create account fields

page create account fields

Locked

Started by richard12345 on 29 Apr 2008, 1:25 PM · Views: 2,115

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
29 Apr 2008, 1:25 PM
#1
richard12345 avatar

richard12345

New Zenner

Join Date:
Feb 2008
Posts:
4
Plugin Contributions:
0

page create account fields

Hi there,

I have question about adding 2 field to create account page.
How can I do that? :blush:

I look here in forum and I didn't find anything what can help me I can modify files if some one can tell me what files I need to modify and what needs to by add it.

If this was already discus let me know where I will appreciate it.

PS: I really love zencart it is the best for working with and I did try all of them.

Thank You
Richard

29 Apr 2008, 1:38 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: page create account fields

Adding extra fields to the sign-up page is unfortunately quite a task. It not only requires modifications to the front end, but also to the database, admin, as well as any validation scripts. A lot can go wrong. I think it would be much easier to take a couple of existing fields which aren't being used and alter them to suit your needs. Taking this approach would significantly limit the amount of work required, and you might get away with only touching a few language files. If you still want to go ahead and add extra ones, I would suggest taking a look at the Additional Customers Fields mod. As you'll see, it comes with warnings.

29 Apr 2008, 1:50 PM
#3
richard12345 avatar

richard12345

New Zenner

Join Date:
Feb 2008
Posts:
4
Plugin Contributions:
0

Re: page create account fields

Thank you for the fast replay,

Ok I have only one field I am not using but that will do. The field is Date of Birth, but I need this field to be under Company Details, is there way to move it there?
And also the file I need to modify to switch date of birth to what I need is in language files?

Thank You
Richard

29 Apr 2008, 2:30 PM
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: page create account fields

First, you'll need to find..
includes/templates/template_default/templates/tpl_modules_create_account.php

Make a copy of it and put it into your custom template. Then in that file, find..

<?php
  if (ACCOUNT_DOB == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_DATE_OF_BIRTH; ?></legend>
<label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
  }
?>

Move the section of code above to a different part of the file, wherever you want it displayed.

Then find includes/languages/english.php and edit any relevant define statements. The Developer's Tool Kit should prove to be useful here. Don't forget to also overide this file.

You may find that you run into validation problems doing the above. Zen Cart might expect something in the form of a date to be entered. In that case, you would also need to modify some JavaScript.

There'll be some admin language files that will require some editing as well. Again, make use of the Developer's Tool Kit.