Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing required Customer Details in 2.3.3


ercol

Recommended Posts

Hi,

 

I'm new to this so apologies for any obvious mistakes.My coding experience is also limited.

 

I would like to do the following on the Account information page:

 

Remove:

 

Gender

Date of Birth

Fax Number

Newsletter

 

Change:

The order and names of address details ('Street Address' to 'Address 1', 'Suburb' to 'Address 2' etc)

 

Add:

2 Additional required fields (Site Manager and Site Number).

 

If anyone could give any pointers as to how to go about this i would be very grateful. I have discovered a few Add Ons for this purpose but they dont appear to work with 2.3.3

 

Many thanks,

 

Sam

Link to comment
Share on other sites

It's gratifying to learn that I'm not the only one with a disinclination to ask needless intrusive questions. Your project will entail selective vandalism of

 

create_account.php .

 

Suppressing display of form fields is straightforward enough, if you know a bit of html. But if a field is not displayed then it is left empty. So you have to bluff your way past the javascript and php form validations, both of which are looking out for empty fields. It may be simplest, at least in the first instance, to disable the javascript altogether. Simplest that is, to comment out the line

 

require('includes/form_check.js.php');

 

That leaves you looking for the lines

 

$error = false;

 

and

 

if ($error == false) {

 

and all the little blocks of code inbeween. These blocks can be selectively commented out, as in

 

/*

if (ACCOUNT_GENDER == 'true') {

if ( ($gender != 'm') && ($gender != 'f') ) {

$error = true;

$messageStack->add('create_account', ENTRY_GENDER_ERROR);

}

}

*/

 

to turn off validation of the corresponding field. The fragments of text that you want to change are in

 

includes/languages/english.php .

 

Welcome to the forum!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...