API for getaddress.io has considerably changed. Have updated the getaddressio...
API for getaddress.io has considerably changed. Have updated the getaddressio driver to work with latest API. I withdrew the orginal PR as it needed tidying up a bit. Here's my second attempt.
Merge request reports
Activity
mentioned in issue #8
mentioned in commit 8bcefb35
As configured, this is not now placing all the retrieved fields in the right place in CiviCRM; village names are in getaddressIO field {locality} (which logically comes before Town/City in postal addresses, so the $querystring in line 100 should be reordered), but as Civi only has 4 address fields (including "City") + Postcode, getaddressIO address_bits [2], [3] and [4] need to be concatenated into one Civi field - $address['supplemental_address_2'], as shown below (note the use of ".=")
I'm not familiar with submitting commits, so please could someone deal with this.
Cheers, Tom Crawshaw
line 100
apiKey&all=true&template={line_1},{line_2},{line_3},{line_4},{locality},{town_or_city},{county}";lines 245 - 256 if (!empty($address_bits[0])) { $address['street_address'] = $address_bits[0]; }
if (!empty($address_bits[1])) { $address['supplemental_address_1'] = $address_bits[1]; } if (!empty($address_bits[2])) { $address['supplemental_address_2']=$address_bits[2]; } if (!empty($address_bits[3])) { $address['supplemental_address_2'].=$address_bits[3]; } if (!empty($address_bits[4])) { $address['supplemental_address_2'].=$address_bits[4]; } if (!empty($address_bits[5])) { $address['city'] = $address_bits[5];