PostcodeNl_Api - Version 1.2.2.0

Version Notes

Features:
- Improved postcode matching

Fixes:
- Fixed issues with splitting street data for Postcode.nl Signal

Download this release

Release Info

Developer Postcode.nl Technical Support
Extension PostcodeNl_Api
Version 1.2.2.0
Comparing to
See all releases


Code changes from version 1.2.1.0 to 1.2.2.0

app/code/community/PostcodeNl/Api/Helper/Data.php CHANGED
@@ -126,7 +126,7 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
126
  $postcode = preg_replace('~[^a-z0-9]~i', '', $postcode);
127
 
128
  // Basic postcode format checking
129
- if (!preg_match('~^[0-9]{4}[a-z]{2}$~i', $postcode))
130
  {
131
  $response['message'] = $this->__('Invalid postcode format, use `1234AB` format.');
132
  $response['messageTarget'] = 'postcode';
@@ -282,7 +282,7 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
282
  if (preg_match('~^(?<number>[0-9]+)(?:[^0-9a-zA-Z]+(?<addition1>[0-9a-zA-Z ]+)|(?<addition2>[a-zA-Z](?:[0-9a-zA-Z ]*)))?$~', $houseNumber, $match))
283
  {
284
  $houseNumber = $match['number'];
285
- $houseNumberAddition = isset($match['addition2']) ? $match['addition2'] : (isset($match['addition1']) ? $match['addition1'] : '');
286
  }
287
 
288
  return array($houseNumber, $houseNumberAddition);
@@ -307,7 +307,7 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
307
  return array(
308
  'street' => $match['street'],
309
  'houseNumber' => $match['houseNumber'],
310
- 'houseNumberAddition' => $match['houseNumberAddition'],
311
  );
312
  }
313
  else if (isset($streetData[1]))
126
  $postcode = preg_replace('~[^a-z0-9]~i', '', $postcode);
127
 
128
  // Basic postcode format checking
129
+ if (!preg_match('~^[1-9][0-9]{3}[a-z]{2}$~i', $postcode))
130
  {
131
  $response['message'] = $this->__('Invalid postcode format, use `1234AB` format.');
132
  $response['messageTarget'] = 'postcode';
282
  if (preg_match('~^(?<number>[0-9]+)(?:[^0-9a-zA-Z]+(?<addition1>[0-9a-zA-Z ]+)|(?<addition2>[a-zA-Z](?:[0-9a-zA-Z ]*)))?$~', $houseNumber, $match))
283
  {
284
  $houseNumber = $match['number'];
285
+ $houseNumberAddition = isset($match['addition2']) ? $match['addition2'] : (isset($match['addition1']) ? $match['addition1'] : null);
286
  }
287
 
288
  return array($houseNumber, $houseNumberAddition);
307
  return array(
308
  'street' => $match['street'],
309
  'houseNumber' => $match['houseNumber'],
310
+ 'houseNumberAddition' => isset($match['houseNumberAddition']) ? $match['houseNumberAddition'] : null,
311
  );
312
  }
313
  else if (isset($streetData[1]))
app/code/community/PostcodeNl/Api/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <PostcodeNl_Api>
5
- <version>1.2.1.0</version>
6
  </PostcodeNl_Api>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <PostcodeNl_Api>
5
+ <version>1.2.2.0</version>
6
  </PostcodeNl_Api>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PostcodeNl_Api</name>
4
- <version>1.2.1.0</version>
5
  <stability>stable</stability>
6
  <license>Simplified BSD License</license>
7
  <channel>community</channel>
@@ -19,17 +19,15 @@ Also includes the free Postcode.nl Signal API service to validate and enrich ord
19
  &#xD;
20
  The postcode Magento plugin from Postcode.nl is free of charge, based on a Fair-Use policy. The use of the Postcode.nl Magento plugin is subject to our Terms and Conditions.</description>
21
  <notes>Features:&#xD;
22
- - Add support for IP address checking and Dutch address checking with the Postcode.nl Signal API&#xD;
23
- - Added 'validation-passed' and 'validation-failed' css classes to checkout input fields, support for 'validate-immediate'&#xD;
24
- - Added provisional support for the Lotusbreath One Step Checkout extension&#xD;
25
  &#xD;
26
  Fixes:&#xD;
27
- - Fix for language files installation via modman/composer&#xD;
28
  </notes>
29
  <authors><author><name>Postcode.nl Technical Support</name><user>TechPostcodeNl</user><email>tech@postcode.nl</email></author></authors>
