Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Altering text fields in create_account.php


danthman

Recommended Posts

I need to use the company field and the suburb field in the create_account.php to gather extra information but I need to move them to the bottom of the address information when they appear in checkout_shipping.php, the invoice, packing slip, etc. I have looked through the code but I cannot figure out what governs the location of the information gathered by these fields. Can anyone help?

Link to comment
Share on other sites

I need to use the company field and the suburb field in the create_account.php to gather extra information but I need to move them to the bottom of the address information when they appear in checkout_shipping.php, the invoice, packing slip, etc. I have looked through the code but I cannot figure out what governs the location of the information gathered by these fields. Can anyone help?

 

 

 

Try

 

catalog/includes/modules/address_book_details.php

 

 

 

Tapuahk

Link to comment
Share on other sites

Try

 

catalog/includes/modules/address_book_details.php

Tapuahk

That changes the form, I need to change the output. Right now it appears as:

company

name

street address

suburb

city, state

country

 

I need it to appear as:

 

name

street address

city, state

country

company

suburb

Link to comment
Share on other sites

I think you need to edit the function "tep_address_format"

you can find this function in includes/functions/general.php

 

at the end of the function try changing (lines 488-493):

	if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
  $address = $company . $cr . $address;
}

return $address;
 }

into:

	if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
  $address = $address . $cr . $company;
}

return $address;
 }

 

good luck,

Jonathan

Link to comment
Share on other sites

I think you need to edit the function "tep_address_format"

you can find this function in includes/functions/general.php

 

at the end of the function try changing (lines 488-493):

	if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
  $address = $company . $cr . $address;
}

return $address;
 }

into:

	if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
  $address = $address . $cr . $company;
}

return $address;
 }

 

good luck,

Jonathan

Thanks Jonathan, that did the trick!

 

Dan

Link to comment
Share on other sites

  • 2 weeks later...

Hello Guys,

 

I added 2 fields on the customer side for document numbers, like social security number and other. On the invoice is showing like:

 

Ship To:

 

Shullex

Paulo Roberto Borges

Av Padre Macedo 835

05.462.034/0005-25253.543.254.174

Jd. Chapad?o

Campinas, 13070071

Sao Paulo, Brasil

 

(11)xxxx-xxxx

[email protected]

 

I would like to show those numbers like below. In 2 diferent fields, but its not working.

 

05.462.034/0005-25253.543.254.174 instead of

 

05.462.034/0005-25(street_address2)second field:

253.543.254.174 (street_address3)third Field:

 

I changed files:

 

/includes/classes/order.php

/includes/functions/general.php

/includes/languages/english.php

/includes/modules/address_book_details.php

address_book.php

address_book_process.php

create_account.php

checkout_process.php

 

In Admin:

 

/admin/includes/functions/general.php

/admin/includes/classes/order.php

/admin/includes/languages/english.php

/admin/customers.php

 

Anybody knows how to fix that? I used the SQL file to add the string on the database:

 

INSERT INTO `configuration` VALUES (316, 'CNPJ', 'ENTRY_STREET_ADDRESS2_MIN_LENGTH', '', 'Minimum length of street address2', 2, 5, '2004-10-01 00:37:02', '2004-07-25 16:22:27', NULL, NULL);

ALTER TABLE orders ADD customers_street_address2 varchar(64) NULL;

ALTER TABLE orders ADD delivery_street_address2 varchar(64) NULL;

ALTER TABLE orders ADD billing_street_address2 varchar(64) NULL;

ALTER TABLE address_book ADD entry_street_address2 varchar(64) NULL;

 

 

INSERT INTO `configuration` VALUES (317, 'Insc. Estadual', 'ENTRY_STREET_ADDRESS3_MIN_LENGTH', '', 'Minimum length of street address3', 2, 5, '2004-10-01 00:37:02', '2004-07-25 16:22:27', NULL, NULL);

ALTER TABLE orders ADD customers_street_address3 varchar(64) NULL;

ALTER TABLE orders ADD delivery_street_address3 varchar(64) NULL;

ALTER TABLE orders ADD billing_street_address3 varchar(64) NULL;

ALTER TABLE address_book ADD entry_street_address3 varchar(64) NULL;

 

 

Thanks

 

Nitromojo

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...