Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Made a new address book field, but have an error..


Nocturnaloner

Recommended Posts

I made a new field, Title, to go after the customer's name. This is an important field for my client. I hacked my way through it by duplicating the company field and variables wherever they occur, and for the most part that worked.

 

The breakage occurs in the address book and the checkout pages, where the addresses appear like this:

 

TitleCompany

Name

Title

Address

City, State Zip

 

NOW, if I remove $title entirely from my address_format table entry, I get this:

 

TitleCompany

Name

 

Address

City, State Zip

 

Can ANYONE give me a suggestion as to why this is happening??

Link to comment
Share on other sites

In keeping with my tradition of answering my own posts, (why stop now?) I found my error. in includes/functions/general.php is this line:

 

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

$address = $company . $cr . $address;

}

 

What it does is re-format the address, if show company is turned on in the admin. I had mistakenly put $title into this line ($address= $title . $company . $cr . $address;), and the result was what I posted above. Took out the title string, problem solved. Beyond Compare is an essential tool.

Link to comment
Share on other sites

  • 2 weeks later...

This could quite possibly be the answer to my problem! Thank you for coming back and posting your resolution!

 

Yes, I recently discovered Beyond Compare and I do believe it's the best piece of software I've found in a couple of years!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...