Version Notes
Changes:
- Improved housenumber/addition splitting
- Fixed compatibility with MageGo LightCheckout
Download this release
Release Info
Developer | Magento Core Team |
Extension | PostcodeNl_Api |
Version | 1.0.6.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.6.3 to 1.0.6.4
- app/code/community/PostcodeNl/Api/controllers/Adminhtml/PcnlController.php +1 -1
- app/code/community/PostcodeNl/Api/etc/adminhtml.xml +26 -0
- app/code/community/PostcodeNl/Api/etc/config.xml +19 -40
- app/code/community/PostcodeNl/Api/etc/system.xml +105 -104
- app/design/adminhtml/default/default/layout/postcodenl/api/lookup.xml +4 -4
- app/design/frontend/base/default/layout/postcodenl/api/lookup.xml +12 -12
- app/design/frontend/default/default/layout/postcodenl/api/lookup.xml +11 -11
- js/postcodenl/api/lookup.js +25 -18
- package.xml +6 -5
- skin/frontend/base/default/postcodenl/api/css/lookup.css +4 -0
- skin/frontend/default/default/postcodenl/api/css/lookup.css +5 -0
app/code/community/PostcodeNl/Api/controllers/Adminhtml/PcnlController.php
CHANGED
@@ -6,6 +6,6 @@ class PostcodeNl_Api_Adminhtml_PcnlController extends Mage_Adminhtml_Controller_
|
|
6 |
$helper = new PostcodeNl_Api_Helper_Data();
|
7 |
|
8 |
$this->getResponse()->setHeader('Content-type', 'application/json');
|
9 |
-
|
10 |
}
|
11 |
}
|
6 |
$helper = new PostcodeNl_Api_Helper_Data();
|
7 |
|
8 |
$this->getResponse()->setHeader('Content-type', 'application/json');
|
9 |
+
$this->getResponse()->setBody(json_encode($helper->lookupAddress($_GET['postcode'], $_GET['houseNumber'], $_GET['houseNumberAddition'])));
|
10 |
}
|
11 |
}
|
app/code/community/PostcodeNl/Api/etc/adminhtml.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<all>
|
5 |
+
<title>Allow Everything</title>
|
6 |
+
</all>
|
7 |
+
<resources>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<!-- Note: Config name is 'postcode' instead of 'postcode_api' -->
|
15 |
+
<postcodenl translate="title" module="PostcodeNl_Api">
|
16 |
+
<title>Postcode.nl API</title>
|
17 |
+
</postcodenl>
|
18 |
+
</children>
|
19 |
+
</config>
|
20 |
+
</children>
|
21 |
+
</system>
|
22 |
+
</children>
|
23 |
+
</admin>
|
24 |
+
</resources>
|
25 |
+
</acl>
|
26 |
+
</config>
|
app/code/community/PostcodeNl/Api/etc/config.xml
CHANGED
@@ -2,33 +2,33 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PostcodeNl_Api>
|
5 |
-
<version>1.0.6.
|
6 |
</PostcodeNl_Api>
|
7 |
</modules>
|
8 |
<frontend>
|
9 |
<routers>
|
10 |
-
<
|
11 |
<use>standard</use>
|
12 |
<args>
|
13 |
<module>PostcodeNl_Api</module>
|
14 |
<frontName>postcodenl</frontName>
|
15 |
</args>
|
16 |
-
</
|
17 |
</routers>
|
18 |
<layout>
|
19 |
<updates>
|
20 |
-
<
|
21 |
<file>postcodenl/api/lookup.xml</file>
|
22 |
-
</
|
23 |
</updates>
|
24 |
</layout>
|
25 |
<translate>
|
26 |
<modules>
|
27 |
-
<
|
28 |
<files>
|
29 |
<default>PostcodeNl_Api.csv</default>
|
30 |
</files>
|
31 |
-
</
|
32 |
</modules>
|
33 |
</translate>
|
34 |
</frontend>
|
@@ -36,8 +36,8 @@
|
|
36 |
<routers>
|
37 |
<adminhtml>
|
38 |
<args>
|
39 |
-
|
40 |
-
|
41 |
</modules>
|
42 |
</args>
|
43 |
</adminhtml>
|
@@ -45,57 +45,36 @@
|
|
45 |
</admin>
|
46 |
<global>
|
47 |
<helpers>
|
48 |
-
<
|
49 |
<class>PostcodeNl_Api_Helper</class>
|
50 |
-
</
|
51 |
</helpers>
|
52 |
<blocks>
|
53 |
-
<
|
54 |
-
|
55 |
-
</
|
56 |
</blocks>
|
57 |
</global>
|
58 |
<adminhtml>
|
59 |
-
<acl>
|
60 |
-
<all>
|
61 |
-
<title>Allow Everything</title>
|
62 |
-
</all>
|
63 |
-
<resources>
|
64 |
-
<admin>
|
65 |
-
<children>
|
66 |
-
<system>
|
67 |
-
<children>
|
68 |
-
<config>
|
69 |
-
<children>
|
70 |
-
<postcodenl translate="title" module="postcodenl">
|
71 |
-
<title>Postcode.nl API</title>
|
72 |
-
</postcodenl>
|
73 |
-
</children>
|
74 |
-
</config>
|
75 |
-
</children>
|
76 |
-
</system>
|
77 |
-
</children>
|
78 |
-
</admin>
|
79 |
-
</resources>
|
80 |
-
</acl>
|
81 |
<layout>
|
82 |
<updates>
|
83 |
-
<
|
84 |
<file>postcodenl/api/lookup.xml</file>
|
85 |
-
</
|
86 |
</updates>
|
87 |
</layout>
|
88 |
<translate>
|
89 |
<modules>
|
90 |
-
<
|
91 |
<files>
|
92 |
<default>PostcodeNl_Api.csv</default>
|
93 |
</files>
|
94 |
-
</
|
95 |
</modules>
|
96 |
</translate>
|
97 |
</adminhtml>
|
98 |
<default>
|
|
|
99 |
<postcodenl>
|
100 |
<config>
|
101 |
<enabled>1</enabled>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PostcodeNl_Api>
|
5 |
+
<version>1.0.6.4</version>
|
6 |
</PostcodeNl_Api>
|
7 |
</modules>
|
8 |
<frontend>
|
9 |
<routers>
|
10 |
+
<postcodenl_api>
|
11 |
<use>standard</use>
|
12 |
<args>
|
13 |
<module>PostcodeNl_Api</module>
|
14 |
<frontName>postcodenl</frontName>
|
15 |
</args>
|
16 |
+
</postcodenl_api>
|
17 |
</routers>
|
18 |
<layout>
|
19 |
<updates>
|
20 |
+
<postcodenl_api>
|
21 |
<file>postcodenl/api/lookup.xml</file>
|
22 |
+
</postcodenl_api>
|
23 |
</updates>
|
24 |
</layout>
|
25 |
<translate>
|
26 |
<modules>
|
27 |
+
<postcodenl_api>
|
28 |
<files>
|
29 |
<default>PostcodeNl_Api.csv</default>
|
30 |
</files>
|
31 |
+
</postcodenl_api>
|
32 |
</modules>
|
33 |
</translate>
|
34 |
</frontend>
|
36 |
<routers>
|
37 |
<adminhtml>
|
38 |
<args>
|
39 |
+
<modules>
|
40 |
+
<postcodenl before="Mage_Adminhtml">PostcodeNl_Api_Adminhtml</postcodenl>
|
41 |
</modules>
|
42 |
</args>
|
43 |
</adminhtml>
|
45 |
</admin>
|
46 |
<global>
|
47 |
<helpers>
|
48 |
+
<postcodenl_api>
|
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 |
</global>
|
58 |
<adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<layout>
|
60 |
<updates>
|
61 |
+
<postcodenl_api>
|
62 |
<file>postcodenl/api/lookup.xml</file>
|
63 |
+
</postcodenl_api>
|
64 |
</updates>
|
65 |
</layout>
|
66 |
<translate>
|
67 |
<modules>
|
68 |
+
<postcodenl_api>
|
69 |
<files>
|
70 |
<default>PostcodeNl_Api.csv</default>
|
71 |
</files>
|
72 |
+
</postcodenl_api>
|
73 |
</modules>
|
74 |
</translate>
|
75 |
</adminhtml>
|
76 |
<default>
|
77 |
+
<!-- Note: Config name is 'postcode' instead of 'postcode_api' -->
|
78 |
<postcodenl>
|
79 |
<config>
|
80 |
<enabled>1</enabled>
|
app/code/community/PostcodeNl/Api/etc/system.xml
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<sections>
|
4 |
-
|
|
|
5 |
<label>Postcode.nl API</label>
|
6 |
<tab>sales</tab>
|
7 |
<frontend_type>text</frontend_type>
|
@@ -10,109 +11,109 @@
|
|
10 |
<show_in_website>1</show_in_website>
|
11 |
<show_in_store>1</show_in_store>
|
12 |
<groups>
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
</groups>
|
117 |
</postcodenl>
|
118 |
</sections>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<sections>
|
4 |
+
<!-- Note: Config name is 'postcode' instead of 'postcode_api' -->
|
5 |
+
<postcodenl translate="label">
|
6 |
<label>Postcode.nl API</label>
|
7 |
<tab>sales</tab>
|
8 |
<frontend_type>text</frontend_type>
|
11 |
<show_in_website>1</show_in_website>
|
12 |
<show_in_store>1</show_in_store>
|
13 |
<groups>
|
14 |
+
<config translate="label">
|
15 |
+
<label>Configuration</label>
|
16 |
+
<frontend_type>text</frontend_type>
|
17 |
+
<sort_order>10</sort_order>
|
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>
|
24 |
+
<frontend_type>select</frontend_type>
|
25 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
26 |
+
<sort_order>10</sort_order>
|
27 |
+
<show_in_default>1</show_in_default>
|
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>
|
43 |
+
<sort_order>30</sort_order>
|
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>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<sort_order>40</sort_order>
|
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>45</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>
|
68 |
+
<comment>
|
69 |
+
<![CDATA[
|
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>Never hide country selector</label>
|
75 |
+
<frontend_type>select</frontend_type>
|
76 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
77 |
+
<sort_order>47</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, do not hide the country selector when in validation mode.
|
84 |
+
<b>Note</b>: This only works for checkout pages / extensions, which have the country selector in a seperate row. (does not work with the default Magento checkout page)
|
85 |
+
]]></comment>
|
86 |
+
</never_hide_country>
|
87 |
+
<api_showcase translate="label">
|
88 |
+
<label>Enable API Showcase</label>
|
89 |
+
<frontend_type>select</frontend_type>
|
90 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
91 |
+
<sort_order>50</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
<comment>
|
96 |
+
<![CDATA[
|
97 |
+
By enabling this option, you will see what additional information the Postcode.nl API has to offer, every time your information is enriched.<br />
|
98 |
+
<em>(this is not recommended in production environments!)</em>
|
99 |
+
]]></comment>
|
100 |
+
</api_showcase>
|
101 |
+
<api_debug translate="label">
|
102 |
+
<label>Show API Debug info</label>
|
103 |
+
<frontend_type>select</frontend_type>
|
104 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
105 |
+
<sort_order>60</sort_order>
|
106 |
+
<show_in_default>1</show_in_default>
|
107 |
+
<show_in_website>1</show_in_website>
|
108 |
+
<show_in_store>1</show_in_store>
|
109 |
+
<comment>
|
110 |
+
<![CDATA[
|
111 |
+
Additional debug information used for trouble-shooting will be sent by the Postcode.nl API extension.<br />
|
112 |
+
<em>(this is not recommended in production environments!)</em>
|
113 |
+
]]></comment>
|
114 |
+
</api_debug>
|
115 |
+
</fields>
|
116 |
+
</config>
|
117 |
</groups>
|
118 |
</postcodenl>
|
119 |
</sections>
|
app/design/adminhtml/default/default/layout/postcodenl/api/lookup.xml
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
7 |
</reference>
|
8 |
<reference name="content">
|
9 |
-
<block type="
|
10 |
</reference>
|
11 |
</adminhtml_sales_order_address>
|
12 |
<adminhtml_sales_order_create_index>
|
@@ -15,7 +15,7 @@
|
|
15 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
16 |
</reference>
|
17 |
<reference name="js">
|
18 |
-
<block type="
|
19 |
</reference>
|
20 |
</adminhtml_sales_order_create_index>
|
21 |
<adminhtml_sales_order_edit_index>
|
@@ -24,7 +24,7 @@
|
|
24 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
25 |
</reference>
|
26 |
<reference name="js">
|
27 |
-
<block type="
|
28 |
</reference>
|
29 |
</adminhtml_sales_order_edit_index>
|
30 |
<adminhtml_customer_edit>
|
@@ -33,7 +33,7 @@
|
|
33 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
34 |
</reference>
|
35 |
<reference name="js">
|
36 |
-
<block type="
|
37 |
</reference>
|
38 |
</adminhtml_customer_edit>
|
39 |
</layout>
|
6 |
<action method="addJs" ifconfig="postcodenl/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>
|
15 |
<action method="addJs" ifconfig="postcodenl/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>
|
24 |
<action method="addJs" ifconfig="postcodenl/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>
|
33 |
<action method="addJs" ifconfig="postcodenl/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/frontend/base/default/layout/postcodenl/api/lookup.xml
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
8 |
</reference>
|
9 |
<reference name="content">
|
10 |
-
<block type="
|
11 |
</reference>
|
12 |
</checkout_onepage_index>
|
13 |
<customer_address_form>
|
@@ -16,7 +16,7 @@
|
|
16 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
17 |
</reference>
|
18 |
<reference name="content">
|
19 |
-
<block type="
|
20 |
</reference>
|
21 |
</customer_address_form>
|
22 |
<checkout_multishipping_register>
|
@@ -25,7 +25,7 @@
|
|
25 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
26 |
</reference>
|
27 |
<reference name="content">
|
28 |
-
<block type="
|
29 |
</reference>
|
30 |
</checkout_multishipping_register>
|
31 |
<checkout_multishipping_address_newshipping>
|
@@ -34,7 +34,7 @@
|
|
34 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
35 |
</reference>
|
36 |
<reference name="content">
|
37 |
-
<block type="
|
38 |
</reference>
|
39 |
</checkout_multishipping_address_newshipping>
|
40 |
<checkout_multishipping_address_editshipping>
|
@@ -43,7 +43,7 @@
|
|
43 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
44 |
</reference>
|
45 |
<reference name="content">
|
46 |
-
<block type="
|
47 |
</reference>
|
48 |
</checkout_multishipping_address_editshipping>
|
49 |
<checkout_multishipping_address_editbilling>
|
@@ -52,7 +52,7 @@
|
|
52 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
53 |
</reference>
|
54 |
<reference name="content">
|
55 |
-
<block type="
|
56 |
</reference>
|
57 |
</checkout_multishipping_address_editbilling>
|
58 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
@@ -62,7 +62,7 @@
|
|
62 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
63 |
</reference>
|
64 |
<reference name="content">
|
65 |
-
<block type="
|
66 |
</reference>
|
67 |
</onestepcheckout_index_index>
|
68 |
<!-- For `GoMage LightCheckout` -->
|
@@ -72,7 +72,7 @@
|
|
72 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
73 |
</reference>
|
74 |
<reference name="content">
|
75 |
-
<block type="
|
76 |
</reference>
|
77 |
</gomage_checkout_onepage_index>
|
78 |
<!-- For `Fire Checkout` -->
|
@@ -82,17 +82,17 @@
|
|
82 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
83 |
</reference>
|
84 |
<reference name="content">
|
85 |
-
<block type="
|
86 |
</reference>
|
87 |
</firecheckout_onepage_index>
|
88 |
-
<!-- For `FME One Step Checkout` -->
|
89 |
<checkout_onestep_index>
|
90 |
<reference name="head">
|
91 |
<action method="addCss" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
92 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
93 |
</reference>
|
94 |
<reference name="content">
|
95 |
-
<block type="
|
96 |
</reference>
|
97 |
</checkout_onestep_index>
|
98 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
@@ -102,7 +102,7 @@
|
|
102 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
103 |
</reference>
|
104 |
<reference name="content">
|
105 |
-
<block type="
|
106 |
</reference>
|
107 |
</onepagecheckout_index_index>
|
108 |
</layout>
|
7 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
16 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
25 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
34 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
43 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
52 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
62 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
72 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
82 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` and `GrafischDirect One Step Checkout` -->
|
89 |
<checkout_onestep_index>
|
90 |
<reference name="head">
|
91 |
<action method="addCss" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/css/lookup.css</script></action>
|
92 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
102 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
app/design/frontend/default/default/layout/postcodenl/api/lookup.xml
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
8 |
</reference>
|
9 |
<reference name="content">
|
10 |
-
<block type="
|
11 |
</reference>
|
12 |
</checkout_onepage_index>
|
13 |
<customer_address_form>
|
@@ -16,7 +16,7 @@
|
|
16 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
17 |
</reference>
|
18 |
<reference name="content">
|
19 |
-
<block type="
|
20 |
</reference>
|
21 |
</customer_address_form>
|
22 |
<checkout_multishipping_register>
|
@@ -25,7 +25,7 @@
|
|
25 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
26 |
</reference>
|
27 |
<reference name="content">
|
28 |
-
<block type="
|
29 |
</reference>
|
30 |
</checkout_multishipping_register>
|
31 |
<checkout_multishipping_address_newshipping>
|
@@ -34,7 +34,7 @@
|
|
34 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
35 |
</reference>
|
36 |
<reference name="content">
|
37 |
-
<block type="
|
38 |
</reference>
|
39 |
</checkout_multishipping_address_newshipping>
|
40 |
<checkout_multishipping_address_editshipping>
|
@@ -43,7 +43,7 @@
|
|
43 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
44 |
</reference>
|
45 |
<reference name="content">
|
46 |
-
<block type="
|
47 |
</reference>
|
48 |
</checkout_multishipping_address_editshipping>
|
49 |
<checkout_multishipping_address_editbilling>
|
@@ -52,7 +52,7 @@
|
|
52 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
53 |
</reference>
|
54 |
<reference name="content">
|
55 |
-
<block type="
|
56 |
</reference>
|
57 |
</checkout_multishipping_address_editbilling>
|
58 |
<!-- Used for `OneStepCheckout(.com)`, but also for `MageStore One Step Checkout` and `Apptha One Step Checkout` -->
|
@@ -62,7 +62,7 @@
|
|
62 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
63 |
</reference>
|
64 |
<reference name="content">
|
65 |
-
<block type="
|
66 |
</reference>
|
67 |
</onestepcheckout_index_index>
|
68 |
<!-- For `GoMage LightCheckout` -->
|
@@ -72,7 +72,7 @@
|
|
72 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
73 |
</reference>
|
74 |
<reference name="content">
|
75 |
-
<block type="
|
76 |
</reference>
|
77 |
</gomage_checkout_onepage_index>
|
78 |
<!-- For `Fire Checkout` -->
|
@@ -82,7 +82,7 @@
|
|
82 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
83 |
</reference>
|
84 |
<reference name="content">
|
85 |
-
<block type="
|
86 |
</reference>
|
87 |
</firecheckout_onepage_index>
|
88 |
<!-- For `FME One Step Checkout` -->
|
@@ -92,7 +92,7 @@
|
|
92 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
93 |
</reference>
|
94 |
<reference name="content">
|
95 |
-
<block type="
|
96 |
</reference>
|
97 |
</checkout_onestep_index>
|
98 |
<!-- For `IWD Free One Page / Step Checkout` -->
|
@@ -102,7 +102,7 @@
|
|
102 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
103 |
</reference>
|
104 |
<reference name="content">
|
105 |
-
<block type="
|
106 |
</reference>
|
107 |
</onepagecheckout_index_index>
|
108 |
</layout>
|
7 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
16 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
25 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
34 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
43 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
52 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
62 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
72 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
82 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
92 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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` -->
|
102 |
<action method="addJs" ifconfig="postcodenl/config/enabled"><script>postcodenl/api/lookup.js</script></action>
|
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>
|
js/postcodenl/api/lookup.js
CHANGED
@@ -32,6 +32,13 @@ document.observe("dom:loaded", function()
|
|
32 |
*/
|
33 |
requestCache: {},
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Hide multiple field-rows in forms
|
37 |
*/
|
@@ -243,7 +250,8 @@ document.observe("dom:loaded", function()
|
|
243 |
var housenumber_mixed = $(prefix + 'postcode_housenumber').getValue().trim();
|
244 |
// Number, followed by non alphanumberic chars, and then additional number ("123 A", "123-rood", etc)
|
245 |
// or: Number, followed directly by a letter and then alphanumeric/space charcters ("123b3", "123berk 23", etc)
|
246 |
-
var housenumber_match = housenumber_mixed.match(/^(
|
|
|
247 |
var housenumber_addition_select = $(prefix +'postcode_housenumber_addition') ? $(prefix +'postcode_housenumber_addition').getValue() : null;
|
248 |
|
249 |
var housenumber = housenumber_match ? housenumber_match[1].trim() : '';
|
@@ -254,8 +262,6 @@ document.observe("dom:loaded", function()
|
|
254 |
housenumber_addition = '';
|
255 |
else if (housenumber_match[3])
|
256 |
housenumber_addition = housenumber_match[3].trim();
|
257 |
-
else if (housenumber_match[4])
|
258 |
-
housenumber_addition = housenumber_match[4].trim();
|
259 |
|
260 |
if (housenumber_addition == '' && housenumber_addition_select != '__none__' && housenumber_addition_select != '__select__' && housenumber_addition_select != null)
|
261 |
housenumber_addition = housenumber_addition_select;
|
@@ -634,26 +640,27 @@ document.observe("dom:loaded", function()
|
|
634 |
$(prefix +'postcode_input').setValue($(prefix + postcodeFieldId).getValue());
|
635 |
|
636 |
var housenumber_match;
|
|
|
|
|
637 |
if (PCNLAPI_CONFIG.useStreet2AsHouseNumber && $(prefix + street2))
|
638 |
{
|
639 |
-
housenumber_match = $(prefix + street2).getValue().match(
|
|
|
|
|
|
|
|
|
|
|
640 |
}
|
641 |
else
|
642 |
{
|
643 |
-
housenumber_match = $(prefix + street1).getValue().match(
|
|
|
|
|
|
|
|
|
|
|
644 |
}
|
645 |
|
646 |
-
var housenumber = housenumber_match ? housenumber_match[1].trim() : '';
|
647 |
-
|
648 |
-
var housenumber_addition = '';
|
649 |
-
|
650 |
-
if (!housenumber_match)
|
651 |
-
housenumber_addition = '';
|
652 |
-
else if (housenumber_match[3])
|
653 |
-
housenumber_addition = housenumber_match[3].trim();
|
654 |
-
else if (housenumber_match[4])
|
655 |
-
housenumber_addition = housenumber_match[4].trim();
|
656 |
-
|
657 |
$(prefix +'postcode_housenumber').setValue((housenumber +' '+ housenumber_addition).trim());
|
658 |
this.lookupPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4);
|
659 |
}
|
@@ -855,13 +862,13 @@ document.observe("dom:loaded", function()
|
|
855 |
// GoMage LightCheckout
|
856 |
if ($('billing_postcode'))
|
857 |
{
|
858 |
-
if ($('
|
859 |
{
|
860 |
$('billing_country_id').observe('change', function () { pcnlapi.toggleCountryPostcode('billing_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4'); });
|
861 |
if (!$('billing_country_id') || $('billing_country_id').getValue() == 'NL')
|
862 |
this.toggleCountryPostcode('billing_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4');
|
863 |
}
|
864 |
-
if
|
865 |
{
|
866 |
$('shipping_country_id').observe('change', function () { pcnlapi.toggleCountryPostcode('shipping_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4'); });
|
867 |
if (!$('shipping_country_id') || $('shipping_country_id').getValue() == 'NL')
|
32 |
*/
|
33 |
requestCache: {},
|
34 |
|
35 |
+
/*
|
36 |
+
* Regular expressions for matching address parts
|
37 |
+
*/
|
38 |
+
REGEXP_STREET: '[^0-9].*?|.*?[^0-9]',
|
39 |
+
REGEXP_HOUSENUMBER: '[0-9]+',
|
40 |
+
REGEXP_HOUSENUMBER_ADDITION: '[^\s]+|[^\s]\s+[^\s]{1,4}',
|
41 |
+
|
42 |
/**
|
43 |
* Hide multiple field-rows in forms
|
44 |
*/
|
250 |
var housenumber_mixed = $(prefix + 'postcode_housenumber').getValue().trim();
|
251 |
// Number, followed by non alphanumberic chars, and then additional number ("123 A", "123-rood", etc)
|
252 |
// or: Number, followed directly by a letter and then alphanumeric/space charcters ("123b3", "123berk 23", etc)
|
253 |
+
var housenumber_match = housenumber_mixed.match('/^('+ this.REGEXP_HOUSENUMBER +')([^0-9a-z]*('+ this.REGEXP_HOUSENUMBER_ADDITION +'))?$/i');
|
254 |
+
|
255 |
var housenumber_addition_select = $(prefix +'postcode_housenumber_addition') ? $(prefix +'postcode_housenumber_addition').getValue() : null;
|
256 |
|
257 |
var housenumber = housenumber_match ? housenumber_match[1].trim() : '';
|
262 |
housenumber_addition = '';
|
263 |
else if (housenumber_match[3])
|
264 |
housenumber_addition = housenumber_match[3].trim();
|
|
|
|
|
265 |
|
266 |
if (housenumber_addition == '' && housenumber_addition_select != '__none__' && housenumber_addition_select != '__select__' && housenumber_addition_select != null)
|
267 |
housenumber_addition = housenumber_addition_select;
|
640 |
$(prefix +'postcode_input').setValue($(prefix + postcodeFieldId).getValue());
|
641 |
|
642 |
var housenumber_match;
|
643 |
+
var housenumber = '';
|
644 |
+
var housenumber_addition = '';
|
645 |
if (PCNLAPI_CONFIG.useStreet2AsHouseNumber && $(prefix + street2))
|
646 |
{
|
647 |
+
housenumber_match = $(prefix + street2).getValue().match(('/^('+ this.REGEXP_HOUSENUMBER +')([^0-9a-z]*('+ this.REGEXP_HOUSENUMBER_ADDITION +'))?$/i'));
|
648 |
+
if (housenumber_match)
|
649 |
+
{
|
650 |
+
housenumber = housenumber_match[1].trim();
|
651 |
+
housenumber_addition = housenumber_match[3].trim();
|
652 |
+
}
|
653 |
}
|
654 |
else
|
655 |
{
|
656 |
+
housenumber_match = $(prefix + street1).getValue().match('/^('+ this.REGEXP_STREET +')\s+('+ this.REGEXP_HOUSENUMBER +')([^0-9a-z]*('+ this.REGEXP_HOUSENUMBER_ADDITION +'))?$/i');
|
657 |
+
if (housenumber_match)
|
658 |
+
{
|
659 |
+
housenumber = housenumber_match[2].trim();
|
660 |
+
housenumber_addition = housenumber_match[4].trim();
|
661 |
+
}
|
662 |
}
|
663 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
$(prefix +'postcode_housenumber').setValue((housenumber +' '+ housenumber_addition).trim());
|
665 |
this.lookupPostcode(prefix, postcodeFieldId, countryFieldId, street1, street2, street3, street4);
|
666 |
}
|
862 |
// GoMage LightCheckout
|
863 |
if ($('billing_postcode'))
|
864 |
{
|
865 |
+
if ($('billing_country_id'))
|
866 |
{
|
867 |
$('billing_country_id').observe('change', function () { pcnlapi.toggleCountryPostcode('billing_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4'); });
|
868 |
if (!$('billing_country_id') || $('billing_country_id').getValue() == 'NL')
|
869 |
this.toggleCountryPostcode('billing_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4');
|
870 |
}
|
871 |
+
if ($('shipping_country_id'))
|
872 |
{
|
873 |
$('shipping_country_id').observe('change', function () { pcnlapi.toggleCountryPostcode('shipping_', 'postcode', 'country_id', 'street1', 'street2', 'street3', 'street4'); });
|
874 |
if (!$('shipping_country_id') || $('shipping_country_id').getValue() == 'NL')
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PostcodeNl_Api</name>
|
4 |
-
<version>1.0.6.
|
5 |
<stability>stable</stability>
|
6 |
<license>Simplified BSD License</license>
|
7 |
<channel>community</channel>
|
@@ -16,11 +16,12 @@
|
|
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>Changes:
|
19 |
-
- Improved
|
|
|
20 |
<authors><author><name>Postcode.nl Technical Support</name><user>auto-converted</user><email>tech@postcode.nl</email></author></authors>
|
21 |
-
<date>2013-
|
22 |
-
<time>
|
23 |
-
<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="1dc6157d08029c42ed743ca3a2350a14"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PcnlController.php" hash="
|
24 |
<compatible/>
|
25 |
<dependencies/>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PostcodeNl_Api</name>
|
4 |
+
<version>1.0.6.4</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>Changes:
|
19 |
+
- Improved housenumber/addition splitting
|
20 |
+
- Fixed compatibility with MageGo LightCheckout</notes>
|
21 |
<authors><author><name>Postcode.nl Technical Support</name><user>auto-converted</user><email>tech@postcode.nl</email></author></authors>
|
22 |
+
<date>2013-03-06</date>
|
23 |
+
<time>10:45:23</time>
|
24 |
+
<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="1dc6157d08029c42ed743ca3a2350a14"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PcnlController.php" hash="a40a5c71a9a7a7ba3fd22f5b072d9050"/></dir><file name="JsonController.php" hash="273cdee0eb176860a68dd1788d9fef08"/></dir><dir name="etc"><file name="adminhtml.xml" hash="207cb9b9ca018f5e3d1b684e6e8615eb"/><file name="config.xml" hash="891131b1fd47cc1bc85c5d348712153e"/><file name="system.xml" hash="d9e1b3fdd30fe837605781ada45b92e4"/></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="4d99ee42b7bcfcff9dcfb41dcb51c838"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="e08a3ce7a48801bf997dbd4f6743b53f"/></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="6ec9c69d8cab0db75011fce8e478f6ee"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="339610e5950a53c3966d80cccf9bede4"/></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="f59eb1b9834a5a71c07ce55d7f98fbd8"/></dir></dir></dir><dir name="template"><dir name="postcodenl"><dir name="api"><file name="jsinit.phtml" hash="339610e5950a53c3966d80cccf9bede4"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="PostcodeNl_Api.csv" hash="d8f9ff15eb17aa09a7a40a72aa890095"/></dir><dir name="nl_NL"><file name="PostcodeNl_Api.csv" hash="d196b00bf35dec9fc858b5fc4f9dac9f"/></dir></target><target name="mageweb"><dir name="js"><dir name="postcodenl"><dir name="api"><file name="lookup.js" hash="e820b2b7a1192e7ba71ebe5715129ec1"/></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="def30283baa30441588be03adb47feb6"/></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="fe1592be0c02d48e29a18d4e3d778548"/></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>
|
25 |
<compatible/>
|
26 |
<dependencies/>
|
27 |
</package>
|
skin/frontend/base/default/postcodenl/api/css/lookup.css
CHANGED
@@ -146,3 +146,7 @@ body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox label
|
|
146 |
padding-left: 6px;
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
146 |
padding-left: 6px;
|
147 |
}
|
148 |
|
149 |
+
/* IWD One Step Checkout */
|
150 |
+
body.onepagecheckout-index-index .pcnl-manual-checkbox {
|
151 |
+
clear: both; /* IE 7/9 fix */
|
152 |
+
}
|
skin/frontend/default/default/postcodenl/api/css/lookup.css
CHANGED
@@ -146,3 +146,8 @@ body.onestepcheckout-index-index .onepage .form-list .pcnl-apptha-checkbox label
|
|
146 |
padding-left: 6px;
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
|
|
146 |
padding-left: 6px;
|
147 |
}
|
148 |
|
149 |
+
/* IWD One Step Checkout */
|
150 |
+
body.onepagecheckout-index-index .pcnl-manual-checkbox {
|
151 |
+
clear: both; /* IE 7/9 fix */
|
152 |
+
}
|
153 |
+
|