Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Address Layout


Tzimako

Recommended Posts

Please can anyone let me know how I can move the company name below the customers name in the address book. I want the address book entry to look like:

 

Joe Bloggs

Some company

21, Acacia Ave.

Sometown

Someplace

etc.etc.

 

There is no way of changing the layout in address_format that I can find. Is the answer somewhere else?

Link to comment
Share on other sites

Please can anyone let me know how I can move the company name below the customers name in the address book. I want the address book entry to look like:

 

Joe Bloggs

Some company

21, Acacia Ave.

Sometown

Someplace

etc.etc.

 

There is no way of changing the layout in address_format that I can find. Is the answer somewhere else?

 

OK, with the help of an obscure post.

 

I put a $company entry in the address_format file

 

Then

 

In catalog/includes/functions/general.php I changed:

 

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

to

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

Link to comment
Share on other sites

As a revision,

 

change your address_format to:

$firstname $lastname, $nocompany$cr$streets$cr$city, $statecomma$cr$postcode

 

and in catalog/includes/functions/general.php, add:

 

 

$nocompany = $company;

under

$streets = $street;

 

and

 

if ($company !='') $nocompany = $cr . $company . '';

under

if ($state != '') $statecomma = $state . ', ';

 

This will format the address properly if no company is entered.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...