Version Notes
Fixes:
- Compatibility changes for Magento CE 1.8.0.0+
- Compatibility with newer version of currently supported checkout extensions
- An interaction bug during checkout in Internet Explorer 9
Added provisional support for the following checkout modules:
- Aitoc One Step Checkout Manager
- AheadWorks One Step Checkout
- J2T OneCheckout
- MagentoTemplate OnePage Magento Checkout
- MageWorld One Step Checkout Pro
Features:
- Option to disallow post office box (postbus) addresses
- Option to disable checks in the admin
Download this release
Release Info
| Developer | Postcode.nl Technical Support |
| Extension | PostcodeNl_Api |
| Version | 1.1.0.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.8.0 to 1.1.0.0
- app/code/community/PostcodeNl/Api/Helper/Data.php +96 -7
- app/code/community/PostcodeNl/Api/data/postcodenl_api_setup/data-upgrade-1.0.8.0-1.1.0.0.php +40 -0
- app/code/community/PostcodeNl/Api/etc/adminhtml.xml +2 -3
- app/code/community/PostcodeNl/Api/etc/config.xml +24 -11
- app/code/community/PostcodeNl/Api/etc/system.xml +68 -18
- app/design/adminhtml/default/default/layout/postcodenl/api/lookup.xml +20 -20
- app/design/adminhtml/default/default/template/postcodenl/api/jsinit.phtml +1 -35
- app/design/frontend/base/default/layout/postcodenl/api/lookup.xml +82 -61
- app/design/frontend/base/default/template/postcodenl/api/jsinit.phtml +1 -35
- app/design/frontend/default/default/layout/postcodenl/api/lookup.xml +88 -57
- app/design/frontend/default/default/template/postcodenl/api/jsinit.phtml +1 -35
- app/locale/en_US/PostcodeNl_Api.csv +1 -1
- app/locale/nl_NL/PostcodeNl_Api.csv +1 -1
- js/postcodenl/api/lookup.js +266 -38
- package.xml +19 -11
- skin/frontend/base/default/postcodenl/api/css/lookup.css +9 -1
- skin/frontend/default/default/postcodenl/api/css/lookup.css +15 -3
app/code/community/PostcodeNl/Api/Helper/Data.php
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
{
|
| 4 |
const API_TIMEOUT = 3;
|
|
|
|
| 5 |
|
| 6 |
protected $_modules;
|
| 7 |
|
|
@@ -35,18 +36,87 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 35 |
return $this->_modules[$moduleName];
|
| 36 |
}
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
public function lookupAddress($postcode, $houseNumber, $houseNumberAddition)
|
| 39 |
{
|
| 40 |
-
if (!Mage::getStoreConfig('
|
| 41 |
{
|
| 42 |
return array('message' => $this->__('Postcode.nl API not enabled.'));
|
| 43 |
}
|
| 44 |
|
| 45 |
-
|
| 46 |
-
$serviceKey = trim(Mage::getStoreConfig('
|
| 47 |
-
$serviceSecret = trim(Mage::getStoreConfig('
|
| 48 |
-
|
| 49 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
$extensionInfo = $this->_getModuleInfo('PostcodeNl_Api');
|
| 52 |
$extensionVersion = $extensionInfo ? (string)$extensionInfo->version : 'unknown';
|
|
@@ -66,6 +136,18 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 66 |
}
|
| 67 |
}
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
$url = $serviceUrl . '/rest/addresses/' . urlencode($postcode). '/'. urlencode($houseNumber) . '/'. urlencode($houseNumberAddition);
|
| 70 |
$ch = curl_init();
|
| 71 |
curl_setopt($ch, CURLOPT_URL, $url);
|
|
@@ -73,7 +155,7 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 73 |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, self::API_TIMEOUT);
|
| 74 |
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
| 75 |
curl_setopt($ch, CURLOPT_USERPWD, $serviceKey .':'. $serviceSecret);
|
| 76 |
-
curl_setopt($ch, CURLOPT_USERAGENT, 'PostcodeNl_Api_MagentoPlugin/' . $extensionVersion .' '. $this->_getMagentoVersion());
|
| 77 |
$jsonResponse = curl_exec($ch);
|
| 78 |
$curlError = curl_error($ch);
|
| 79 |
curl_close($ch);
|
|
@@ -121,6 +203,9 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 121 |
{
|
| 122 |
switch ($response['exceptionId'])
|
| 123 |
{
|
|
|
|
|
|
|
|
|
|
| 124 |
case 'PostcodeNl_Controller_Address_InvalidPostcodeException':
|
| 125 |
$sendResponse['message'] = $this->__('Invalid postcode format, use `1234AB` format.');
|
| 126 |
$sendResponse['messageTarget'] = 'postcode';
|
|
@@ -130,6 +215,10 @@ class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 130 |
$sendResponse['messageTarget'] = 'housenumber';
|
| 131 |
break;
|
| 132 |
case 'PostcodeNl_Controller_Address_InvalidHouseNumberException':
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
$sendResponse['message'] = $this->__('Housenumber format is not valid.');
|
| 134 |
$sendResponse['messageTarget'] = 'housenumber';
|
| 135 |
break;
|
| 2 |
class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
{
|
| 4 |
const API_TIMEOUT = 3;
|
| 5 |
+
const API_URL = 'https://api.postcode.nl';
|
| 6 |
|
| 7 |
protected $_modules;
|
| 8 |
|
| 36 |
return $this->_modules[$moduleName];
|
| 37 |
}
|
| 38 |
|
| 39 |
+
protected function _getConfigBoolString($configKey)
|
| 40 |
+
{
|
| 41 |
+
if (Mage::getStoreConfig($configKey))
|
| 42 |
+
return 'true';
|
| 43 |
+
|
| 44 |
+
return 'false';
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/**
|
| 48 |
+
* Get the html for initializing validation script.
|
| 49 |
+
*
|
| 50 |
+
* @return string
|
| 51 |
+
*/
|
| 52 |
+
public function getJsinit($getAdminConfig = false)
|
| 53 |
+
{
|
| 54 |
+
if ($getAdminConfig && Mage::getStoreConfig('postcodenl_api/advanced_config/admin_validation_disabled'))
|
| 55 |
+
return '';
|
| 56 |
+
|
| 57 |
+
if ($getAdminConfig)
|
| 58 |
+
$baseUrl = Mage::helper('adminhtml')->getUrl('*/pcnl/lookup', array('_secure' => true));
|
| 59 |
+
else
|
| 60 |
+
$baseUrl = Mage::getUrl('postcodenl_api/json', array('_secure' => true));
|
| 61 |
+
|
| 62 |
+
$html = '
|
| 63 |
+
<script type="text/javascript">
|
| 64 |
+
//<![CDATA[
|
| 65 |
+
var PCNLAPI_CONFIG = {
|
| 66 |
+
baseUrl: "' . htmlspecialchars($baseUrl) . '",
|
| 67 |
+
useStreet2AsHouseNumber: ' . $this->_getConfigBoolString('postcodenl_api/advanced_config/use_street2_as_housenumber') . ',
|
| 68 |
+
blockPostOfficeBoxAddresses: '. $this->_getConfigBoolString('postcodenl_api/advanced_config/block_postofficeboxaddresses') . ',
|
| 69 |
+
neverHideCountry: ' . $this->_getConfigBoolString('postcodenl_api/advanced_config/never_hide_country') . ',
|
| 70 |
+
showcase: ' . $this->_getConfigBoolString('postcodenl_api/development_config/api_showcase') . ',
|
| 71 |
+
debug: ' . $this->_getConfigBoolString('postcodenl_api/development_config/api_debug') . ',
|
| 72 |
+
translations: {
|
| 73 |
+
defaultError: "' . htmlspecialchars($this->__('Unknown postcode + housenumber combination.')) . '",
|
| 74 |
+
postcodeInputLabel: "' . htmlspecialchars($this->__('Postcode')) . '",
|
| 75 |
+
postcodeInputTitle: "' . htmlspecialchars($this->__('Postcode')) . '",
|
| 76 |
+
houseNumberAdditionUnknown: "' . htmlspecialchars($this->__('Housenumber addition `{addition}` is unknown.')) . '",
|
| 77 |
+
houseNumberAdditionRequired: "' . htmlspecialchars($this->__('Housenumber addition required.')) . '",
|
| 78 |
+
houseNumberLabel: "' . htmlspecialchars($this->__('Housenumber')) . '",
|
| 79 |
+
houseNumberTitle: "' . htmlspecialchars($this->__('Housenumber')) . '",
|
| 80 |
+
houseNumberAdditionLabel: "' . htmlspecialchars($this->__('Housenumber addition')) . '",
|
| 81 |
+
houseNumberAdditionTitle: "' . htmlspecialchars($this->__('Housenumber addition')) . '",
|
| 82 |
+
selectAddition: "' . htmlspecialchars($this->__('Select...')) . '",
|
| 83 |
+
noAdditionSelect: "' . htmlspecialchars($this->__('No addition.')) . '",
|
| 84 |
+
noAdditionSelectCustom: "' . htmlspecialchars($this->__('`No addition`')) . '",
|
| 85 |
+
additionSelectCustom: "' . htmlspecialchars($this->__('`{addition}`')) . '",
|
| 86 |
+
apiShowcase: "' . htmlspecialchars($this->__('API Showcase')) . '",
|
| 87 |
+
apiDebug: "' . htmlspecialchars($this->__('API Debug')) . '",
|
| 88 |
+
disabledText: "' . htmlspecialchars($this->__('- disabled -')) . '",
|
| 89 |
+
infoLabel: "' . htmlspecialchars($this->__('Address validation')) . '",
|
| 90 |
+
infoText: "' . htmlspecialchars($this->__('Fill out your postcode and housenumber to auto-complete your address. You can also manually set your address information.')) . '",
|
| 91 |
+
manualInputLabel: "' . htmlspecialchars($this->__('Manual input')) . '",
|
| 92 |
+
manualInputText: "' . htmlspecialchars($this->__('Fill out address information manually')) . '",
|
| 93 |
+
outputLabel: "' . htmlspecialchars($this->__('Validated address')) . '",
|
| 94 |
+
postOfficeBoxNotAllowed: "' . htmlspecialchars($this->__('Post office box not allowed.')) . '"
|
| 95 |
+
}
|
| 96 |
+
};
|
| 97 |
+
//]]>
|
| 98 |
+
</script>';
|
| 99 |
+
|
| 100 |
+
return $html;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
public function lookupAddress($postcode, $houseNumber, $houseNumberAddition)
|
| 104 |
{
|
| 105 |
+
if (!Mage::getStoreConfig('postcodenl_api/config/enabled'))
|
| 106 |
{
|
| 107 |
return array('message' => $this->__('Postcode.nl API not enabled.'));
|
| 108 |
}
|
| 109 |
|
| 110 |
+
// Basic Configuration
|
| 111 |
+
$serviceKey = trim(Mage::getStoreConfig('postcodenl_api/config/api_key'));
|
| 112 |
+
$serviceSecret = trim(Mage::getStoreConfig('postcodenl_api/config/api_secret'));
|
| 113 |
+
// Development options
|
| 114 |
+
$serviceUrl = trim(Mage::getStoreConfig('postcodenl_api/development_config/api_url'));
|
| 115 |
+
if (empty($serviceUrl))
|
| 116 |
+
$serviceUrl = self::API_URL;
|
| 117 |
+
|
| 118 |
+
$serviceShowcase = Mage::getStoreConfig('postcodenl_api/development_config/api_showcase');
|
| 119 |
+
$serviceDebug = Mage::getStoreConfig('postcodenl_api/development_config/api_debug');
|
| 120 |
|
| 121 |
$extensionInfo = $this->_getModuleInfo('PostcodeNl_Api');
|
| 122 |
$extensionVersion = $extensionInfo ? (string)$extensionInfo->version : 'unknown';
|
| 136 |
}
|
| 137 |
}
|
| 138 |
|
| 139 |
+
// Some basic user data 'fixing', remove any not-letter, not-number characters
|
| 140 |
+
$postcode = preg_replace('~[^a-z0-9]~i', '', $postcode);
|
| 141 |
+
|
| 142 |
+
// Basic postcode format checking
|
| 143 |
+
if (!preg_match('~^[0-9]{4}[a-z]{2}$~i', $postcode))
|
| 144 |
+
{
|
| 145 |
+
$sendResponse = array();
|
| 146 |
+
$sendResponse['message'] = $this->__('Invalid postcode format, use `1234AB` format.');
|
| 147 |
+
$sendResponse['messageTarget'] = 'postcode';
|
| 148 |
+
return $sendResponse;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
$url = $serviceUrl . '/rest/addresses/' . urlencode($postcode). '/'. urlencode($houseNumber) . '/'. urlencode($houseNumberAddition);
|
| 152 |
$ch = curl_init();
|
| 153 |
curl_setopt($ch, CURLOPT_URL, $url);
|
| 155 |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, self::API_TIMEOUT);
|
| 156 |
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
| 157 |
curl_setopt($ch, CURLOPT_USERPWD, $serviceKey .':'. $serviceSecret);
|
| 158 |
+
curl_setopt($ch, CURLOPT_USERAGENT, 'PostcodeNl_Api_MagentoPlugin/' . $extensionVersion .' '. $this->_getMagentoVersion() .' PHP/'. phpversion());
|
| 159 |
$jsonResponse = curl_exec($ch);
|
| 160 |
$curlError = curl_error($ch);
|
| 161 |
curl_close($ch);
|
| 203 |
{
|
| 204 |
switch ($response['exceptionId'])
|
| 205 |
{
|
| 206 |
+
case 'PostcodeNl_Controller_Address_PostcodeTooShortException':
|
| 207 |
+
case 'PostcodeNl_Controller_Address_PostcodeTooLongException':
|
| 208 |
+
case 'PostcodeNl_Controller_Address_NoPostcodeSpecifiedException':
|
| 209 |
case 'PostcodeNl_Controller_Address_InvalidPostcodeException':
|
| 210 |
$sendResponse['message'] = $this->__('Invalid postcode format, use `1234AB` format.');
|
| 211 |
$sendResponse['messageTarget'] = 'postcode';
|
| 215 |
$sendResponse['messageTarget'] = 'housenumber';
|
| 216 |
break;
|
| 217 |
case 'PostcodeNl_Controller_Address_InvalidHouseNumberException':
|
| 218 |
+
case 'PostcodeNl_Controller_Address_NoHouseNumberSpecifiedException':
|
| 219 |
+
case 'PostcodeNl_Controller_Address_NegativeHouseNumberException':
|
| 220 |
+
case 'PostcodeNl_Controller_Address_HouseNumberTooLargeException':
|
| 221 |
+
case 'PostcodeNl_Controller_Address_HouseNumberIsNotAnIntegerException':
|
| 222 |
$sendResponse['message'] = $this->__('Housenumber format is not valid.');
|
| 223 |
$sendResponse['messageTarget'] = 'housenumber';
|
| 224 |
break;
|
app/code/community/PostcodeNl/Api/data/postcodenl_api_setup/data-upgrade-1.0.8.0-1.1.0.0.php
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$config = new Mage_Core_Model_Config();
|
| 3 |
+
|
| 4 |
+
// Look up old config data
|
| 5 |
+
$serviceEnabled = trim(Mage::getStoreConfig('postcodenl/config/enabled'));
|
| 6 |
+
$serviceUrl = trim(Mage::getStoreConfig('postcodenl/config/api_url'));
|
| 7 |
+
$serviceKey = trim(Mage::getStoreConfig('postcodenl/config/api_key'));
|
| 8 |
+
$serviceSecret = trim(Mage::getStoreConfig('postcodenl/config/api_secret'));
|
| 9 |
+
$serviceShowcase = Mage::getStoreConfig('postcodenl/config/api_showcase');
|
| 10 |
+
$serviceDebug = Mage::getStoreConfig('postcodenl/config/api_debug');
|
| 11 |
+
$serviceNeverHideCountry = Mage::getStoreConfig('postcodenl/config/never_hide_country');
|
| 12 |
+
$serviceUseStreet2AsHousenumber = Mage::getStoreConfig('postcodenl/config/use_street2_as_housenumber');
|
| 13 |
+
|
| 14 |
+
// Only do update, if we actually have old configuration (secret being most important to check)
|
| 15 |
+
if ($serviceSecret !== null)
|
| 16 |
+
{
|
| 17 |
+
// Set new basic configuration
|
| 18 |
+
$config->saveConfig('postcodenl_api/config/enabled', $serviceEnabled, 'default', 0);
|
| 19 |
+
$config->saveConfig('postcodenl_api/config/api_key', $serviceKey, 'default', 0);
|
| 20 |
+
$config->saveConfig('postcodenl_api/config/api_secret', $serviceSecret, 'default', 0);
|
| 21 |
+
|
| 22 |
+
// Set new advanced configuration
|
| 23 |
+
$config->saveConfig('postcodenl_api/advanced_config/use_street2_as_housenumber', $serviceUseStreet2AsHousenumber, 'default', 0);
|
| 24 |
+
$config->saveConfig('postcodenl_api/advanced_config/never_hide_country', $serviceNeverHideCountry, 'default', 0);
|
| 25 |
+
|
| 26 |
+
// Set new development configuration
|
| 27 |
+
$config->saveConfig('postcodenl_api/development_config/api_url', $serviceUrl, 'default', 0);
|
| 28 |
+
$config->saveConfig('postcodenl_api/development_config/api_debug', $serviceDebug, 'default', 0);
|
| 29 |
+
$config->saveConfig('postcodenl_api/development_config/api_showcase', $serviceShowcase, 'default', 0);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
// Delete old configuration
|
| 33 |
+
$config->deleteConfig('postcodenl/config/enabled', 'default', 0);
|
| 34 |
+
$config->deleteConfig('postcodenl/config/api_url', 'default', 0);
|
| 35 |
+
$config->deleteConfig('postcodenl/config/api_key', 'default', 0);
|
| 36 |
+
$config->deleteConfig('postcodenl/config/api_secret', 'default', 0);
|
| 37 |
+
$config->deleteConfig('postcodenl/config/api_showcase', 'default', 0);
|
| 38 |
+
$config->deleteConfig('postcodenl/config/api_debug', 'default', 0);
|
| 39 |
+
$config->deleteConfig('postcodenl/config/never_hide_country', 'default', 0);
|
| 40 |
+
$config->deleteConfig('postcodenl/config/use_street2_as_housenumber', 'default', 0);
|
app/code/community/PostcodeNl/Api/etc/adminhtml.xml
CHANGED
|
@@ -11,10 +11,9 @@
|
|
| 11 |
<children>
|
| 12 |
<config>
|
| 13 |
<children>
|
| 14 |
-
|
| 15 |
-
<postcodenl translate="title" module="postcodenl_api">
|
| 16 |
<title>Postcode.nl API</title>
|
| 17 |
-
</
|
| 18 |
</children>
|
| 19 |
</config>
|
| 20 |
</children>
|
| 11 |
<children>
|
| 12 |
<config>
|
| 13 |
<children>
|
| 14 |
+
<postcodenl_api module="PostcodeNl_Api">
|
|
|
|
| 15 |
<title>Postcode.nl API</title>
|
| 16 |
+
</postcodenl_api>
|
| 17 |
</children>
|
| 18 |
</config>
|
| 19 |
</children>
|
app/code/community/PostcodeNl/Api/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<PostcodeNl_Api>
|
| 5 |
-
<version>1.0.
|
| 6 |
</PostcodeNl_Api>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
|
@@ -11,7 +11,7 @@
|
|
| 11 |
<use>standard</use>
|
| 12 |
<args>
|
| 13 |
<module>PostcodeNl_Api</module>
|
| 14 |
-
<frontName>
|
| 15 |
</args>
|
| 16 |
</postcodenl_api>
|
| 17 |
</routers>
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
<adminhtml>
|
| 38 |
<args>
|
| 39 |
<modules>
|
| 40 |
-
<
|
| 41 |
</modules>
|
| 42 |
</args>
|
| 43 |
</adminhtml>
|
|
@@ -49,11 +49,18 @@
|
|
| 49 |
<class>PostcodeNl_Api_Helper</class>
|
| 50 |
</postcodenl_api>
|
| 51 |
</helpers>
|
| 52 |
-
|
| 53 |
<postcodenl_api>
|
| 54 |
<class>PostcodeNl_Api_Block</class>
|
| 55 |
</postcodenl_api>
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</global>
|
| 58 |
<adminhtml>
|
| 59 |
<layout>
|
|
@@ -74,17 +81,23 @@
|
|
| 74 |
</translate>
|
| 75 |
</adminhtml>
|
| 76 |
<default>
|
| 77 |
-
|
| 78 |
-
<postcodenl>
|
| 79 |
<config>
|
| 80 |
<enabled>1</enabled>
|
| 81 |
-
<
|
| 82 |
<api_secret></api_secret>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
<api_url>https://api.postcode.nl</api_url>
|
| 84 |
-
<api_key></api_key>
|
| 85 |
<api_showcase>0</api_showcase>
|
| 86 |
<api_debug>0</api_debug>
|
| 87 |
-
</
|
| 88 |
-
</
|
| 89 |
</default>
|
| 90 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<PostcodeNl_Api>
|
| 5 |
+
<version>1.1.0.0</version>
|
| 6 |
</PostcodeNl_Api>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 11 |
<use>standard</use>
|
| 12 |
<args>
|
| 13 |
<module>PostcodeNl_Api</module>
|
| 14 |
+
<frontName>postcodenl_api</frontName>
|
| 15 |
</args>
|
| 16 |
</postcodenl_api>
|
| 17 |
</routers>
|
| 37 |
<adminhtml>
|
| 38 |
<args>
|
| 39 |
<modules>
|
| 40 |
+
<postcodenl_api before="Mage_Adminhtml">PostcodeNl_Api_Adminhtml</postcodenl_api>
|
| 41 |
</modules>
|
| 42 |
</args>
|
| 43 |
</adminhtml>
|
| 49 |
<class>PostcodeNl_Api_Helper</class>
|
| 50 |
</postcodenl_api>
|
| 51 |
</helpers>
|
| 52 |
+
<blocks>
|
| 53 |
<postcodenl_api>
|
| 54 |
<class>PostcodeNl_Api_Block</class>
|
| 55 |
</postcodenl_api>
|
| 56 |
+
</blocks>
|
| 57 |
+
<resources>
|
| 58 |
+
<postcodenl_api_setup>
|
| 59 |
+
<setup>
|
| 60 |
+
<module>PostcodeNl_Api</module>
|
| 61 |
+
</setup>
|
| 62 |
+
</postcodenl_api_setup>
|
| 63 |
+
</resources>
|
| 64 |
</global>
|
| 65 |
<adminhtml>
|
| 66 |
<layout>
|
| 81 |
</translate>
|
| 82 |
</adminhtml>
|
| 83 |
<default>
|
| 84 |
+
<postcodenl_api>
|
|
|
|
| 85 |
<config>
|
| 86 |
<enabled>1</enabled>
|
| 87 |
+
<api_key></api_key>
|
| 88 |
<api_secret></api_secret>
|
| 89 |
+
</config>
|
| 90 |
+
<advanced_config>
|
| 91 |
+
<use_street2_as_housenumber>0</use_street2_as_housenumber>
|
| 92 |
+
<block_postofficeboxaddresses>0</block_postofficeboxaddresses>
|
| 93 |
+
<never_hide_country>0</never_hide_country>
|
| 94 |
+
<admin_validation_disabled>0</admin_validation_disabled>
|
| 95 |
+
</advanced_config>
|
| 96 |
+
<development_config>
|
| 97 |
<api_url>https://api.postcode.nl</api_url>
|
|
|
|
| 98 |
<api_showcase>0</api_showcase>
|
| 99 |
<api_debug>0</api_debug>
|
| 100 |
+
</development_config>
|
| 101 |
+
</postcodenl_api>
|
| 102 |
</default>
|
| 103 |
</config>
|
app/code/community/PostcodeNl/Api/etc/system.xml
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<config>
|
| 3 |
<sections>
|
| 4 |
-
|
| 5 |
-
<postcodenl translate="label">
|
| 6 |
<label>Postcode.nl API</label>
|
| 7 |
<tab>sales</tab>
|
| 8 |
<frontend_type>text</frontend_type>
|
|
@@ -18,6 +17,7 @@
|
|
| 18 |
<show_in_default>1</show_in_default>
|
| 19 |
<show_in_website>1</show_in_website>
|
| 20 |
<show_in_store>1</show_in_store>
|
|
|
|
| 21 |
<fields>
|
| 22 |
<enabled translate="label">
|
| 23 |
<label>Enabled?</label>
|
|
@@ -28,15 +28,6 @@
|
|
| 28 |
<show_in_website>1</show_in_website>
|
| 29 |
<show_in_store>1</show_in_store>
|
| 30 |
</enabled>
|
| 31 |
-
<api_url translate="label">
|
| 32 |
-
<label>API URL</label>
|
| 33 |
-
<frontend_type>text</frontend_type>
|
| 34 |
-
<sort_order>20</sort_order>
|
| 35 |
-
<show_in_default>1</show_in_default>
|
| 36 |
-
<show_in_website>1</show_in_website>
|
| 37 |
-
<show_in_store>1</show_in_store>
|
| 38 |
-
<validate>validate-url</validate>
|
| 39 |
-
</api_url>
|
| 40 |
<api_key translate="label">
|
| 41 |
<label>API key</label>
|
| 42 |
<frontend_type>text</frontend_type>
|
|
@@ -44,6 +35,7 @@
|
|
| 44 |
<show_in_default>1</show_in_default>
|
| 45 |
<show_in_website>1</show_in_website>
|
| 46 |
<show_in_store>1</show_in_store>
|
|
|
|
| 47 |
</api_key>
|
| 48 |
<api_secret translate="label">
|
| 49 |
<label>API secret</label>
|
|
@@ -52,16 +44,28 @@
|
|
| 52 |
<show_in_default>1</show_in_default>
|
| 53 |
<show_in_website>1</show_in_website>
|
| 54 |
<show_in_store>1</show_in_store>
|
|
|
|
| 55 |
<comment>
|
| 56 |
<![CDATA[
|
| 57 |
To get your Postcode.nl API key and secret, please register at <a href="https://api.postcode.nl">Postcode.nl API</a>.
|
| 58 |
]]></comment>
|
| 59 |
</api_secret>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
<use_street2_as_housenumber translate="label">
|
| 61 |
<label>Separate housenumber</label>
|
| 62 |
<frontend_type>select</frontend_type>
|
| 63 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 64 |
-
<sort_order>
|
| 65 |
<show_in_default>1</show_in_default>
|
| 66 |
<show_in_website>1</show_in_website>
|
| 67 |
<show_in_store>1</show_in_store>
|
|
@@ -70,20 +74,66 @@
|
|
| 70 |
If you use the second 'street' field as a separate house-number field, enable this option.
|
| 71 |
]]></comment>
|
| 72 |
</use_street2_as_housenumber>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
<never_hide_country translate="label">
|
| 74 |
-
<label>
|
| 75 |
<frontend_type>select</frontend_type>
|
| 76 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 77 |
-
<sort_order>
|
| 78 |
<show_in_default>1</show_in_default>
|
| 79 |
<show_in_website>1</show_in_website>
|
| 80 |
<show_in_store>1</show_in_store>
|
| 81 |
<comment>
|
| 82 |
<![CDATA[
|
| 83 |
-
For webshops with a more international audience,
|
| 84 |
-
<b>Note</b>: If there are other fields next to the country selector, they will be disabled.
|
| 85 |
]]></comment>
|
| 86 |
</never_hide_country>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
<api_showcase translate="label">
|
| 88 |
<label>Enable API Showcase</label>
|
| 89 |
<frontend_type>select</frontend_type>
|
|
@@ -113,8 +163,8 @@
|
|
| 113 |
]]></comment>
|
| 114 |
</api_debug>
|
| 115 |
</fields>
|
| 116 |
-
</
|
| 117 |
</groups>
|
| 118 |
-
</
|
| 119 |
</sections>
|
| 120 |
</config>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<config>
|
| 3 |
<sections>
|
| 4 |
+
<postcodenl_api translate="label">
|
|
|
|
| 5 |
<label>Postcode.nl API</label>
|
| 6 |
<tab>sales</tab>
|
| 7 |
<frontend_type>text</frontend_type>
|
| 17 |
<show_in_default>1</show_in_default>
|
| 18 |
<show_in_website>1</show_in_website>
|
| 19 |
<show_in_store>1</show_in_store>
|
| 20 |
+
<expanded>1</expanded>
|
| 21 |
<fields>
|
| 22 |
<enabled translate="label">
|
| 23 |
<label>Enabled?</label>
|
| 28 |
<show_in_website>1</show_in_website>
|
| 29 |
<show_in_store>1</show_in_store>
|
| 30 |
</enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
<api_key translate="label">
|
| 32 |
<label>API key</label>
|
| 33 |
<frontend_type>text</frontend_type>
|
| 35 |
<show_in_default>1</show_in_default>
|
| 36 |
<show_in_website>1</show_in_website>
|
| 37 |
<show_in_store>1</show_in_store>
|
| 38 |
+
<validate>validate-length minimum-length-10</validate>
|
| 39 |
</api_key>
|
| 40 |
<api_secret translate="label">
|
| 41 |
<label>API secret</label>
|
| 44 |
<show_in_default>1</show_in_default>
|
| 45 |
<show_in_website>1</show_in_website>
|
| 46 |
<show_in_store>1</show_in_store>
|
| 47 |
+
<validate>validate-length minimum-length-10</validate>
|
| 48 |
<comment>
|
| 49 |
<![CDATA[
|
| 50 |
To get your Postcode.nl API key and secret, please register at <a href="https://api.postcode.nl">Postcode.nl API</a>.
|
| 51 |
]]></comment>
|
| 52 |
</api_secret>
|
| 53 |
+
</fields>
|
| 54 |
+
</config>
|
| 55 |
+
<advanced_config translate="label">
|
| 56 |
+
<label>Advanced configuration</label>
|
| 57 |
+
<frontend_type>text</frontend_type>
|
| 58 |
+
<sort_order>20</sort_order>
|
| 59 |
+
<show_in_default>1</show_in_default>
|
| 60 |
+
<show_in_website>1</show_in_website>
|
| 61 |
+
<show_in_store>1</show_in_store>
|
| 62 |
+
<fields>
|
| 63 |
+
<!-- Address options -->
|
| 64 |
<use_street2_as_housenumber translate="label">
|
| 65 |
<label>Separate housenumber</label>
|
| 66 |
<frontend_type>select</frontend_type>
|
| 67 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 68 |
+
<sort_order>10</sort_order>
|
| 69 |
<show_in_default>1</show_in_default>
|
| 70 |
<show_in_website>1</show_in_website>
|
| 71 |
<show_in_store>1</show_in_store>
|
| 74 |
If you use the second 'street' field as a separate house-number field, enable this option.
|
| 75 |
]]></comment>
|
| 76 |
</use_street2_as_housenumber>
|
| 77 |
+
<block_postofficeboxaddresses translate="label">
|
| 78 |
+
<label>Block post office box addresses</label>
|
| 79 |
+
<frontend_type>select</frontend_type>
|
| 80 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 81 |
+
<sort_order>20</sort_order>
|
| 82 |
+
<show_in_default>1</show_in_default>
|
| 83 |
+
<show_in_website>1</show_in_website>
|
| 84 |
+
<show_in_store>1</show_in_store>
|
| 85 |
+
<comment>
|
| 86 |
+
<![CDATA[
|
| 87 |
+
This will consider 'post office box' (postbus) addresses invalid for all validated address fields.<br />
|
| 88 |
+
<em>(though still allowed if address is added with 'manual' checkbox)</em>
|
| 89 |
+
]]></comment>
|
| 90 |
+
</block_postofficeboxaddresses>
|
| 91 |
<never_hide_country translate="label">
|
| 92 |
+
<label>Always show country selector</label>
|
| 93 |
<frontend_type>select</frontend_type>
|
| 94 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 95 |
+
<sort_order>30</sort_order>
|
| 96 |
<show_in_default>1</show_in_default>
|
| 97 |
<show_in_website>1</show_in_website>
|
| 98 |
<show_in_store>1</show_in_store>
|
| 99 |
<comment>
|
| 100 |
<![CDATA[
|
| 101 |
+
For webshops with a more international audience, always show the country selection box.<br />
|
| 102 |
+
<b>Developer Note</b>: If there are other fields next to the country selector, they will be disabled.
|
| 103 |
]]></comment>
|
| 104 |
</never_hide_country>
|
| 105 |
+
<admin_validation_disabled translate="label">
|
| 106 |
+
<label>Disable validation in admin</label>
|
| 107 |
+
<frontend_type>select</frontend_type>
|
| 108 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 109 |
+
<sort_order>40</sort_order>
|
| 110 |
+
<show_in_default>1</show_in_default>
|
| 111 |
+
<show_in_website>1</show_in_website>
|
| 112 |
+
<show_in_store>1</show_in_store>
|
| 113 |
+
<comment>
|
| 114 |
+
<![CDATA[
|
| 115 |
+
You can use this option if you encounter problems in the admin address validation, or want to allow all addresses in the admin.
|
| 116 |
+
]]></comment>
|
| 117 |
+
</admin_validation_disabled>
|
| 118 |
+
</fields>
|
| 119 |
+
</advanced_config>
|
| 120 |
+
<development_config translate="label">
|
| 121 |
+
<label>Development configuration</label>
|
| 122 |
+
<frontend_type>text</frontend_type>
|
| 123 |
+
<sort_order>30</sort_order>
|
| 124 |
+
<show_in_default>1</show_in_default>
|
| 125 |
+
<show_in_website>1</show_in_website>
|
| 126 |
+
<show_in_store>1</show_in_store>
|
| 127 |
+
<fields>
|
| 128 |
+
<api_url translate="label">
|
| 129 |
+
<label>API URL</label>
|
| 130 |
+
<frontend_type>text</frontend_type>
|
| 131 |
+
<sort_order>40</sort_order>
|
| 132 |
+
<show_in_default>1</show_in_default>
|
| 133 |
+
<show_in_website>1</show_in_website>
|
| 134 |
+
<show_in_store>1</show_in_store>
|
| 135 |
+
<validate>validate-url</validate>
|
| 136 |
+
</api_url>
|
| 137 |
<api_showcase translate="label">
|
| 138 |
<label>Enable API Showcase</label>
|
| 139 |
<frontend_type>select</frontend_type>
|
| 163 |
]]></comment>
|
| 164 |
</api_debug>
|
| 165 |
</fields>
|
| 166 |
+
</development_config>
|
| 167 |
</groups>
|
| 168 |
+
</postcodenl_api>
|
| 169 |
</sections>
|
| 170 |
</config>
|
app/design/adminhtml/default/default/layout/postcodenl/api/lookup.xml
CHANGED
|
@@ -2,38 +2,38 @@
|
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<adminhtml_sales_order_address>
|
| 4 |
<reference name="head">
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
</reference>
|
| 8 |
-
<reference name="content">
|
| 9 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 10 |
-
</reference>
|
| 11 |
</adminhtml_sales_order_address>
|
| 12 |
<adminhtml_sales_order_create_index>
|
| 13 |
<reference name="head">
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
</reference>
|
| 17 |
-
<reference name="js">
|
| 18 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 19 |
-
</reference>
|
| 20 |
</adminhtml_sales_order_create_index>
|
| 21 |
<adminhtml_sales_order_edit_index>
|
| 22 |
<reference name="head">
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
</reference>
|
| 26 |
-
<reference name="js">
|
| 27 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 28 |
-
</reference>
|
| 29 |
</adminhtml_sales_order_edit_index>
|
| 30 |
<adminhtml_customer_edit>
|
| 31 |
<reference name="head">
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
| 34 |
</reference>
|
| 35 |
-
<reference name="js">
|
| 36 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 37 |
-
</reference>
|
| 38 |
</adminhtml_customer_edit>
|
| 39 |
</layout>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<adminhtml_sales_order_address>
|
| 4 |
<reference name="head">
|
| 5 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 6 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 7 |
+
</reference>
|
| 8 |
+
<reference name="content">
|
| 9 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 10 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 11 |
</adminhtml_sales_order_address>
|
| 12 |
<adminhtml_sales_order_create_index>
|
| 13 |
<reference name="head">
|
| 14 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 15 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 16 |
+
</reference>
|
| 17 |
+
<reference name="js">
|
| 18 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 19 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 20 |
</adminhtml_sales_order_create_index>
|
| 21 |
<adminhtml_sales_order_edit_index>
|
| 22 |
<reference name="head">
|
| 23 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 24 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 25 |
+
</reference>
|
| 26 |
+
<reference name="js">
|
| 27 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 28 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 29 |
</adminhtml_sales_order_edit_index>
|
| 30 |
<adminhtml_customer_edit>
|
| 31 |
<reference name="head">
|
| 32 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 33 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 34 |
+
</reference>
|
| 35 |
+
<reference name="js">
|
| 36 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 37 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 38 |
</adminhtml_customer_edit>
|
| 39 |
</layout>
|
app/design/adminhtml/default/default/template/postcodenl/api/jsinit.phtml
CHANGED
|
@@ -1,35 +1 @@
|
|
| 1 |
-
|
| 2 |
-
//<![CDATA[
|
| 3 |
-
var PCNLAPI_CONFIG = {
|
| 4 |
-
baseUrl: "<?php echo htmlspecialchars(Mage::helper('adminhtml')->getUrl('*/pcnl/lookup', array('_secure' => true))) ?>",
|
| 5 |
-
showcase: <?php echo Mage::getStoreConfig('postcodenl/config/api_showcase') ? 'true' : 'false' ?>,
|
| 6 |
-
debug: <?php echo Mage::getStoreConfig('postcodenl/config/api_debug') ? 'true' : 'false' ?>,
|
| 7 |
-
useStreet2AsHouseNumber: <?php echo Mage::getStoreConfig('postcodenl/config/use_street2_as_housenumber') ? 'true' : 'false' ?>,
|
| 8 |
-
adminValidationDisabled: <?php echo Mage::getStoreConfig('postcodenl/config/admin_validation_disabled') ? 'true' : 'false' ?>,
|
| 9 |
-
neverHideCountry: <?php echo Mage::getStoreConfig('postcodenl/config/never_hide_country') ? 'true' : 'false' ?>,
|
| 10 |
-
translations: {
|
| 11 |
-
defaultError: "<?php echo htmlspecialchars($this->__('Unknown postcode + housenumber combination.')) ?>",
|
| 12 |
-
postcodeInputLabel: "<?php echo htmlspecialchars($this->__('Postcode (auto-validating)')) ?>",
|
| 13 |
-
postcodeInputTitle: "<?php echo htmlspecialchars($this->__('Postcode')) ?>",
|
| 14 |
-
houseNumberAdditionUnknown: "<?php echo htmlspecialchars($this->__('Housenumber addition `{addition}` is unknown.')) ?>",
|
| 15 |
-
houseNumberAdditionRequired: "<?php echo htmlspecialchars($this->__('Housenumber addition required.')) ?>",
|
| 16 |
-
houseNumberLabel: "<?php echo htmlspecialchars($this->__('Housenumber (auto-validating)')) ?>",
|
| 17 |
-
houseNumberTitle: "<?php echo htmlspecialchars($this->__('Housenumber')) ?>",
|
| 18 |
-
houseNumberAdditionLabel: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 19 |
-
houseNumberAdditionTitle: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 20 |
-
selectAddition: "<?php echo htmlspecialchars($this->__('Select...')) ?>",
|
| 21 |
-
noAdditionSelect: "<?php echo htmlspecialchars($this->__('No addition.')) ?>",
|
| 22 |
-
noAdditionSelectCustom: "<?php echo htmlspecialchars($this->__('`No addition`')) ?>",
|
| 23 |
-
additionSelectCustom: "<?php echo htmlspecialchars($this->__('`{addition}`')) ?>",
|
| 24 |
-
apiShowcase: "<?php echo htmlspecialchars($this->__('API Showcase')) ?>",
|
| 25 |
-
apiDebug: "<?php echo htmlspecialchars($this->__('API Debug')) ?>",
|
| 26 |
-
disabledText: "<?php echo htmlspecialchars($this->__('- disabled -')) ?>",
|
| 27 |
-
infoLabel: "<?php echo htmlspecialchars($this->__('Address validation')) ?>",
|
| 28 |
-
infoText: "<?php echo htmlspecialchars($this->__('Fill out your postcode and housenumber to auto-complete your address. You can also manually set your address information.')) ?>",
|
| 29 |
-
manualInputLabel: "<?php echo htmlspecialchars($this->__('Manual input')) ?>",
|
| 30 |
-
manualInputText: "<?php echo htmlspecialchars($this->__('Fill out address information manually')) ?>",
|
| 31 |
-
outputLabel: "<?php echo htmlspecialchars($this->__('Validated address')) ?>"
|
| 32 |
-
}
|
| 33 |
-
};
|
| 34 |
-
//]]>
|
| 35 |
-
</script>
|
| 1 |
+
<?php echo Mage::helper('postcodenl_api/data')->getJsinit(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/postcodenl/api/lookup.xml
CHANGED
|
@@ -1,118 +1,139 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<!-- Regular Magento Checkout, and other checkout modules which use the same page -->
|
|
|
|
| 4 |
<checkout_onepage_index>
|
| 5 |
<reference name="head">
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
</reference>
|
| 9 |
-
<reference name="content">
|
| 10 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 11 |
-
</reference>
|
| 12 |
</checkout_onepage_index>
|
| 13 |
<customer_address_form>
|
| 14 |
<reference name="head">
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
</reference>
|
| 18 |
-
<reference name="content">
|
| 19 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 20 |
-
</reference>
|
| 21 |
</customer_address_form>
|
| 22 |
<checkout_multishipping_register>
|
| 23 |
<reference name="head">
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
</reference>
|
| 27 |
-
<reference name="content">
|
| 28 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 29 |
-
</reference>
|
| 30 |
</checkout_multishipping_register>
|
| 31 |
<checkout_multishipping_address_newshipping>
|
| 32 |
<reference name="head">
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
| 35 |
</reference>
|
| 36 |
-
<reference name="content">
|
| 37 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 38 |
-
</reference>
|
| 39 |
</checkout_multishipping_address_newshipping>
|
| 40 |
<checkout_multishipping_address_editshipping>
|
| 41 |
<reference name="head">
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
</reference>
|
| 45 |
-
<reference name="content">
|
| 46 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 47 |
-
</reference>
|
| 48 |
</checkout_multishipping_address_editshipping>
|
| 49 |
<checkout_multishipping_address_editbilling>
|
| 50 |
<reference name="head">
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
| 53 |
</reference>
|
| 54 |
-
<reference name="content">
|
| 55 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 56 |
-
</reference>
|
| 57 |
</checkout_multishipping_address_editbilling>
|
| 58 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
| 59 |
<onestepcheckout_index_index>
|
| 60 |
<reference name="head">
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 63 |
</reference>
|
| 64 |
-
<reference name="content">
|
| 65 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 66 |
-
</reference>
|
| 67 |
</onestepcheckout_index_index>
|
| 68 |
<!-- For `GoMage LightCheckout` -->
|
| 69 |
<gomage_checkout_onepage_index>
|
| 70 |
<reference name="head">
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
| 73 |
</reference>
|
| 74 |
-
<reference name="content">
|
| 75 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 76 |
-
</reference>
|
| 77 |
</gomage_checkout_onepage_index>
|
| 78 |
<!-- For `Fire Checkout` 1.5 -->
|
| 79 |
<firecheckout_index_index>
|
| 80 |
<reference name="head">
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
| 83 |
</reference>
|
| 84 |
-
<reference name="content">
|
| 85 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 86 |
-
</reference>
|
| 87 |
</firecheckout_index_index>
|
| 88 |
<!-- For `Fire Checkout` 2.0 -->
|
| 89 |
<firecheckout_onepage_index>
|
| 90 |
<reference name="head">
|
| 91 |
-
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
| 93 |
</reference>
|
| 94 |
-
<reference name="content">
|
| 95 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 96 |
-
</reference>
|
| 97 |
</firecheckout_onepage_index>
|
| 98 |
-
<!-- For `FME One Step Checkout`
|
| 99 |
<checkout_onestep_index>
|
| 100 |
<reference name="head">
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
</reference>
|
| 104 |
-
<reference name="content">
|
| 105 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 106 |
-
</reference>
|
| 107 |
</checkout_onestep_index>
|
| 108 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
| 109 |
<onepagecheckout_index_index>
|
| 110 |
<reference name="head">
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
| 113 |
</reference>
|
| 114 |
-
<reference name="content">
|
| 115 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 116 |
-
</reference>
|
| 117 |
</onepagecheckout_index_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
</layout>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<!-- Regular Magento Checkout, and other checkout modules which use the same page -->
|
| 4 |
+
<!-- Also for: `J2T OneCheckout`, `Magento Templates - OnePage Magento Checkout`, `EcommerceTeam Easy Checkout 2`, `Quick One Page Checkout` -->
|
| 5 |
<checkout_onepage_index>
|
| 6 |
<reference name="head">
|
| 7 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 8 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 9 |
+
</reference>
|
| 10 |
+
<reference name="content">
|
| 11 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 12 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 13 |
</checkout_onepage_index>
|
| 14 |
<customer_address_form>
|
| 15 |
<reference name="head">
|
| 16 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 17 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 18 |
+
</reference>
|
| 19 |
+
<reference name="content">
|
| 20 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 21 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 22 |
</customer_address_form>
|
| 23 |
<checkout_multishipping_register>
|
| 24 |
<reference name="head">
|
| 25 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 26 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 27 |
+
</reference>
|
| 28 |
+
<reference name="content">
|
| 29 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 30 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 31 |
</checkout_multishipping_register>
|
| 32 |
<checkout_multishipping_address_newshipping>
|
| 33 |
<reference name="head">
|
| 34 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 35 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 36 |
+
</reference>
|
| 37 |
+
<reference name="content">
|
| 38 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 39 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 40 |
</checkout_multishipping_address_newshipping>
|
| 41 |
<checkout_multishipping_address_editshipping>
|
| 42 |
<reference name="head">
|
| 43 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 44 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 45 |
+
</reference>
|
| 46 |
+
<reference name="content">
|
| 47 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 48 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 49 |
</checkout_multishipping_address_editshipping>
|
| 50 |
<checkout_multishipping_address_editbilling>
|
| 51 |
<reference name="head">
|
| 52 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 53 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 54 |
+
</reference>
|
| 55 |
+
<reference name="content">
|
| 56 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 57 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 58 |
</checkout_multishipping_address_editbilling>
|
| 59 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
| 60 |
<onestepcheckout_index_index>
|
| 61 |
<reference name="head">
|
| 62 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 63 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 64 |
+
</reference>
|
| 65 |
+
<reference name="content">
|
| 66 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 67 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 68 |
</onestepcheckout_index_index>
|
| 69 |
<!-- For `GoMage LightCheckout` -->
|
| 70 |
<gomage_checkout_onepage_index>
|
| 71 |
<reference name="head">
|
| 72 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 73 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 74 |
+
</reference>
|
| 75 |
+
<reference name="content">
|
| 76 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 77 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 78 |
</gomage_checkout_onepage_index>
|
| 79 |
<!-- For `Fire Checkout` 1.5 -->
|
| 80 |
<firecheckout_index_index>
|
| 81 |
<reference name="head">
|
| 82 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 83 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 84 |
+
</reference>
|
| 85 |
+
<reference name="content">
|
| 86 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 87 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 88 |
</firecheckout_index_index>
|
| 89 |
<!-- For `Fire Checkout` 2.0 -->
|
| 90 |
<firecheckout_onepage_index>
|
| 91 |
<reference name="head">
|
| 92 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 93 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 94 |
+
</reference>
|
| 95 |
+
<reference name="content">
|
| 96 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 97 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 98 |
</firecheckout_onepage_index>
|
| 99 |
+
<!-- For `FME One Step Checkout`, `MageWorld One Step Checkout Pro`, `GrafischDirect One Step Checkout` -->
|
| 100 |
<checkout_onestep_index>
|
| 101 |
<reference name="head">
|
| 102 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 103 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 104 |
+
</reference>
|
| 105 |
+
<reference name="content">
|
| 106 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 107 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 108 |
</checkout_onestep_index>
|
| 109 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
| 110 |
<onepagecheckout_index_index>
|
| 111 |
<reference name="head">
|
| 112 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 113 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 114 |
+
</reference>
|
| 115 |
+
<reference name="content">
|
| 116 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 117 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 118 |
</onepagecheckout_index_index>
|
| 119 |
+
<!-- For `AheadWorks One Step Checkout` -->
|
| 120 |
+
<aw_onestepcheckout_index_index>
|
| 121 |
+
<reference name="head">
|
| 122 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 123 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 124 |
+
</reference>
|
| 125 |
+
<reference name="content">
|
| 126 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 127 |
+
</reference>
|
| 128 |
+
</aw_onestepcheckout_index_index>
|
| 129 |
+
<!-- For `Aitoc One Step Checkout Manager` -->
|
| 130 |
+
<aitcheckout_checkout_index>
|
| 131 |
+
<reference name="head">
|
| 132 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 133 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 134 |
+
</reference>
|
| 135 |
+
<reference name="content">
|
| 136 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 137 |
+
</reference>
|
| 138 |
+
</aitcheckout_checkout_index>
|
| 139 |
</layout>
|
app/design/frontend/base/default/template/postcodenl/api/jsinit.phtml
CHANGED
|
@@ -1,35 +1 @@
|
|
| 1 |
-
|
| 2 |
-
//<![CDATA[
|
| 3 |
-
var PCNLAPI_CONFIG = {
|
| 4 |
-
baseUrl: "<?php echo htmlspecialchars(Mage::getUrl('postcodenl/json', array('_secure' => true))) ?>",
|
| 5 |
-
showcase: <?php echo Mage::getStoreConfig('postcodenl/config/api_showcase') ? 'true' : 'false' ?>,
|
| 6 |
-
debug: <?php echo Mage::getStoreConfig('postcodenl/config/api_debug') ? 'true' : 'false' ?>,
|
| 7 |
-
useStreet2AsHouseNumber: <?php echo Mage::getStoreConfig('postcodenl/config/use_street2_as_housenumber') ? 'true' : 'false' ?>,
|
| 8 |
-
adminValidationDisabled: <?php echo Mage::getStoreConfig('postcodenl/config/admin_validation_disabled') ? 'true' : 'false' ?>,
|
| 9 |
-
neverHideCountry: <?php echo Mage::getStoreConfig('postcodenl/config/never_hide_country') ? 'true' : 'false' ?>,
|
| 10 |
-
translations: {
|
| 11 |
-
defaultError: "<?php echo htmlspecialchars($this->__('Unknown postcode + housenumber combination.')) ?>",
|
| 12 |
-
postcodeInputLabel: "<?php echo htmlspecialchars($this->__('Postcode')) ?>",
|
| 13 |
-
postcodeInputTitle: "<?php echo htmlspecialchars($this->__('Postcode')) ?>",
|
| 14 |
-
houseNumberAdditionUnknown: "<?php echo htmlspecialchars($this->__('Housenumber addition `{addition}` is unknown.')) ?>",
|
| 15 |
-
houseNumberAdditionRequired: "<?php echo htmlspecialchars($this->__('Housenumber addition required.')) ?>",
|
| 16 |
-
houseNumberLabel: "<?php echo htmlspecialchars($this->__('Housenumber')) ?>",
|
| 17 |
-
houseNumberTitle: "<?php echo htmlspecialchars($this->__('Housenumber')) ?>",
|
| 18 |
-
houseNumberAdditionLabel: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 19 |
-
houseNumberAdditionTitle: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 20 |
-
selectAddition: "<?php echo htmlspecialchars($this->__('Select...')) ?>",
|
| 21 |
-
noAdditionSelect: "<?php echo htmlspecialchars($this->__('No addition.')) ?>",
|
| 22 |
-
noAdditionSelectCustom: "<?php echo htmlspecialchars($this->__('`No addition`')) ?>",
|
| 23 |
-
additionSelectCustom: "<?php echo htmlspecialchars($this->__('`{addition}`')) ?>",
|
| 24 |
-
apiShowcase: "<?php echo htmlspecialchars($this->__('API Showcase')) ?>",
|
| 25 |
-
apiDebug: "<?php echo htmlspecialchars($this->__('API Debug')) ?>",
|
| 26 |
-
disabledText: "<?php echo htmlspecialchars($this->__('- disabled -')) ?>",
|
| 27 |
-
infoLabel: "<?php echo htmlspecialchars($this->__('Address validation')) ?>",
|
| 28 |
-
infoText: "<?php echo htmlspecialchars($this->__('Fill out your postcode and housenumber to auto-complete your address. You can also manually set your address information.')) ?>",
|
| 29 |
-
manualInputLabel: "<?php echo htmlspecialchars($this->__('Manual input')) ?>",
|
| 30 |
-
manualInputText: "<?php echo htmlspecialchars($this->__('Fill out address information manually')) ?>",
|
| 31 |
-
outputLabel: "<?php echo htmlspecialchars($this->__('Validated address')) ?>"
|
| 32 |
-
}
|
| 33 |
-
};
|
| 34 |
-
//]]>
|
| 35 |
-
</script>
|
| 1 |
+
<?php echo Mage::helper('postcodenl_api/data')->getJsinit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/layout/postcodenl/api/lookup.xml
CHANGED
|
@@ -1,108 +1,139 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<!-- Regular Magento Checkout, and other checkout modules which use the same page -->
|
|
|
|
| 4 |
<checkout_onepage_index>
|
| 5 |
<reference name="head">
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
</reference>
|
| 9 |
-
<reference name="content">
|
| 10 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 11 |
-
</reference>
|
| 12 |
</checkout_onepage_index>
|
| 13 |
<customer_address_form>
|
| 14 |
<reference name="head">
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
</reference>
|
| 18 |
-
<reference name="content">
|
| 19 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 20 |
-
</reference>
|
| 21 |
</customer_address_form>
|
| 22 |
<checkout_multishipping_register>
|
| 23 |
<reference name="head">
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
</reference>
|
| 27 |
-
<reference name="content">
|
| 28 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 29 |
-
</reference>
|
| 30 |
</checkout_multishipping_register>
|
| 31 |
<checkout_multishipping_address_newshipping>
|
| 32 |
<reference name="head">
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
| 35 |
</reference>
|
| 36 |
-
<reference name="content">
|
| 37 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 38 |
-
</reference>
|
| 39 |
</checkout_multishipping_address_newshipping>
|
| 40 |
<checkout_multishipping_address_editshipping>
|
| 41 |
<reference name="head">
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
</reference>
|
| 45 |
-
<reference name="content">
|
| 46 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 47 |
-
</reference>
|
| 48 |
</checkout_multishipping_address_editshipping>
|
| 49 |
<checkout_multishipping_address_editbilling>
|
| 50 |
<reference name="head">
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
| 53 |
</reference>
|
| 54 |
-
<reference name="content">
|
| 55 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 56 |
-
</reference>
|
| 57 |
</checkout_multishipping_address_editbilling>
|
| 58 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
| 59 |
<onestepcheckout_index_index>
|
| 60 |
<reference name="head">
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 63 |
</reference>
|
| 64 |
-
<reference name="content">
|
| 65 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 66 |
-
</reference>
|
| 67 |
</onestepcheckout_index_index>
|
| 68 |
<!-- For `GoMage LightCheckout` -->
|
| 69 |
<gomage_checkout_onepage_index>
|
| 70 |
<reference name="head">
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
| 73 |
</reference>
|
| 74 |
-
<reference name="content">
|
| 75 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 76 |
-
</reference>
|
| 77 |
</gomage_checkout_onepage_index>
|
| 78 |
-
<!-- For `Fire Checkout` -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
<firecheckout_onepage_index>
|
| 80 |
<reference name="head">
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
| 83 |
</reference>
|
| 84 |
-
<reference name="content">
|
| 85 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 86 |
-
</reference>
|
| 87 |
</firecheckout_onepage_index>
|
| 88 |
-
<!-- For `FME One Step Checkout` -->
|
| 89 |
<checkout_onestep_index>
|
| 90 |
<reference name="head">
|
| 91 |
-
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
| 93 |
</reference>
|
| 94 |
-
<reference name="content">
|
| 95 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 96 |
-
</reference>
|
| 97 |
</checkout_onestep_index>
|
| 98 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
| 99 |
<onepagecheckout_index_index>
|
| 100 |
<reference name="head">
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
</reference>
|
| 104 |
-
<reference name="content">
|
| 105 |
-
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 106 |
-
</reference>
|
| 107 |
</onepagecheckout_index_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
</layout>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
<!-- Regular Magento Checkout, and other checkout modules which use the same page -->
|
| 4 |
+
<!-- Also for: `J2T OneCheckout`, `Magento Templates - OnePage Magento Checkout`, `EcommerceTeam Easy Checkout 2`, `Quick One Page Checkout` -->
|
| 5 |
<checkout_onepage_index>
|
| 6 |
<reference name="head">
|
| 7 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 8 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 9 |
+
</reference>
|
| 10 |
+
<reference name="content">
|
| 11 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 12 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 13 |
</checkout_onepage_index>
|
| 14 |
<customer_address_form>
|
| 15 |
<reference name="head">
|
| 16 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 17 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 18 |
+
</reference>
|
| 19 |
+
<reference name="content">
|
| 20 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 21 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 22 |
</customer_address_form>
|
| 23 |
<checkout_multishipping_register>
|
| 24 |
<reference name="head">
|
| 25 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 26 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 27 |
+
</reference>
|
| 28 |
+
<reference name="content">
|
| 29 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 30 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 31 |
</checkout_multishipping_register>
|
| 32 |
<checkout_multishipping_address_newshipping>
|
| 33 |
<reference name="head">
|
| 34 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 35 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 36 |
+
</reference>
|
| 37 |
+
<reference name="content">
|
| 38 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 39 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 40 |
</checkout_multishipping_address_newshipping>
|
| 41 |
<checkout_multishipping_address_editshipping>
|
| 42 |
<reference name="head">
|
| 43 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 44 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 45 |
+
</reference>
|
| 46 |
+
<reference name="content">
|
| 47 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 48 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 49 |
</checkout_multishipping_address_editshipping>
|
| 50 |
<checkout_multishipping_address_editbilling>
|
| 51 |
<reference name="head">
|
| 52 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 53 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 54 |
+
</reference>
|
| 55 |
+
<reference name="content">
|
| 56 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 57 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 58 |
</checkout_multishipping_address_editbilling>
|
| 59 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
| 60 |
<onestepcheckout_index_index>
|
| 61 |
<reference name="head">
|
| 62 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 63 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 64 |
+
</reference>
|
| 65 |
+
<reference name="content">
|
| 66 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 67 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 68 |
</onestepcheckout_index_index>
|
| 69 |
<!-- For `GoMage LightCheckout` -->
|
| 70 |
<gomage_checkout_onepage_index>
|
| 71 |
<reference name="head">
|
| 72 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 73 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 74 |
+
</reference>
|
| 75 |
+
<reference name="content">
|
| 76 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 77 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 78 |
</gomage_checkout_onepage_index>
|
| 79 |
+
<!-- For `Fire Checkout` 1.5 -->
|
| 80 |
+
<firecheckout_index_index>
|
| 81 |
+
<reference name="head">
|
| 82 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 83 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 84 |
+
</reference>
|
| 85 |
+
<reference name="content">
|
| 86 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 87 |
+
</reference>
|
| 88 |
+
</firecheckout_index_index>
|
| 89 |
+
<!-- For `Fire Checkout` 2.0 -->
|
| 90 |
<firecheckout_onepage_index>
|
| 91 |
<reference name="head">
|
| 92 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 93 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 94 |
+
</reference>
|
| 95 |
+
<reference name="content">
|
| 96 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 97 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 98 |
</firecheckout_onepage_index>
|
| 99 |
+
<!-- For `FME One Step Checkout`, `MageWorld One Step Checkout Pro`, `GrafischDirect One Step Checkout` -->
|
| 100 |
<checkout_onestep_index>
|
| 101 |
<reference name="head">
|
| 102 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 103 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 104 |
+
</reference>
|
| 105 |
+
<reference name="content">
|
| 106 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 107 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 108 |
</checkout_onestep_index>
|
| 109 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
| 110 |
<onepagecheckout_index_index>
|
| 111 |
<reference name="head">
|
| 112 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 113 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 114 |
+
</reference>
|
| 115 |
+
<reference name="content">
|
| 116 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 117 |
</reference>
|
|
|
|
|
|
|
|
|
|
| 118 |
</onepagecheckout_index_index>
|
| 119 |
+
<!-- For `AheadWorks One Step Checkout` -->
|
| 120 |
+
<aw_onestepcheckout_index_index>
|
| 121 |
+
<reference name="head">
|
| 122 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 123 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 124 |
+
</reference>
|
| 125 |
+
<reference name="content">
|
| 126 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 127 |
+
</reference>
|
| 128 |
+
</aw_onestepcheckout_index_index>
|
| 129 |
+
<!-- For `Aitoc One Step Checkout Manager` -->
|
| 130 |
+
<aitcheckout_checkout_index>
|
| 131 |
+
<reference name="head">
|
| 132 |
+
<action method="addCss" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
| 133 |
+
<action method="addJs" ifconfig="postcodenl_api/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
| 134 |
+
</reference>
|
| 135 |
+
<reference name="content">
|
| 136 |
+
<block type="postcodenl_api/jsinit" name="postcodenl.jsinit" template="postcodenl/api/jsinit.phtml" />
|
| 137 |
+
</reference>
|
| 138 |
+
</aitcheckout_checkout_index>
|
| 139 |
</layout>
|
app/design/frontend/default/default/template/postcodenl/api/jsinit.phtml
CHANGED
|
@@ -1,35 +1 @@
|
|
| 1 |
-
|
| 2 |
-
//<![CDATA[
|
| 3 |
-
var PCNLAPI_CONFIG = {
|
| 4 |
-
baseUrl: "<?php echo htmlspecialchars(Mage::getUrl('postcodenl/json', array('_secure' => true))) ?>",
|
| 5 |
-
showcase: <?php echo Mage::getStoreConfig('postcodenl/config/api_showcase') ? 'true' : 'false' ?>,
|
| 6 |
-
debug: <?php echo Mage::getStoreConfig('postcodenl/config/api_debug') ? 'true' : 'false' ?>,
|
| 7 |
-
useStreet2AsHouseNumber: <?php echo Mage::getStoreConfig('postcodenl/config/use_street2_as_housenumber') ? 'true' : 'false' ?>,
|
| 8 |
-
adminValidationDisabled: <?php echo Mage::getStoreConfig('postcodenl/config/admin_validation_disabled') ? 'true' : 'false' ?>,
|
| 9 |
-
neverHideCountry: <?php echo Mage::getStoreConfig('postcodenl/config/never_hide_country') ? 'true' : 'false' ?>,
|
| 10 |
-
translations: {
|
| 11 |
-
defaultError: "<?php echo htmlspecialchars($this->__('Unknown postcode + housenumber combination.')) ?>",
|
| 12 |
-
postcodeInputLabel: "<?php echo htmlspecialchars($this->__('Postcode')) ?>",
|
| 13 |
-
postcodeInputTitle: "<?php echo htmlspecialchars($this->__('Postcode')) ?>",
|
| 14 |
-
houseNumberAdditionUnknown: "<?php echo htmlspecialchars($this->__('Housenumber addition `{addition}` is unknown.')) ?>",
|
| 15 |
-
houseNumberAdditionRequired: "<?php echo htmlspecialchars($this->__('Housenumber addition required.')) ?>",
|
| 16 |
-
houseNumberLabel: "<?php echo htmlspecialchars($this->__('Housenumber')) ?>",
|
| 17 |
-
houseNumberTitle: "<?php echo htmlspecialchars($this->__('Housenumber')) ?>",
|
| 18 |
-
houseNumberAdditionLabel: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 19 |
-
houseNumberAdditionTitle: "<?php echo htmlspecialchars($this->__('Housenumber addition')) ?>",
|
| 20 |
-
selectAddition: "<?php echo htmlspecialchars($this->__('Select...')) ?>",
|
| 21 |
-
noAdditionSelect: "<?php echo htmlspecialchars($this->__('No addition.')) ?>",
|
| 22 |
-
noAdditionSelectCustom: "<?php echo htmlspecialchars($this->__('`No addition`')) ?>",
|
| 23 |
-
additionSelectCustom: "<?php echo htmlspecialchars($this->__('`{addition}`')) ?>",
|
| 24 |
-
apiShowcase: "<?php echo htmlspecialchars($this->__('API Showcase')) ?>",
|
| 25 |
-
apiDebug: "<?php echo htmlspecialchars($this->__('API Debug')) ?>",
|
| 26 |
-
disabledText: "<?php echo htmlspecialchars($this->__('- disabled -')) ?>",
|
| 27 |
-
infoLabel: "<?php echo htmlspecialchars($this->__('Address validation')) ?>",
|
| 28 |
-
infoText: "<?php echo htmlspecialchars($this->__('Fill out your postcode and housenumber to auto-complete your address. You can also manually set your address information.')) ?>",
|
| 29 |
-
manualInputLabel: "<?php echo htmlspecialchars($this->__('Manual input')) ?>",
|
| 30 |
-
manualInputText: "<?php echo htmlspecialchars($this->__('Fill out address information manually')) ?>",
|
| 31 |
-
outputLabel: "<?php echo htmlspecialchars($this->__('Validated address')) ?>"
|
| 32 |
-
}
|
| 33 |
-
};
|
| 34 |
-
//]]>
|
| 35 |
-
</script>
|
| 1 |
+
<?php echo Mage::helper('postcodenl_api/data')->getJsinit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/en_US/PostcodeNl_Api.csv
CHANGED
|
@@ -7,7 +7,6 @@
|
|
| 7 |
"Validation unavailable, please use manual input.","Validation unavailable, please use manual input."
|
| 8 |
"Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL.","Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL."
|
| 9 |
"Postcode","Postcode"
|
| 10 |
-
"Postcode (auto-validating)","Postcode (auto-validating)"
|
| 11 |
"Housenumber","Housenumber"
|
| 12 |
"Houseno addition","Houseno addition"
|
| 13 |
"Housenumber addition","Housenumber addition"
|
|
@@ -26,3 +25,4 @@
|
|
| 26 |
"Validated address","Validated address"
|
| 27 |
"API Showcase","API Showcase"
|
| 28 |
"API Debug Info","API Debug Info"
|
|
|
| 7 |
"Validation unavailable, please use manual input.","Validation unavailable, please use manual input."
|
| 8 |
"Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL.","Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL."
|
| 9 |
"Postcode","Postcode"
|
|
|
|
| 10 |
"Housenumber","Housenumber"
|
| 11 |
"Houseno addition","Houseno addition"
|
| 12 |
"Housenumber addition","Housenumber addition"
|
| 25 |
"Validated address","Validated address"
|
| 26 |
"API Showcase","API Showcase"
|
| 27 |
"API Debug Info","API Debug Info"
|
| 28 |
+
"Post office box not allowed.","Post office box not allowed."
|
app/locale/nl_NL/PostcodeNl_Api.csv
CHANGED
|
@@ -7,7 +7,6 @@
|
|
| 7 |
"Validation unavailable, please use manual input.","Validatie onbereikbaar, gebruik de handmatige invoer."
|
| 8 |
"Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL.","Kan geen connectie maken naar Postcode.nl API: Server mist SSL (https) ondersteuning voor CURL."
|
| 9 |
"Postcode","Postcode"
|
| 10 |
-
"Postcode (auto-validating)","Postcode (automatisch validerend)"
|
| 11 |
"Housenumber","Huisnummer"
|
| 12 |
"Houseno addition","Huisnr toevoeging"
|
| 13 |
"Housenumber addition","Huisnummer toevoeging"
|
|
@@ -26,3 +25,4 @@
|
|
| 26 |
"Validated address","Gevalideerd adres"
|
| 27 |
"API Showcase","API Showcase"
|
| 28 |
"API Debug Info","API Debug Info"
|
|
|
| 7 |
"Validation unavailable, please use manual input.","Validatie onbereikbaar, gebruik de handmatige invoer."
|
| 8 |
"Cannot connect to Postcode.nl API: Server is missing SSL (https) support for CURL.","Kan geen connectie maken naar Postcode.nl API: Server mist SSL (https) ondersteuning voor CURL."
|
| 9 |
"Postcode","Postcode"
|
|
|
|
| 10 |
"Housenumber","Huisnummer"
|
| 11 |
"Houseno addition","Huisnr toevoeging"
|
| 12 |
"Housenumber addition","Huisnummer toevoeging"
|
| 25 |
"Validated address","Gevalideerd adres"
|
| 26 |
"API Showcase","API Showcase"
|
| 27 |
"API Debug Info","API Debug Info"
|
| 28 |
+
"Post office box not allowed.","Postbus niet toegestaan."
|
js/postcodenl/api/lookup.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
{
|
| 3 |
// If we have no configuration, do not do anything
|
| 4 |
if (typeof PCNLAPI_CONFIG == 'undefined')
|
|
@@ -12,17 +13,20 @@ document.observe("dom:loaded", function()
|
|
| 12 |
}
|
| 13 |
}
|
| 14 |
|
| 15 |
-
function pcnlFireEvent(element,event)
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
}
|
| 21 |
-
else{
|
| 22 |
-
// dispatch for firefox + others
|
| 23 |
var evt = document.createEvent("HTMLEvents");
|
| 24 |
-
evt.initEvent(event, true, true
|
| 25 |
return !element.dispatchEvent(evt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
}
|
| 28 |
|
|
@@ -89,6 +93,11 @@ document.observe("dom:loaded", function()
|
|
| 89 |
{
|
| 90 |
Validation.hideAdvice($(prefix +'postcode_input'), advice, 'invalid-postcode');
|
| 91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
if ($(prefix +'postcode_housenumber_addition'))
|
| 93 |
{
|
| 94 |
var additionAdvice = Validation.getAdvice('invalid-addition', $(prefix +'postcode_housenumber_addition'));
|
|
@@ -312,23 +321,27 @@ document.observe("dom:loaded", function()
|
|
| 312 |
if ($(prefix +'debug'))
|
| 313 |
$(prefix +'debug').remove();
|
| 314 |
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
if ($(prefix + street1).up(this.parentElementType))
|
| 318 |
{
|
| 319 |
-
if
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
else if (this.parentElementType == 'tr')
|
| 324 |
-
{
|
| 325 |
-
// We're probably in the admin
|
| 326 |
-
$(prefix + street1).up(this.parentElementType).insert({before: '<tr id="' + prefix + 'debug"><td class="label">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</label></td><td class="value"><h4 class="pcnl-debug">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</h4>'+ info + '</td></tr>'});
|
| 327 |
-
}
|
| 328 |
-
else
|
| 329 |
{
|
| 330 |
-
|
| 331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
}
|
| 333 |
}
|
| 334 |
}
|
|
@@ -407,6 +420,12 @@ document.observe("dom:loaded", function()
|
|
| 407 |
// Address has only one valid addition, and it is the 'no addition' option
|
| 408 |
this.removeHousenumberAddition(prefix);
|
| 409 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 410 |
}
|
| 411 |
else if (data.message !== undefined)
|
| 412 |
{
|
|
@@ -467,18 +486,13 @@ document.observe("dom:loaded", function()
|
|
| 467 |
|
| 468 |
this.parentElementType = 'tr';
|
| 469 |
|
| 470 |
-
if (PCNLAPI_CONFIG.adminValidationDisabled)
|
| 471 |
-
{
|
| 472 |
-
return;
|
| 473 |
-
}
|
| 474 |
-
|
| 475 |
$(prefix + street1).up('tr').insert({before: '<tr id="' + prefix + 'postcode_input:wrapper"><td class="label"><label for="' + prefix + 'postcode_input">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +' <span class="required">*</span></label></td><td class="value"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></td></tr><tr id="' + prefix + 'postcode_housenumber:wrapper"><td class="label"><label for="' + prefix + 'postcode_housenumber">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <span class="required">*</span></label></td><td class="value"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></td></tr>'});
|
| 476 |
$(prefix + street1).up('tr').insert({before: '<tr id="' + prefix + 'postcode_input:checkbox"><td class="label"><label for="' + prefix + 'postcode_input_checkbox"> '+ PCNLAPI_CONFIG.translations.manualInputLabel +' <span class="required">*</span></label></td><td class="value"><input type="checkbox" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox" /><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label></td></tr>'});
|
| 477 |
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 478 |
}
|
| 479 |
else if ($(document.body).hasClassName('onestepcheckout-index-index') && $('onestepcheckout-form'))
|
| 480 |
{
|
| 481 |
-
// Support for OneStepCheckout extension
|
| 482 |
|
| 483 |
if (!$(prefix +'postcode_input:info'))
|
| 484 |
{
|
|
@@ -498,16 +512,51 @@ document.observe("dom:loaded", function()
|
|
| 498 |
|
| 499 |
if (!$(prefix +'postcode_input:info'))
|
| 500 |
{
|
| 501 |
-
$(prefix + street1).up('li').insert({before:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
}
|
| 503 |
-
$(prefix + street1).up('li').insert({before:
|
| 504 |
-
'<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
if (!$(prefix +'postcode_input:checkbox'))
|
| 506 |
{
|
| 507 |
-
$(prefix + street1).up('li').insert({before:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 509 |
}
|
| 510 |
-
$(prefix + street1).up('li').insert({before:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
}
|
| 512 |
else if ($(document.body).hasClassName('onestepcheckout-index-index') && $('one-step-checkout-form'))
|
| 513 |
{
|
|
@@ -544,6 +593,182 @@ document.observe("dom:loaded", function()
|
|
| 544 |
}
|
| 545 |
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div class="input-box"><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 546 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 547 |
else if ($(document.body).hasClassName('checkout-onestep-index') && $('easycheckout-login-form'))
|
| 548 |
{
|
| 549 |
// GrafischDirect One Step Checkout
|
|
@@ -582,7 +807,7 @@ document.observe("dom:loaded", function()
|
|
| 582 |
{
|
| 583 |
// IWD Free One Page / Step Checkout
|
| 584 |
|
| 585 |
-
this.parentElementType = 'div.full, div.two_fields';
|
| 586 |
|
| 587 |
if (!$(prefix +'postcode_input:info'))
|
| 588 |
{
|
|
@@ -1022,4 +1247,7 @@ document.observe("dom:loaded", function()
|
|
| 1022 |
|
| 1023 |
// Add observers to address fields on page
|
| 1024 |
PostcodeNl_Api.addAddressCheckObservers();
|
| 1025 |
-
});
|
|
|
|
|
|
|
|
|
| 1 |
+
var PCNL_START_FUNCTION;
|
| 2 |
+
document.observe("dom:loaded", PCNL_START_FUNCTION = function()
|
| 3 |
{
|
| 4 |
// If we have no configuration, do not do anything
|
| 5 |
if (typeof PCNLAPI_CONFIG == 'undefined')
|
| 13 |
}
|
| 14 |
}
|
| 15 |
|
| 16 |
+
function pcnlFireEvent(element,event)
|
| 17 |
+
{
|
| 18 |
+
if (element.dispatchEvent)
|
| 19 |
+
{
|
| 20 |
+
// dispatch for chrome, firefox + others + IE 9+
|
|
|
|
|
|
|
|
|
|
| 21 |
var evt = document.createEvent("HTMLEvents");
|
| 22 |
+
evt.initEvent(event, true, true); // event type, bubbling, cancelable
|
| 23 |
return !element.dispatchEvent(evt);
|
| 24 |
+
}
|
| 25 |
+
else if (document.createEventObject)
|
| 26 |
+
{
|
| 27 |
+
// dispatch for IE 8-
|
| 28 |
+
var evt = document.createEventObject();
|
| 29 |
+
return element.fireEvent('on'+event, evt)
|
| 30 |
}
|
| 31 |
}
|
| 32 |
|
| 93 |
{
|
| 94 |
Validation.hideAdvice($(prefix +'postcode_input'), advice, 'invalid-postcode');
|
| 95 |
}
|
| 96 |
+
var advice = Validation.getAdvice('address-is-postofficebox', $(prefix +'postcode_input'));
|
| 97 |
+
if (advice)
|
| 98 |
+
{
|
| 99 |
+
Validation.hideAdvice($(prefix +'postcode_input'), advice, 'address-is-postofficebox');
|
| 100 |
+
}
|
| 101 |
if ($(prefix +'postcode_housenumber_addition'))
|
| 102 |
{
|
| 103 |
var additionAdvice = Validation.getAdvice('invalid-addition', $(prefix +'postcode_housenumber_addition'));
|
| 321 |
if ($(prefix +'debug'))
|
| 322 |
$(prefix +'debug').remove();
|
| 323 |
|
| 324 |
+
if (data.debugInfo !== undefined)
|
|
|
|
|
|
|
| 325 |
{
|
| 326 |
+
// It could be that we have no debug info, even if it is switched on
|
| 327 |
+
var info = this.getFieldListHtml(data.debugInfo, 'pcnl-debug');
|
| 328 |
+
|
| 329 |
+
if ($(prefix + street1).up(this.parentElementType))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
{
|
| 331 |
+
if (this.parentElementType == 'li')
|
| 332 |
+
{
|
| 333 |
+
$(prefix + street1).up(this.parentElementType).insert({before: '<li id="' + prefix +'debug" class="wide"><div class="input-box"><h4 class="pcnl-debug">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</h4>'+ info + '</div></li>'});
|
| 334 |
+
}
|
| 335 |
+
else if (this.parentElementType == 'tr')
|
| 336 |
+
{
|
| 337 |
+
// We're probably in the admin
|
| 338 |
+
$(prefix + street1).up(this.parentElementType).insert({before: '<tr id="' + prefix + 'debug"><td class="label">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</label></td><td class="value"><h4 class="pcnl-debug">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</h4>'+ info + '</td></tr>'});
|
| 339 |
+
}
|
| 340 |
+
else
|
| 341 |
+
{
|
| 342 |
+
// Assume 'div' elements
|
| 343 |
+
$(prefix + street1).up(this.parentElementType).insert({before: '<div id="' + prefix +'debug" class="full"><div class="input-box"><h4 class="pcnl-debug">'+ PCNLAPI_CONFIG.translations.apiDebug.escapeHTML() +'</h4>'+ info + '</div></div>'});
|
| 344 |
+
}
|
| 345 |
}
|
| 346 |
}
|
| 347 |
}
|
| 420 |
// Address has only one valid addition, and it is the 'no addition' option
|
| 421 |
this.removeHousenumberAddition(prefix);
|
| 422 |
}
|
| 423 |
+
|
| 424 |
+
if (data.street == 'Postbus' && PCNLAPI_CONFIG.blockPostOfficeBoxAddresses)
|
| 425 |
+
{
|
| 426 |
+
newAdvice = Validation.createAdvice('address-is-postofficebox', $(prefix + 'postcode_input'), false, PCNLAPI_CONFIG.translations.postOfficeBoxNotAllowed);
|
| 427 |
+
Validation.showAdvice($(prefix + postcodeFieldId), newAdvice, 'address-is-postofficebox');
|
| 428 |
+
}
|
| 429 |
}
|
| 430 |
else if (data.message !== undefined)
|
| 431 |
{
|
| 486 |
|
| 487 |
this.parentElementType = 'tr';
|
| 488 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 489 |
$(prefix + street1).up('tr').insert({before: '<tr id="' + prefix + 'postcode_input:wrapper"><td class="label"><label for="' + prefix + 'postcode_input">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +' <span class="required">*</span></label></td><td class="value"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></td></tr><tr id="' + prefix + 'postcode_housenumber:wrapper"><td class="label"><label for="' + prefix + 'postcode_housenumber">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <span class="required">*</span></label></td><td class="value"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></td></tr>'});
|
| 490 |
$(prefix + street1).up('tr').insert({before: '<tr id="' + prefix + 'postcode_input:checkbox"><td class="label"><label for="' + prefix + 'postcode_input_checkbox"> '+ PCNLAPI_CONFIG.translations.manualInputLabel +' <span class="required">*</span></label></td><td class="value"><input type="checkbox" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox" /><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label></td></tr>'});
|
| 491 |
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 492 |
}
|
| 493 |
else if ($(document.body).hasClassName('onestepcheckout-index-index') && $('onestepcheckout-form'))
|
| 494 |
{
|
| 495 |
+
// Support for OneStepCheckout.com extension
|
| 496 |
|
| 497 |
if (!$(prefix +'postcode_input:info'))
|
| 498 |
{
|
| 512 |
|
| 513 |
if (!$(prefix +'postcode_input:info'))
|
| 514 |
{
|
| 515 |
+
$(prefix + street1).up('li').insert({before:
|
| 516 |
+
'<li id="' + prefix + 'postcode_input:info">'+
|
| 517 |
+
'<div class="input-box">'+
|
| 518 |
+
'<label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label>'+
|
| 519 |
+
'<div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div>'+
|
| 520 |
+
'</div>'+
|
| 521 |
+
'</li>'
|
| 522 |
+
});
|
| 523 |
}
|
| 524 |
+
$(prefix + street1).up('li').insert({before:
|
| 525 |
+
'<li id="' + prefix + 'postcode_input:wrapper">'+
|
| 526 |
+
'<div class="pcnl-apptha-fields">'+
|
| 527 |
+
'<div class="field">'+
|
| 528 |
+
'<label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em>*</em></label>'+
|
| 529 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div>'+
|
| 530 |
+
'</div>'+
|
| 531 |
+
'<div class="field input-postcode pcnl-input-housenumber">'+
|
| 532 |
+
'<label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em>*</em></label>'+
|
| 533 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div>'+
|
| 534 |
+
'</div>'+
|
| 535 |
+
'</div>'+
|
| 536 |
+
'</li>'
|
| 537 |
+
});
|
| 538 |
if (!$(prefix +'postcode_input:checkbox'))
|
| 539 |
{
|
| 540 |
+
$(prefix + street1).up('li').insert({before:
|
| 541 |
+
'<li id="' + prefix + 'postcode_input:checkbox" class="pcnl-apptha-checkbox">'+
|
| 542 |
+
'<div class="field">'+
|
| 543 |
+
'<div class="input-box">'+
|
| 544 |
+
'<input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox" />'+
|
| 545 |
+
'<label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label>'+
|
| 546 |
+
'</div>'+
|
| 547 |
+
'</div>'+
|
| 548 |
+
'</li>'
|
| 549 |
+
});
|
| 550 |
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 551 |
}
|
| 552 |
+
$(prefix + street1).up('li').insert({before:
|
| 553 |
+
'<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field">'+
|
| 554 |
+
'<div class="input-box">'+
|
| 555 |
+
'<label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label>'+
|
| 556 |
+
'<div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div>'+
|
| 557 |
+
'</div>'+
|
| 558 |
+
'</li>'
|
| 559 |
+
});
|
| 560 |
}
|
| 561 |
else if ($(document.body).hasClassName('onestepcheckout-index-index') && $('one-step-checkout-form'))
|
| 562 |
{
|
| 593 |
}
|
| 594 |
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div class="input-box"><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 595 |
}
|
| 596 |
+
else if ($(document.body).hasClassName('checkout-onepage-index') && $('mw-osc-column-container'))
|
| 597 |
+
{
|
| 598 |
+
// Support for MageWorld One Step Checkout Pro
|
| 599 |
+
|
| 600 |
+
if (!$(prefix +'postcode_input:info'))
|
| 601 |
+
{
|
| 602 |
+
$(prefix + street1).up('li.fields').insert({before:
|
| 603 |
+
'<li id="' + prefix + 'postcode_input:info">'+
|
| 604 |
+
'<div class="input-box">'+
|
| 605 |
+
'<label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label>'+
|
| 606 |
+
'<div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div>'+
|
| 607 |
+
'</div>'+
|
| 608 |
+
'</li>'
|
| 609 |
+
});
|
| 610 |
+
}
|
| 611 |
+
$(prefix + street1).up('li.fields').insert({before:
|
| 612 |
+
'<li id="' + prefix + 'postcode_input:wrapper">'+
|
| 613 |
+
'<div>'+
|
| 614 |
+
'<div class="field">'+
|
| 615 |
+
'<label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em>*</em></label>'+
|
| 616 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div>'+
|
| 617 |
+
'</div>'+
|
| 618 |
+
'<div class="field input-postcode pcnl-input-housenumber">'+
|
| 619 |
+
'<label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em>*</em></label>'+
|
| 620 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div>'+
|
| 621 |
+
'</div>'+
|
| 622 |
+
'</div>'+
|
| 623 |
+
'</li>'
|
| 624 |
+
});
|
| 625 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 626 |
+
{
|
| 627 |
+
$(prefix + street1).up('li.fields').insert({before:
|
| 628 |
+
'<li id="' + prefix + 'postcode_input:checkbox">'+
|
| 629 |
+
'<div>'+
|
| 630 |
+
'<div class="input-box">'+
|
| 631 |
+
'<input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox" />'+
|
| 632 |
+
'<label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label>'+
|
| 633 |
+
'</div>'+
|
| 634 |
+
'</div>'+
|
| 635 |
+
'</li>'
|
| 636 |
+
});
|
| 637 |
+
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 638 |
+
}
|
| 639 |
+
$(prefix + street1).up('li.fields').insert({before:
|
| 640 |
+
'<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field">'+
|
| 641 |
+
'<div class="input-box">'+
|
| 642 |
+
'<label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label>'+
|
| 643 |
+
'<div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div>'+
|
| 644 |
+
'</div>'+
|
| 645 |
+
'</li>'
|
| 646 |
+
});
|
| 647 |
+
}
|
| 648 |
+
else if ($(document.body).hasClassName('aw-onestepcheckout-index-index'))
|
| 649 |
+
{
|
| 650 |
+
// Support for AheadWorks One Step Checkout
|
| 651 |
+
|
| 652 |
+
this.parentElementType = 'div.aw-onestepcheckout-general-form-field';
|
| 653 |
+
|
| 654 |
+
if (!$(prefix +'postcode_input:info'))
|
| 655 |
+
{
|
| 656 |
+
$(prefix + street1).up('div.aw-onestepcheckout-general-form-field').insert({before:
|
| 657 |
+
'<div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-wide" id="' + prefix + 'postcode_input:info">'+
|
| 658 |
+
'<label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label>'+
|
| 659 |
+
'<div class="input-box">'+
|
| 660 |
+
'<div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div>'+
|
| 661 |
+
'</div>'+
|
| 662 |
+
'<div style="clear:both;"></div>'+
|
| 663 |
+
'</div>'
|
| 664 |
+
});
|
| 665 |
+
}
|
| 666 |
+
|
| 667 |
+
$(prefix + street1).up('div.aw-onestepcheckout-general-form-field').insert({before:
|
| 668 |
+
'<div id="' + prefix + 'postcode_input:wrapper">'+
|
| 669 |
+
'<div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-left">'+
|
| 670 |
+
'<label for="' + prefix + 'postcode_input" class="required"><em>*</em>'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'</label>'+
|
| 671 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div>'+
|
| 672 |
+
'<div style="clear:both;"></div>'+
|
| 673 |
+
'</div>'+
|
| 674 |
+
'<div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-right input-postcode pcnl-input-housenumber">'+
|
| 675 |
+
'<label for="' + prefix + 'postcode_housenumber" class="required"><em>*</em>'+ PCNLAPI_CONFIG.translations.houseNumberLabel +'</label>'+
|
| 676 |
+
'<div class="input-box"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div>'+
|
| 677 |
+
'<div style="clear:both;"></div>'+
|
| 678 |
+
'</div>'+
|
| 679 |
+
'</div>'
|
| 680 |
+
});
|
| 681 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 682 |
+
{
|
| 683 |
+
$(prefix + street1).up('div.aw-onestepcheckout-general-form-field').insert({before:
|
| 684 |
+
'<div id="' + prefix + 'postcode_input:checkbox">'+
|
| 685 |
+
'<div class="aw-onestepcheckout-general-form-field">'+
|
| 686 |
+
'<div class="control">'+
|
| 687 |
+
'<input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox" />'+
|
| 688 |
+
'<label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label>'+
|
| 689 |
+
'</div>'+
|
| 690 |
+
'</div>'+
|
| 691 |
+
'<div style="clear:both;"></div>'+
|
| 692 |
+
'</div>'
|
| 693 |
+
});
|
| 694 |
+
$(prefix +'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 695 |
+
}
|
| 696 |
+
$(prefix + street1).up('div.aw-onestepcheckout-general-form-field').insert({before:
|
| 697 |
+
'<div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-wide" id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field">'+
|
| 698 |
+
'<div class="input-box">'+
|
| 699 |
+
'<label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label>'+
|
| 700 |
+
'<div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div>'+
|
| 701 |
+
'</div>'+
|
| 702 |
+
'</div>'
|
| 703 |
+
});
|
| 704 |
+
}
|
| 705 |
+
else if ($(document.body).hasClassName('checkout-onepage-index') && $('j2t-onecheckout-main'))
|
| 706 |
+
{
|
| 707 |
+
// Support for J2T OneCheckout
|
| 708 |
+
|
| 709 |
+
if (!$(prefix +'postcode_input:info'))
|
| 710 |
+
{
|
| 711 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:info" class="pcnl-info"><div><label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label><div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div></div></li>'});
|
| 712 |
+
}
|
| 713 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:wrapper" class="fields"><div class="field input-postcode"><label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div></div></div><div class="field input-postcode pcnl-input-housenumber"><label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div></div></div></li>'});
|
| 714 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 715 |
+
{
|
| 716 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:checkbox" class="control pcnl-manual-checkbox"><div class="fields"><div class="input-box"><input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox " /><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label></div></div></li>'});
|
| 717 |
+
|
| 718 |
+
$(prefix + 'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 719 |
+
}
|
| 720 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 721 |
+
}
|
| 722 |
+
else if ($(document.body).hasClassName('aitcheckout-checkout-index'))
|
| 723 |
+
{
|
| 724 |
+
// Support for Aitoc One Step Checkout Manager
|
| 725 |
+
|
| 726 |
+
if (!$(prefix +'postcode_input:info'))
|
| 727 |
+
{
|
| 728 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:info" class="pcnl-info"><div><label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label><div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div></div></li>'});
|
| 729 |
+
}
|
| 730 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:wrapper" class="fields"><div class="field compact input-postcode"><label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div></div></div><div class="field compact input-postcode pcnl-input-housenumber"><label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div></div></div></li>'});
|
| 731 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 732 |
+
{
|
| 733 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:checkbox" class="control pcnl-manual-checkbox"><div class="fields"><div class="input-box"><input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox " /><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label></div></div></li>'});
|
| 734 |
+
|
| 735 |
+
$(prefix + 'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 736 |
+
}
|
| 737 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 738 |
+
}
|
| 739 |
+
else if ($(document.body).hasClassName('checkout-onepage-index') && $('opc-billing'))
|
| 740 |
+
{
|
| 741 |
+
// Support for Magento Templates - OnePage Magento Checkout
|
| 742 |
+
|
| 743 |
+
if (!$(prefix +'postcode_input:info'))
|
| 744 |
+
{
|
| 745 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:info" class="pcnl-info"><div><label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label><div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div></div></li>'});
|
| 746 |
+
}
|
| 747 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:wrapper" class="fields"><div class="field input-postcode"><label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div></div></div><div class="field input-postcode pcnl-input-housenumber"><label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div></div></div></li>'});
|
| 748 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 749 |
+
{
|
| 750 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:checkbox" class="control pcnl-manual-checkbox"><div class="fields"><div class="input-box"><input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox " /><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label></div></div></li>'});
|
| 751 |
+
|
| 752 |
+
$(prefix + 'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 753 |
+
}
|
| 754 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 755 |
+
}
|
| 756 |
+
else if ($(document.body).hasClassName('checkout-onepage-index'))
|
| 757 |
+
{
|
| 758 |
+
// Support for EcommerceTeam Easy Checkout 2
|
| 759 |
+
|
| 760 |
+
if (!$(prefix +'postcode_input:info'))
|
| 761 |
+
{
|
| 762 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:info" class="pcnl-info"><div><label class="pcnl-info-label">'+ PCNLAPI_CONFIG.translations.infoLabel +'</label><div class="pcnl-info-text" id="' + prefix + 'postcode_input:info-text">'+ PCNLAPI_CONFIG.translations.infoText +'</div></div></li>'});
|
| 763 |
+
}
|
| 764 |
+
$(prefix + street1).up('li').insert({before: '<li id="' + prefix + 'postcode_input:wrapper" class="fields"><div class="field input-postcode"><label for="' + prefix + 'postcode_input" class="required">'+ PCNLAPI_CONFIG.translations.postcodeInputLabel +'<em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input" value="" class="input-text required-entry" /></div></div></div><div class="field input-postcode pcnl-input-housenumber"><label for="' + prefix + 'postcode_housenumber" class="required">'+ PCNLAPI_CONFIG.translations.houseNumberLabel +' <em class="required">*</em></label><div class="input-box"><div class="field-wrapper"><input type="text" title="'+ PCNLAPI_CONFIG.translations.houseNumberTitle +'" name="billing[postcode_housenumber]" id="' + prefix + 'postcode_housenumber" value="" class="input-text pcnl-input-text-half required-entry" /></div></div></div></li>'});
|
| 765 |
+
if (!$(prefix +'postcode_input:checkbox'))
|
| 766 |
+
{
|
| 767 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:checkbox" class="pcnl-manual-checkbox"><div class="field"><label for="' + prefix + 'postcode_input_checkbox">'+ PCNLAPI_CONFIG.translations.manualInputText +'</label><input type="checkbox" title="'+ PCNLAPI_CONFIG.translations.postcodeInputTitle +'" id="' + prefix + 'postcode_input_checkbox" value="" class="checkbox " /></div></li>'});
|
| 768 |
+
$(prefix + 'postcode_input_checkbox').observe('click', function () { pcnlapi.toggleCountryPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4); });
|
| 769 |
+
}
|
| 770 |
+
$(prefix + 'country_id').up('li').insert({before: '<li id="' + prefix + 'postcode_input:output" class="pcnl-hidden-field"><div><label>'+ PCNLAPI_CONFIG.translations.outputLabel +'</label><div id="' + prefix + 'postcode_output" class="pcnl-address-text"></div></div></li>'});
|
| 771 |
+
}
|
| 772 |
else if ($(document.body).hasClassName('checkout-onestep-index') && $('easycheckout-login-form'))
|
| 773 |
{
|
| 774 |
// GrafischDirect One Step Checkout
|
| 807 |
{
|
| 808 |
// IWD Free One Page / Step Checkout
|
| 809 |
|
| 810 |
+
this.parentElementType = 'div.full, div.two_fields, ul.pcnl-manual-checkbox';
|
| 811 |
|
| 812 |
if (!$(prefix +'postcode_input:info'))
|
| 813 |
{
|
| 1247 |
|
| 1248 |
// Add observers to address fields on page
|
| 1249 |
PostcodeNl_Api.addAddressCheckObservers();
|
| 1250 |
+
});
|
| 1251 |
+
|
| 1252 |
+
if (typeof PCNL_START != 'undefined')
|
| 1253 |
+
PCNL_START_FUNCTION();
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>PostcodeNl_Api</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Simplified BSD License</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -16,15 +16,23 @@
|
|
| 16 |

|
| 17 |
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>
|
| 18 |
<notes>Fixes:
|
| 19 |
-
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
<compatible/>
|
| 29 |
-
<dependencies
|
| 30 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>PostcodeNl_Api</name>
|
| 4 |
+
<version>1.1.0.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Simplified BSD License</license>
|
| 7 |
<channel>community</channel>
|
| 16 |

|
| 17 |
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>
|
| 18 |
<notes>Fixes:
|
| 19 |
+
- Compatibility changes for Magento CE 1.8.0.0+
|
| 20 |
+
- Compatibility with newer version of currently supported checkout extensions
|
| 21 |
+
- An interaction bug during checkout in Internet Explorer 9
|
| 22 |
+
Added provisional support for the following checkout modules:
|
| 23 |
+
- Aitoc One Step Checkout Manager
|
| 24 |
+
- AheadWorks One Step Checkout
|
| 25 |
+
- J2T OneCheckout
|
| 26 |
+
- MagentoTemplate OnePage Magento Checkout
|
| 27 |
+
- MageWorld One Step Checkout Pro
|
| 28 |
+
Features:
|
| 29 |
+
- Option to disallow post office box (postbus) addresses
|
| 30 |
+
- Option to disable checks in the admin
|
| 31 |
+
</notes>
|
| 32 |
+
<authors><author><name>Postcode.nl Technical Support</name><user>TechPostcodeNl</user><email>tech@postcode.nl</email></author></authors>
|
| 33 |
+
<date>2014-03-06</date>
|
| 34 |
+
<time>14:05:10</time>
|
| 35 |
+
<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="59b32c2a8c8f3e87a42acaa279b9df7d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PcnlController.php" hash="a72395c695188f3a1aff9eb7dba4091d"/></dir><file name="JsonController.php" hash="180f25dccbe40710fea4bbe2a4c4ee8a"/></dir><dir name="data"><dir name="postcodenl_api_setup"><file name="data-upgrade-1.0.8.0-1.1.0.0.php" hash="e0acdb124cf735198c021f0c827c82bc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a8dae6952821702a7902a53ed8e578c8"/><file name="config.xml" hash="33d0e39b20ea390421caedd21efd164d"/><file name="system.xml" hash="b92863ff806bd444125e4a829ecdc24c"/></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="default"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="b56041235234a124b4ea8cbe05fb252f"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="ff32e12bbc26e4414dd8ca76edc4ed0f"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><dir name="postcodenl"><dir name="api"><file name="lookup.xml" hash="b56041235234a124b4ea8cbe05fb252f"/></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="0f85a94e876ec148734c556d9cf363a3"/></dir><dir name="nl_NL"><file name="PostcodeNl_Api.csv" hash="51fa45866ef7461769058d9c83d21766"/></dir></target><target name="mageweb"><dir name="js"><dir name="postcodenl"><dir name="api"><file name="lookup.js" hash="6f12a35a3bf35faecc55c05d0dbbc82b"/></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="default"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="f23abfb704bdb0ea2656358c40d8adb4"/></dir><dir name="images"><file name="postcode-logo.png" hash="da02bc29be1057a0201e63f81ee4bd02"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="postcodenl"><dir name="api"><dir name="css"><file name="lookup.css" hash="4dba9d6229f4f6f6e08627bb2fe72785"/></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>
|
| 36 |
<compatible/>
|
| 37 |
+
<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>
|
| 38 |
</package>
|
skin/frontend/base/default/postcodenl/api/css/lookup.css
CHANGED
|
@@ -132,7 +132,15 @@ body.onestepcheckout-index-index #one-step-checkout-form .pcnl-info-text {
|
|
| 132 |
|
| 133 |
/* Apptha One Step Checkout */
|
| 134 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field {
|
| 135 |
-
margin-right:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
| 137 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox .field {
|
| 138 |
width: 250px !important
|
| 132 |
|
| 133 |
/* Apptha One Step Checkout */
|
| 134 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field {
|
| 135 |
+
margin-right: 8px;
|
| 136 |
+
float: left;
|
| 137 |
+
width: 120px !important;
|
| 138 |
+
}
|
| 139 |
+
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .pcnl-input-housenumber {
|
| 140 |
+
padding-left: 6px;
|
| 141 |
+
}
|
| 142 |
+
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field .input-text {
|
| 143 |
+
width: 120px !important;
|
| 144 |
}
|
| 145 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox .field {
|
| 146 |
width: 250px !important
|
skin/frontend/default/default/postcodenl/api/css/lookup.css
CHANGED
|
@@ -80,7 +80,7 @@ dl.pcnl-showcase dd, dl.pcnl-debug dd {
|
|
| 80 |
margin-left: 20px;
|
| 81 |
}
|
| 82 |
|
| 83 |
-
/* OneStepCheckout styling */
|
| 84 |
div.checkoutcontainer div.pcnl-input-housenumber {
|
| 85 |
width: 60%;
|
| 86 |
}
|
|
@@ -106,6 +106,11 @@ div.checkoutcontainer dl.pcnl-showcase iframe {
|
|
| 106 |
border: 1px solid grey;
|
| 107 |
}
|
| 108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
/* GoMage LightCheckout */
|
| 110 |
body.gomage-checkout-onepage-index dl.pcnl-debug {
|
| 111 |
width: 260px;
|
|
@@ -132,7 +137,15 @@ body.onestepcheckout-index-index #one-step-checkout-form .pcnl-info-text {
|
|
| 132 |
|
| 133 |
/* Apptha One Step Checkout */
|
| 134 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field {
|
| 135 |
-
margin-right:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
| 137 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox .field {
|
| 138 |
width: 250px !important
|
|
@@ -150,4 +163,3 @@ body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox label
|
|
| 150 |
body.onepagecheckout-index-index .pcnl-manual-checkbox {
|
| 151 |
clear: both; /* IE 7/9 fix */
|
| 152 |
}
|
| 153 |
-
|
| 80 |
margin-left: 20px;
|
| 81 |
}
|
| 82 |
|
| 83 |
+
/* OneStepCheckout(.com) styling */
|
| 84 |
div.checkoutcontainer div.pcnl-input-housenumber {
|
| 85 |
width: 60%;
|
| 86 |
}
|
| 106 |
border: 1px solid grey;
|
| 107 |
}
|
| 108 |
|
| 109 |
+
/* OneStepCheckout.com */
|
| 110 |
+
.onestepcheckout-index-index .group-select li .input-postcode .input-box {
|
| 111 |
+
width: auto;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
/* GoMage LightCheckout */
|
| 115 |
body.gomage-checkout-onepage-index dl.pcnl-debug {
|
| 116 |
width: 260px;
|
| 137 |
|
| 138 |
/* Apptha One Step Checkout */
|
| 139 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field {
|
| 140 |
+
margin-right: 8px;
|
| 141 |
+
float: left;
|
| 142 |
+
width: 120px !important;
|
| 143 |
+
}
|
| 144 |
+
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .pcnl-input-housenumber {
|
| 145 |
+
padding-left: 6px;
|
| 146 |
+
}
|
| 147 |
+
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-fields .field .input-text {
|
| 148 |
+
width: 120px !important;
|
| 149 |
}
|
| 150 |
body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox .field {
|
| 151 |
width: 250px !important
|
| 163 |
body.onepagecheckout-index-index .pcnl-manual-checkbox {
|
| 164 |
clear: both; /* IE 7/9 fix */
|
| 165 |
}
|
|
|