30
- <date>2015-01-13</date>
31
- <time>17:02:04</time>
32
- <contents><target name="magecommunity"><dir name="PostcodeNl"><dir name="Api"><dir name="Block"><file name="Jsinit.php" hash="79bb826a50ce0cf4f87cc2f958bfafa1"/></dir><dir name="Helper"><file name="Data.php" hash="c11562e3bbed91822894e2511560314c"/></dir><dir name="Model"><file name="Observer.php" hash="f60c131c6000568df5313d9f07d153ee"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PcnlController.php" hash="1a8eaf87ed60481f51f3f74eab3ab63f"/></dir><file name="JsonController.php" hash="6a3bff054e3229faaae2aa55f9a3cf3c"/></dir><dir name="data"><dir name="postcodenl_api_setup"><file name="data-upgrade-1.0.8.0-1.1.0.0.php" hash="169658dbcaec550a4c11820e0d620ecf"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5d518aeaeae028b6299c7cf3d6e54f60"/><file name="config.xml" hash="6b18b78fecda7f26eac85e18893d4eab"/><file name="system.xml" hash="1dc10a6e0247c32270a66373ae58517d"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="e8f6295a91c9c5bfd116ae1048a5445d"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="8623676f4c6f4068d0b51e31dcfa08e9"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="d2408958337c27b6fe9a33630e2d1714"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="ff32e12bbc26e4414dd8ca76edc4ed0f"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="PostcodeNl_Api.csv" hash="f48fa23f30f5dfaab37a905fb1ba9c51"/></dir><dir name="nl_NL"><file name="PostcodeNl_Api.csv" hash="fc2be2700e2025a3f56d4d8e72d30781"/></dir></target><target name="mageweb"><dir name="js"><dir name="postcodenl"><dir name="api"><file name="lookup.js" hash="7f3c68201b37dde8552f0a4821f727a8"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="c58103b505f8bcdf55cea1159ca21e27"/></dir><dir name="images"><file name="postcode-logo.png" hash="da02bc29be1057a0201e63f81ee4bd02"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="c6ffbeceb6907b2e8463d1ff30810304"/></dir><dir name="images"><file name="postcode-logo.png" hash="da02bc29be1057a0201e63f81ee4bd02"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PostcodeNl_Api.xml" hash="feeaf95128ffe4ad109ed8b0b8bc85ab"/></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.10.5</min><max>7.99.0</max></extension></required></dependencies>
35
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PostcodeNl_Api</name>
4
+ <version>1.2.2.0</version>
5
  <stability>stable</stability>
6
  <license>Simplified BSD License</license>
7
  <channel>community</channel>
19
  &#xD;
20
  The postcode Magento plugin from Postcode.nl is free of charge, based on a Fair-Use policy. The use of the Postcode.nl Magento plugin is subject to our Terms and Conditions.</description>
21
  <notes>Features:&#xD;
22
+ - Improved postcode matching&#xD;
 
 
23
  &#xD;
24
  Fixes:&#xD;
25
+ - Fixed issues with splitting street data for Postcode.nl Signal&#xD;
26
  </notes>
27
  <authors><author><name>Postcode.nl Technical Support</name><user>TechPostcodeNl</user><email>tech@postcode.nl</email></author></authors>
28
+ <date>2015-06-16</date>
29
+ <time>13:28:36</time>
30
+ <contents><target name="magecommunity"><dir name="PostcodeNl"><dir name="Api"><dir name="Block"><file name="Jsinit.php" hash="79bb826a50ce0cf4f87cc2f958bfafa1"/></dir><dir name="Helper"><file name="Data.php" hash="3ebd3080308a46d3105bedd1213e2ca5"/></dir><dir name="Model"><file name="Observer.php" hash="f60c131c6000568df5313d9f07d153ee"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PcnlController.php" hash="1a8eaf87ed60481f51f3f74eab3ab63f"/></dir><file name="JsonController.php" hash="6a3bff054e3229faaae2aa55f9a3cf3c"/></dir><dir name="data"><dir name="postcodenl_api_setup"><file name="data-upgrade-1.0.8.0-1.1.0.0.php" hash="169658dbcaec550a4c11820e0d620ecf"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5d518aeaeae028b6299c7cf3d6e54f60"/><file name="config.xml" hash="06b645f6ce833ee4f29603c9455ef176"/><file name="system.xml" hash="1dc10a6e0247c32270a66373ae58517d"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="e8f6295a91c9c5bfd116ae1048a5445d"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="8623676f4c6f4068d0b51e31dcfa08e9"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="d2408958337c27b6fe9a33630e2d1714"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="ff32e12bbc26e4414dd8ca76edc4ed0f"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="PostcodeNl_Api.csv" hash="f48fa23f30f5dfaab37a905fb1ba9c51"/></dir><dir name="nl_NL"><file name="PostcodeNl_Api.csv" hash="fc2be2700e2025a3f56d4d8e72d30781"/></dir></target><target name="mageweb"><dir name="js"><dir name="postcodenl"><dir name="api"><file name="lookup.js" hash="7f3c68201b37dde8552f0a4821f727a8"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="c58103b505f8bcdf55cea1159ca21e27"/></dir><dir name="images"><file name="postcode-logo.png" hash="da02bc29be1057a0201e63f81ee4bd02"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="c6ffbeceb6907b2e8463d1ff30810304"/></dir><dir name="images"><file name="postcode-logo.png" hash="da02bc29be1057a0201e63f81ee4bd02"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PostcodeNl_Api.xml" hash="feeaf95128ffe4ad109ed8b0b8bc85ab"/></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.10.5</min><max>7.99.0</max></extension></required></dependencies>
33
  </package>