Zen Cart Logo
Forums / All Other Contributions/Addons / Extra Fields for Customer Sign Up (Create Account) Page

Extra Fields for Customer Sign Up (Create Account) Page

Views: 264,912

Results 21 to 40 of 198
4 Feb 2011, 12:06 AM
#21
cyndi avatar

cyndi

New Zenner

Join Date:
Jan 2011
Location:
US
Posts:
37
Plugin Contributions:
0

Extra Fields for Customer Sign Up (Create Account) Page

Awesome, that worked. THANK YOU THANK YOU....

4 Feb 2011, 1:21 AM
#22
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

You're welcome!

12 Feb 2011, 11:30 AM
#23
bookwise avatar

bookwise

New Zenner

Join Date:
Jun 2008
Posts:
23
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Hi Jackie

I have just installed the module on v1.3.9g store and it is working fine. My question is though how can I change this field to a yes / no field. I need a question like rural delivery - yes/no as my extra field.

Do I just need to change the field in the database or will it require other changes too. Thanks:unsure::unsure::unsure:

12 Feb 2011, 4:31 PM
#24
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

You will need to edit /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php

Just find this code:

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

And replace with this:

<?php echo zen_draw_radio_field('extrafield', 'yes', '', 'id="extrafield-yes"') . '<label class="radioButtonLabel" for="extrafield-yes">Yes</label>' . zen_draw_radio_field('extrafield', 'no', '', 'id="extrafield-no"') . '<label class="radioButtonLabel" for="extrafield-no">No</label>' . (zen_not_null(ENTRY_EXTRAFIELD_TEXT) ? '<span class="alert">' . ENTRY_EXTRAFIELD_TEXT . '</span>': ''); ?>

I did not test it, but I think it should work.

You can do a similar edit in the tpl_account_edit_default.php file, so your customers see the same radio button on their My Account page.

13 Feb 2011, 10:11 AM
#25
bookwise avatar

bookwise

New Zenner

Join Date:
Jun 2008
Posts:
23
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Hi Jackie

Got the radio buttons showing up at sign up and on the account edit screen thank you. Unfortunately the buttons don't retain the setting. When I go into the account after creating a new one the radio buttons are there but neither are turned on.

Also I am not sure of what exactly I put in the phpmyadmin to change the customers table. I know I need to change the customers_extrafield but not sure what to replace it with. I have limited knowledge of mysql and I couldn't find the answer on the internet

thanks for your time

14 Feb 2011, 4:24 PM
#26
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

Your best bet will be to compare the salutation or gender button on the Account Signup page. If you use the same technique, you should be abel to get the same results with the Yes/No button.

16 Feb 2011, 12:06 AM
#27
ofincorp avatar

ofincorp

New Zenner

Join Date:
Mar 2009
Posts:
1
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Is there a way to make the field a non required field? I noticed it shows up as a required field and I'm using the field so Affilliates can enter their registration number to qualify for a group discount. All of the customers are not affilliate members so if they're not I'd like them not to have to put something in this field. Thanks in advance!

EDIT---
Never mind! I found it in the extrafield_defines.php file!

16 Feb 2011, 12:11 AM
#28
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

You can make the field required or turn it on/off in Admin > Configuration > Customer Details

16 Feb 2011, 5:32 AM
#29
jordan_jed avatar

jordan_jed

New Zenner

Join Date:
Mar 2010
Location:
New York
Posts:
10
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Hi. I am using 1.3.9h and am trying to install the Extra fields. It doesn't seem to be working. I believe that I followed the instructions properly but nothing is showing up. One thing that I noticed is that I have a mandatory field below the "country" field with a blank heading. This should probably be the "state" field. Could this mod have caused this? I can see this causing problems when someone tries to sign up. Please help.

My site is https://www.longfellowscoffee.com.

16 Feb 2011, 4:56 PM
#30
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

Please try installation again, make sure you do ALL the steps!

================= INSTALLATION =====================

  1. BACKUP BACKUP BACKUP. (cant say it enough :)

  2. Change the name of /YOUR_TEMPLATE/ folders to the name of your template folder (see above for list of files)

  3. Open the 2 language files and define the names of your new field:
    /includes/languages/english/extra_definitions/extrafield_defines.php
    /admin/includes/languages/english/customers.php

  4. Upload all contents to your main Zen Cart store directory

  5. Go to Admin > Tools > Install SQL Patches, and paste the content of the install.sql file

27 Feb 2011, 6:48 AM
#31
chepnut avatar

chepnut

New Zenner

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

Re: Extra Fields for Customer Sign Up (Create Account) Page

Thanks for making this add on, I am able to make it work. But I have a question, I am trying to add more fields and can get them all set up except when I fill out the form, I get errors saying I need the required info. I think it may be the install file but I am not sure, the tables are in the database. All I did to the install file is change the info. here are the changes, and what the fields look like before and after I submit the form.

ALTER TABLE customers ADD customers_ca_id varchar(32) NOT NULL AFTER customers_fax;



INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display CA ID', 'DISPLAY_CA_ID', 'true', 'Display "ca id" on account creation page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());


INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require ca id', 'CA_ID_REQUIRED', 'true', 'Require the Extra Field in account creation', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());

and the next one I installed

ALTER TABLE customers ADD customers_dr_rec varchar(32) NOT NULL AFTER customers_ca_id;



INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display DR REC', 'DISPLAY_DR_REC', 'true', 'Display "dr rec" on account creation page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());


INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require dr rec', 'DR_REC_REQUIRED', 'true', 'Require the Extra Field in account creation', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
4 Mar 2011, 2:48 AM
#32
chepnut avatar

chepnut

New Zenner

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

Re: Extra Fields for Customer Sign Up (Create Account) Page

bumpity, bump, bump :blush:

26 Mar 2011, 11:41 PM
#33
shellbell_19 avatar

shellbell_19

New Zenner

Join Date:
Jul 2009
Posts:
34
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

This worked perfect for me - Thanks!!

Just wanting to know how to move the 'extra field' out of the 'more contact details' area and place it under the 'Company Name' ?

Im using the extra field for an ABN Number: and would rather it went under the Company Name.

Any suggestions would be great!!

28 Mar 2011, 3:47 PM
#34
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

shellbell, to move the field open this file:

includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php

and move this code to the section you want the field in:

<!-- start extrafield -->
<?php
  if (DISPLAY_EXTRAFIELD == 'true') {
?>
<br class="clearBoth" />
<label class="inputLabel" for="extrafield"><?php echo ENTRY_EXTRAFIELD; ?></label>
<?php echo zen_draw_input_field('extrafield', '', 'id="extrafield"') . (zen_not_null(ENTRY_EXTRAFIELD_TEXT) ? '<span class="alert">' . ENTRY_EXTRAFIELD_TEXT . '</span>': ''); ?>
<?php
  }
?>
<!-- end extrafield -->
28 Mar 2011, 7:15 PM
#35
shellbell_19 avatar

shellbell_19

New Zenner

Join Date:
Jul 2009
Posts:
34
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Perrrrfect Miss Jackie!!
Thank you so very much for your contribution, time and help!
Much appreciated
Shell xx

28 Mar 2011, 8:05 PM
#36
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

you're welcome shellbell!

chepnut, sorry i missed your post until now. Maybe it's too late, but I'll try to post a solution anyhow.

Check to see that you've got the new field in Admin > Configuration > Customer Details. Also, make sure your new field is added in all the appropriate files. Open the files and find everywhere it says "extrafield" - using extrafield as a guideline, copy and paste then change the variable to your new field. My guess is you may have missed one in this file (but check all files just in case):

/includes/modules/YOUR_TEMPLATE/create_account.php

14 Apr 2011, 8:57 PM
#37
buzzfever avatar

buzzfever

New Zenner

Join Date:
Oct 2009
Posts:
39
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Hey, got the module working and it's great, thanks! Just wondering if it's possible to get that new field emailed with the Create Account emails?

29 Apr 2011, 11:59 AM
#38
gunni avatar

gunni

Zen Follower

Join Date:
Aug 2010
Location:
Israel
Posts:
287
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

Hi
How to control the width of the extra field ?
I want it to be wider.
Meaning I put a long question as the extra field but it is cut
to six lines because of the short width.
Site: adi-beauty (dot) com

Thanks

29 Apr 2011, 3:56 PM
#39
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Extra Fields for Customer Sign Up (Create Account) Page

@buzzfever, I haven't tried it, but it should be fairly straightforward. Open includes/languages/english/create_account.php and copy/paste one of the other fields as an example, then replace the variables with your 'extra field'

@gunni, CSS should help you with the length of the form field. Try adding something along these lines:

input {
length: 150px;
}

If you're talking about the actual number of characters in the form field, you could fix this limit in MySQL by going to customers table, and under customers_extrafield change varchar to a larger number.

23 May 2011, 8:02 PM
#40
samfire avatar

samfire

New Zenner

Join Date:
May 2011
Posts:
2
Plugin Contributions:
0

Re: Extra Fields for Customer Sign Up (Create Account) Page

jackie.taferner:

@buzzfever, I haven't tried it, but it should be fairly straightforward. Open includes/languages/english/create_account.php and copy/paste one of the other fields as an example, then replace the variables with your 'extra field'

@gunni, CSS should help you with the length of the form field. Try adding something along these lines:

input {
length: 150px;
}

If you're talking about the actual number of characters in the form field, you could fix this limit in MySQL by going to customers table, and under customers_extrafield change varchar to a larger number.

Hi Jackie

I uploaded/installed your mod ty v much

one issue I am having - may be related to above,

I tried to change the field box size on the account registration form, I'm using the extra field for the customer to put their website in..... but what ever value I put in the files (see below) it just reduces it to a really small field box size

files edited::::
tpl_account_edit_default.php
and
tpl_modules_create_account.php

it's always the same result what ever number i put it for e.g. in module create account as I have pasted below here....
(i have pasted both the 'company' code and the 'extra field' code for comparison)

<?php if (ACCOUNT_COMPANY == 'true') { ?> <fieldset> <legend><?php echo CATEGORY_COMPANY; ?></legend> <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY; ?></label> <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?> <!-- start extrafield --> <?php if (DISPLAY_EXTRAFIELD == 'true') { ?> <br class="clearBoth" /> <label class="inputLabel" for="extrafield"><?php echo ENTRY_EXTRAFIELD; ?></label> <?php echo zen_draw_input_field('extrafield', '', zen_set_field_length(fields, 'customers_extrafield', '40') . ' id="extrafield"') . (zen_not_null(ENTRY_EXTRAFIELD_TEXT) ? '<span class="alert">' . ENTRY_EXTRAFIELD_TEXT . '</span>': ''); ?> <?php } ?> <!-- end extrafield -->

am i editing the wrong file(s)?

maybe i'm missing the obvious after trying to do this for 2 hours!!!lol

any help
massively appreciated

thanks