Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Enable/Disable required fields in new account


boeaz

Recommended Posts

Hi all,

 

I've searched through the forums but haven't been able to locate the solution. I want to remove the "Required" attribute from several of the new customer account fields. In admin some fields can be completely removed, which I don't want, but customers should have the choice.

 

Any assistance appreciated.

 

Cheers,

Link to comment
Share on other sites

Hi all,

 

I've searched through the forums but haven't been able to locate the solution. I want to remove the "Required" attribute from several of the new customer account fields. In admin some fields can be completely removed, which I don't want, but customers should have the choice.

 

Any assistance appreciated.

 

Cheers,

 

you may try one ofthese 2 options:

 

A) set all the minimal values to these fields to zero in your admin, that might work.

 

 

B) go to the file catalog/create_account.php

 

and remove some of the conditionals located between lines 65 and 150 appr.

Good luck, and backup first!

Link to comment
Share on other sites

you may try one ofthese 2 options:

 

A) set all the minimal values to these fields to zero in your admin, that might work.

B) go to the file catalog/create_account.php

 

and remove some of the conditionals located between lines 65 and 150 appr.

Good luck, and backup first!

 

Hi. Thanks for the advice. A) does not work, the field remains tagged (*) as Required. B) I think this is the solution but the code is too complex for me to work out what needs to change. I'd like to make Gender, DOB and City as optional fields.

 

Any help is appreciated.

Link to comment
Share on other sites

here is an exampleon how to remove the star with the date of birth field

 

look for

 

 
<tr>
			<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
			<td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
		  </tr>

 

and change to

 

<tr>
			<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
			<td class="main"><?php echo tep_draw_input_field('dob'); ?></td>
		  </tr>

 

always work on a copy of your file.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...