Jump to content

[SOLVED] Address Help


Recommended Posts

I need a little pointer as to where to turn off the address entry auto-correct when a client registers.

 

I lost a sale yesterday when someone who had an address which included the word "Lane" which was not a street designation like.. Mulberry Lane, but more like Lane Street (weird I know). They became frustrated and walked away when PS kept replacing the word Lane with LN.

 

I think this might be my second lost sale due to this, and I want for whatever they type in their registration to be what is added verbatim and not interpreted an re-configured.

 

Any help is appreciated.

 

Thanks,

SC

Edited by SuperCharlie (see edit history)
Link to comment
Share on other sites

Ok.. I just went through and made sure of the problem. I was mistaken in my original post although I was almost certain that was the case. To reproduce this occurrence of the entries being changed the words "street" or "lane" and "port" as well as possibly some others at the end of an address will be re-written as LN, ST and PRT

 

To replicate

 

Create or edit your address (If you still have the login)

 

Update the address to any set of words which end in any of the above mentioned words.

Check your address.

 

I apologize for the confusion on my part.

 

I also understand how this substitution could be useful in most cases..however, here is the direct email from my client.

 

"Message: I was going to buy a water bottle & use your promotion to donate part of the proceeds to my favorite parrot rescue. But when I tried to register, your program wouldn't accept my street address. When I tried to save it, your program kept changing it to another address. Too bad. Y'all lost a sale, I lost a REALLY cute water bottle, and & my favorite parrot rescue lost a donation."

 

I tried to get more info but they never replied to my request for more specifics. I hunted this down from what little info I had from their failed registration.

 

I appreciate your time and looking into this.

 

SC

Link to comment
Share on other sites

As a final update to this issue I would like to provide the following info..

 

The file Mike lists above is a function which standardizes the users address and contains countless variations of different things people might put in their address and tries, very well apparently, to make things like APT, Apartment, APTM etc into a postal service friendly single format.

 

The problem I encountered with my 2 clients is like the problem you encounter when you take a 5000 page document and do a global search and replace. I dont know about you, but for me it never ends perfectly.

 

I have decided to disable this function and let the client enter their address as they wish and contact/cleanup if necessary.

 

This is for PS 1.4.8.2 others may or may not be similar.

 

What I did was this

 

Around line 1231 of tools/taasc/AddressStandardizationSolution.php you will find this..

 

public function AddressLineStandardization($address) {
	if (empty($address)) {
		return '';
	}

 

Directly after those lines, I added

 

// And just return the address in its unholy state
	return $address;

 

Which basically just returns the address as-is.

 

Before you do this remember to back up your original. Also this will probably not make it through an auto-update as it is a core file modification.

 

And did I mention back up? :)

 

Good luck

SC

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...