UK_Postcode_Address_Finder - Version 2.4.6

Version Notes

Release History
v2.4.6
* Added support for Amesty One Step Checkout. Updated IWD Checkout support for a newer version. (backwards compatible to older IWD versions)

v2.4.5
* fix packaging issue with v2.4.4, no changes.

v2.4.4
* update support for Templates Master Firecheckout
* test and mark as Magento 1.8 compatible

v2.4.3
* add support of AheadWorks OneStepCheckout

v2.4.2
* add support for further one-page-checkout extensions, supported now are: AHT, EcommerceTeam, GoMage, IWD, Magestore, Mage World, OneStepCheckout, Tempates Master, Vinagento, Web Experiment
* small changes to config settings

v2.4.1
* add support for Magestore OneStepCheckout
* bug fix - if county field is hidden, don't populate it

v2.4.0
* major rework. Keeping compatible with the growing list of one-page-checkout extensions was a pain.
* now using the Magento prototype JS framework to do most of the heavy lifiting. Less tweaks to .phtml files means we can better maintain compativility with all possible checkout layouts.

v2.3.3
* no changes - repackaged to keep Magento Connect happy

v 2.3.2
* update to GoMage integration

v 2.3.1
* workaround for Firefox 4 bug

v 2.3.0
* updated to support Magento v 1.5

v 2.2.0
* added support for Gomage Light Checkout

v 2.1.0
* added support for One Step Checkout

v 2.0.2
* fix layout problem on in IE8 on onepage checkout

v 2.0.1
* fix minor typo in default config

v 2.0
* big re-design for compatibility with Magento 1.4
* added ability to search by house name/number + postcode (previous versions can search by postcode only)
* pressing enter key in the postcode input field does a search

v 1.6.2
* fix for Internet Explorer in admin panel - new customer page; the add address button didn't always work
* use default country in admin pannel - Magento doesn't do this by default
* in one page checkout unhide billing address fields on 'continue' - this esures any error messages are placed correctly if parts of the address are missing

v 1.6.1
* fix for admin panel - sales pages; Added a 1s delay before CraftyClicks stuff is added to a form.
In some rare cases the timing was such that the form may not yet exist in DOM when we tried to add
address finder button etc.

v 1.6.0
* added address lookup to the admin panel, to change order of address fields please see the
documentation tab - http://www.magentocommerce.com/boards/viewchild/17082/

v 1.5.1
* small modification following tests with the blank theme (changed order of initialisation in JavaScript)

v 1.5.0
* add config option for 1st result line.
* avoid using JavaScript DOM for modifying address forms - it was conflicting with Magento JavaScript.
We now edit the template .phtml files directly.
* fix problems with re-displaying state select box when country is changed from UK to USA.
* fix problem with postcode error message affecting button position if form was submitted with a blank postcode.

v 1.4.0
* make error message class configurable - it can now be styled to match other Magento errors
* make error message text configurable
* fix issue with error message not being shown if hiding of address fields was enabled

v 1.3.0
* populate the company field if company name is available
* unhide all address lines on lookup error to allow customer to enter the address manually
* update to latest CraftyClicks JavaScript (v3.5):
- added the on_error event
- fixed selection of result using keyboard (got broken in latest Firefox v3.5)

v 1.2.0
* can now hide the region/province (county) field
* update to latest CraftyClicks JavaScript (v3.4)

v 1.1.2 (bug fix release)
* fix typo in JS code

v 1.1.1 (bug fix release)
* fix rearranging address fields order; was causing problems on one page checkout
* fix hiding of result box on result select
* hide result box on country change

v 1.1.0
* added Admin Panel options to configure look and feel of the module
* add address lookup to multiship checkout pages

v 1.0.0 - Initial Release

Download this release

Release Info

Developer Crafty Clicks
Extension UK_Postcode_Address_Finder
Version 2.4.6
Comparing to
See all releases


Code changes from version 2.4.5 to 2.4.6

app/code/local/CraftyClicks/etc/config.xml~ DELETED
@@ -1,57 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Crafty Clicks - Address Finder
5
- *
6
- * @category CraftyClicks
7
- * @package CraftyClicks
8
- * @copyright CraftyClicks.co.uk
9
- */
10
- -->
11
-
12
- <config>
13
- <modules>
14
- <CraftyClicks>
15
- <version>2.3.3</version>
16
- </CraftyClicks>
17
- </modules>
18
-
19
- <frontend>
20
- <layout>
21
- <updates>
22
- <craftyclicks>
23
- <file>craftyclicks.xml</file>
24
- </craftyclicks>
25
- </updates>
26
- </layout>
27
- </frontend>
28
-
29
- <global>
30
- <helpers>
31
- <craftyclicks>
32
- <class>CraftyClicks_Helper</class>
33
- </craftyclicks>
34
- </helpers>
35
- </global>
36
-
37
- <default>
38
- <general>
39
- <craftyclicks>
40
- <active>0</active>
41
- <model>craftyclicks</model>
42
- <access_token>xxxxx-xxxxx-xxxxx-xxxxx</access_token>
43
- <button_image></button_image>
44
- <button_class>button</button_class>
45
- <hide_fields>0</hide_fields>
46
- <hide_county>1</hide_county>
47
- <clear_result>0</clear_result>
48
- <error_class>error</error_class>
49
- <first_res_line>----- please select your address ----</first_res_line>
50
- <error_msg_1>This postcode could not be found, please try again or enter your address manually</error_msg_1>
51
- <error_msg_2>This postcode is not valid, please try again or enter your address manually</error_msg_2>
52
- <error_msg_3>Unable to connect to address lookup server, please enter your address manually</error_msg_3>
53
- <error_msg_4>An unexpected error occured, please enter your address manually</error_msg_4>
54
- </craftyclicks>
55
- </general>
56
- </default>
57
- </config>
app/code/local/CraftyClicks/etc/system.xml~ DELETED
@@ -1,170 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Crafty Clicks
5
- *
6
- * @category CraftyClicks
7
- * @package CraftyClicks_AddressFinder
8
- * @copyright CraftyClicks.co.uk
9
- */
10
- -->
11
-
12
- <config>
13
- <sections>
14
- <general>
15
- <groups>
16
- <craftyclicks translate="label" module="craftyclicks">
17
- <label>Crafty Clicks - Address Finder</label>
18
- <sort_order>124</sort_order>
19
- <show_in_default>1</show_in_default>
20
- <show_in_website>1</show_in_website>
21
- <show_in_store>0</show_in_store>
22
- <fields>
23
- <active translate="label">
24
- <label>Enabled - Frontend</label>
25
- <frontend_type>select</frontend_type>
26
- <source_model>adminhtml/system_config_source_yesno</source_model>
27
- <sort_order>1</sort_order>
28
- <show_in_default>1</show_in_default>
29
- <show_in_website>1</show_in_website>
30
- <show_in_store>0</show_in_store>
31
- </active>
32
-
33
- <access_token translate="label">
34
- <label>Access Token</label>
35
- <frontend_type>text</frontend_type>
36
- <sort_order>5</sort_order>
37
- <show_in_default>1</show_in_default>
38
- <show_in_website>1</show_in_website>
39
- <show_in_store>0</show_in_store>
40
- </access_token>
41
-
42
- <button_image translate="label">
43
- <label>Button Image</label>
44
- <frontend_type>text</frontend_type>
45
- <sort_order>12</sort_order>
46
- <show_in_default>1</show_in_default>
47
- <show_in_website>1</show_in_website>
48
- <show_in_store>0</show_in_store>
49
- <comment>Here you can enter an image file name to use as the 'Find Address' button. Leave blank for a default Magento button. Images should be placed under images/craftclicks in you skin folder.</comment>
50
- </button_image>
51
-
52
- <button_class translate="label">
53
- <label>Button Class</label>
54
- <frontend_type>text</frontend_type>
55
- <sort_order>13</sort_order>
56
- <show_in_default>1</show_in_default>
57
- <show_in_website>1</show_in_website>
58
- <show_in_store>0</show_in_store>
59
- <comment>Here you can set the css class to use for the 'Find Address' button. Leave blank for a browser default button. Try 'button'.</comment>
60
- </button_class>
61
-
62
- <hide_fields translate="label">
63
- <label>Hide Address Fields for New Address Entry</label>
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_yesno</source_model>
66
- <sort_order>20</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>1</show_in_website>
69
- <show_in_store>0</show_in_store>
70
- <comment>Select to hide address fields until a postcode is looked up and an address is selected. Address fields are only hidden if they are blank (i.e. new address entry, not edit).</comment>
71
- </hide_fields>
72
-
73
- <hide_county translate="label">
74
- <label>Hide County Field for UK</label>
75
- <frontend_type>select</frontend_type>
76
- <source_model>adminhtml/system_config_source_yesno</source_model>
77
- <sort_order>22</sort_order>
78
- <show_in_default>1</show_in_default>
79
- <show_in_website>1</show_in_website>
80
- <show_in_store>0</show_in_store>
81
- <comment>Select to hide the state/province (county) field if country selected is UK. County is not required to address mail in the UK, so no need to force customers to fill out this field.</comment>
82
- </hide_county>
83
-
84
- <clear_result translate="label">
85
- <label>Clear Result Once Selected</label>
86
- <frontend_type>select</frontend_type>
87
- <source_model>adminhtml/system_config_source_yesno</source_model>
88
- <sort_order>25</sort_order>
89
- <show_in_default>1</show_in_default>
90
- <show_in_website>1</show_in_website>
91
- <show_in_store>0</show_in_store>
92
- <comment>Select to hide the result box once an address is selected.</comment>
93
- </clear_result>
94
-
95
- <error_class translate="label">
96
- <label>Error Msg Class</label>
97
- <frontend_type>text</frontend_type>
98
- <sort_order>30</sort_order>
99
- <show_in_default>1</show_in_default>
100
- <show_in_website>1</show_in_website>
101
- <show_in_store>0</show_in_store>
102
- <comment>Set the css class to use for the error messages. Try 'error-msg', 'error' or even leave it blank.</comment>
103
- </error_class>
104
-
105
- <first_res_line translate="label">
106
- <label>First Result Line</label>
107
- <frontend_type>text</frontend_type>
108
- <sort_order>33</sort_order>
109
- <show_in_default>1</show_in_default>
110
- <show_in_website>1</show_in_website>
111
- <show_in_store>0</show_in_store>
112
- <comment>Text to place as first line in the result drop-down box.</comment>
113
- </first_res_line>
114
-
115
- <error_msg_1 translate="label">
116
- <label>Error Msg #1</label>
117
- <frontend_type>text</frontend_type>
118
- <sort_order>35</sort_order>
119
- <show_in_default>1</show_in_default>
120
- <show_in_website>1</show_in_website>
121
- <show_in_store>0</show_in_store>
122
- <comment>This message is shown if the postcode is in valid format, but not found int the database.</comment>
123
- </error_msg_1>
124
-
125
- <error_msg_2 translate="label">
126
- <label>Error Msg #2</label>
127
- <frontend_type>text</frontend_type>
128
- <sort_order>37</sort_order>
129
- <show_in_default>1</show_in_default>
130
- <show_in_website>1</show_in_website>
131
- <show_in_store>0</show_in_store>
132
- <comment>This message is shown if the postcode format is not valid.</comment>
133
- </error_msg_2>
134
-
135
- <error_msg_3 translate="label">
136
- <label>Error Msg #3</label>
137
- <frontend_type>text</frontend_type>
138
- <sort_order>39</sort_order>
139
- <show_in_default>1</show_in_default>
140
- <show_in_website>1</show_in_website>
141
- <show_in_store>0</show_in_store>
142
- <comment>This message is shown if the connection to lookup server times out.</comment>
143
- </error_msg_3>
144
-
145
- <error_msg_4 translate="label">
146
- <label>Error Msg #4</label>
147
- <frontend_type>text</frontend_type>
148
- <sort_order>41</sort_order>
149
- <show_in_default>1</show_in_default>
150
- <show_in_website>1</show_in_website>
151
- <show_in_store>0</show_in_store>
152
- <comment>This message is shown if any other error occurs.</comment>
153
- </error_msg_4>
154
-
155
- <help_label translate="label">
156
- <label>Problems?</label>
157
- <frontend_type>label</frontend_type>
158
- <sort_order>50</sort_order>
159
- <show_in_default>1</show_in_default>
160
- <show_in_website>1</show_in_website>
161
- <show_in_store>0</show_in_store>
162
- <comment>Look on the module magento connect page, or email support@craftyclicks.co.uk.</comment>
163
- </help_label>
164
- </fields>
165
- <comment><![CDATA[<a href="http://www.craftyclicks.co.uk" target="_blank">Signup for your free CraftyClicks evaluation account</a>]]></comment>
166
- </craftyclicks>
167
- </groups>
168
- </general>
169
- </sections>
170
- </config>
app/design/adminhtml/default/default/layout/craftyclicks.xml CHANGED
@@ -45,4 +45,14 @@
45
<block type="adminhtml/template" name="craftyclicks_config" template="craftyclicks/common_config.phtml" />
46
</reference>
47
</adminhtml_customer_new>
48
</layout>
45
<block type="adminhtml/template" name="craftyclicks_config" template="craftyclicks/common_config.phtml" />
46
</reference>
47
</adminhtml_customer_new>
48
+
49
+ <adminhtml_sales_order_address>
50
+ <reference name="head">
51
+ <action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
52
+ <action method="addJs"><script>craftyclicks/craftyclicks_magento_admin.js</script></action>
53
+ </reference>
54
+ <reference name="js">
55
+ <block type="adminhtml/template" name="craftyclicks_config" template="craftyclicks/common_config.phtml" />
56
+ </reference>
57
+ </adminhtml_sales_order_address>
58
</layout>
app/design/frontend/base/default/layout/craftyclicks.xml CHANGED
@@ -18,6 +18,8 @@
18
<action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
19
<action method="addJs"><script>craftyclicks/craftyclicks_magento.js</script></action>
20
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
21
</reference>
22
</checkout_onepage_index>
23
@@ -79,19 +81,19 @@
79
</reference>
80
</checkout_onestep_index>
81
82
- <ecommerceteam_echeckout_onepage_index>
83
<reference name="head">
84
<action method="removeItem"><type>js</type><name>craftyclicks/craftyclicks_magento.js</name></action>
85
<action method="addJs"><script>craftyclicks/craftyclicks_ecomm_easycheckout.js</script></action>
86
</reference>
87
- </ecommerceteam_echeckout_onepage_index>
88
89
- <wp_onepagecheckout_default>
90
<reference name="head">
91
<action method="removeItem"><type>js</type><name>craftyclicks/craftyclicks_magento.js</name></action>
92
<action method="addJs"><script>craftyclicks/craftyclicks_webandpeople_onepagecheckout.js</script></action>
93
</reference>
94
- </wp_onepagecheckout_default>
95
96
<onepagecheckout_index_index>
97
<!-- Interior Web Design (IWD) Free Magento One Step / Page Checkout Module -->
@@ -101,6 +103,14 @@
101
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
102
</reference>
103
</onepagecheckout_index_index>
104
105
<oscheckout_index_index>
106
<!-- AHT One Step Checkout - http://www.mage-shop.com/one-step-checkout-extension.html -->
18
<action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
19
<action method="addJs"><script>craftyclicks/craftyclicks_magento.js</script></action>
20
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
21
+
22
+
23
</reference>
24
</checkout_onepage_index>
25
81
</reference>
82
</checkout_onestep_index>
83
84
+ <ecommerceteam_echeckout_onepage_index>
85
<reference name="head">
86
<action method="removeItem"><type>js</type><name>craftyclicks/craftyclicks_magento.js</name></action>
87
<action method="addJs"><script>craftyclicks/craftyclicks_ecomm_easycheckout.js</script></action>
88
</reference>
89
+ </ecommerceteam_echeckout_onepage_index>
90
91
+ <wp_onepagecheckout_default>
92
<reference name="head">
93
<action method="removeItem"><type>js</type><name>craftyclicks/craftyclicks_magento.js</name></action>
94
<action method="addJs"><script>craftyclicks/craftyclicks_webandpeople_onepagecheckout.js</script></action>
95
</reference>
96
+ </wp_onepagecheckout_default>
97
98
<onepagecheckout_index_index>
99
<!-- Interior Web Design (IWD) Free Magento One Step / Page Checkout Module -->
103
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
104
</reference>
105
</onepagecheckout_index_index>
106
+ <opc_index_index>
107
+ <!-- IWD Updated their solution, updated corresponding code -->
108
+ <reference name="head">
109
+ <action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
110
+ <action method="addJs"><script>craftyclicks/craftyclicks_iwd_onestepcheckout_v2_2.js</script></action>
111
+ <block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
112
+ </reference>
113
+ </opc_index_index>
114
115
<oscheckout_index_index>
116
<!-- AHT One Step Checkout - http://www.mage-shop.com/one-step-checkout-extension.html -->
app/design/frontend/base/default/template/craftyclicks/common_config.phtml CHANGED
@@ -1,10 +1,23 @@
1
<?php
2
3
- $conf = Mage::getStoreConfig('general');
4
$js_config = "";
5
6
if (1 == $conf['craftyclicks']['active']) {
7
- $js_config = " var _cp_integrate = true;";
8
$js_config.= " var _cp_enable_for_uk_only = true;"; // if true, the button will show up only for UK
9
if (array_key_exists('button_image',$conf['craftyclicks']) && '' != $conf['craftyclicks']['button_image']) {
10
$js_config.= " var _cp_button_image = '".$this->getSkinUrl('images/craftyclicks/'.$conf['craftyclicks']['button_image'])."';";
@@ -15,7 +28,7 @@ if (1 == $conf['craftyclicks']['active']) {
15
$js_config.= " var _cp_button_class = '".$conf['craftyclicks']['button_class']."';";
16
$js_config.= " var _cp_result_box_height = '".$conf['craftyclicks']['max_res_lines']."';"; // number of lines to show in result box, must be 1 or more
17
$js_config.= " var _cp_result_box_width = '';"; // width of the result box
18
- $js_config.= " var _cp_busy_img_url = '';"; // the url of the image to show while waiting for lookup results, e.g. a spinning wheel etc.
19
20
if (array_key_exists('clear_result',$conf['craftyclicks']) && $conf['craftyclicks']['clear_result']) {
21
$js_config.= " var _cp_clear_result = true;";
@@ -55,6 +68,13 @@ if (1 == $conf['craftyclicks']['active']) {
55
$js_config.= " var _cp_move_fields = false;";
56
}
57
58
} else { //if (1 == $conf['craftyclicks']['active']) {
59
$js_config = " var _cp_integrate = false; ";
60
}
1
<?php
2
3
+
4
+ $conf = Mage::getStoreConfig('general');
5
$js_config = "";
6
7
if (1 == $conf['craftyclicks']['active']) {
8
+
9
+ /* ---------------------------------------------------------------------------
10
+ This is a workaround for Amestys lack of hookable layout tag.
11
+ --------------------------------------------------------------------------- */
12
+ $ams = Mage::getStoreConfig('amscheckout');
13
+ if (isset($ams)){
14
+ $js_config .= " var _cp_integrate = false;";
15
+ $js_config .= " var _cp_integrate_amesty = true;";
16
+ echo '<script src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS).'craftyclicks/craftyclicks_amesty_onepagecheckout.js"></script>';
17
+ }
18
+ else{
19
+ $js_config .= " var _cp_integrate = true;";
20
+ }
21
$js_config.= " var _cp_enable_for_uk_only = true;"; // if true, the button will show up only for UK
22
if (array_key_exists('button_image',$conf['craftyclicks']) && '' != $conf['craftyclicks']['button_image']) {
23
$js_config.= " var _cp_button_image = '".$this->getSkinUrl('images/craftyclicks/'.$conf['craftyclicks']['button_image'])."';";
28
$js_config.= " var _cp_button_class = '".$conf['craftyclicks']['button_class']."';";
29
$js_config.= " var _cp_result_box_height = '".$conf['craftyclicks']['max_res_lines']."';"; // number of lines to show in result box, must be 1 or more
30
$js_config.= " var _cp_result_box_width = '';"; // width of the result box
31
+ $js_config.= " var _cp_busy_img_url = '".$this->getSkinUrl('images/craftyclicks/'."crafty_postcode_busy.gif")."';"; // the url of the image to show while waiting for lookup results, e.g. a spinning wheel etc.
32
33
if (array_key_exists('clear_result',$conf['craftyclicks']) && $conf['craftyclicks']['clear_result']) {
34
$js_config.= " var _cp_clear_result = true;";
68
$js_config.= " var _cp_move_fields = false;";
69
}
70
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
} else { //if (1 == $conf['craftyclicks']['active']) {
79
$js_config = " var _cp_integrate = false; ";
80
}
app/design/frontend/base/default/template/craftyclicks/common_config.phtml~ DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
-
3
- $conf = Mage::getStoreConfig('general');
4
-
5
- if (1 == $conf['craftyclicks']['active']) {
6
- $js_config = " var _cp_enable_for_uk_only = true;"; // if true, the button will show up only for UK
7
- if (array_key_exists('button_image',$conf['craftyclicks']) && '' != $conf['craftyclicks']['button_image']) {
8
- $js_config.= " var _cp_button_image = '".$this->getSkinUrl('images/craftyclicks/'.$conf['craftyclicks']['button_image'])."';";
9
- } else {
10
- $js_config.= " var _cp_button_image = '';";
11
- }
12
- $js_config.= " var _cp_button_text = 'Find Address';";
13
- $js_config.= " var _cp_button_class = '".$conf['craftyclicks']['button_class']."';";
14
- $js_config.= " var _cp_result_box_height = 5;"; // number of lines to show in result box, must be 1 or more
15
- $js_config.= " var _cp_result_box_width = '';"; // width of the result box
16
- $js_config.= " var _cp_busy_img_url = '';"; // the url of the image to show while waiting for lookup results, e.g. a spinning wheel etc.
17
-
18
- if (array_key_exists('clear_result',$conf['craftyclicks']) && $conf['craftyclicks']['clear_result']) {
19
- $js_config.= " var _cp_clear_result = true;";
20
- } else {
21
- $js_config.= " var _cp_clear_result = false;";
22
- }
23
-
24
- $js_config.= " var _cp_hide_result = true;"; // once users make the selection, hide the result box - true/false
25
- $js_config.= " var _cp_max_res_lines = '".$conf['craftyclicks']['max_res_lines']."';";
26
- $js_config.= " var _cp_1st_res_line = '".$conf['craftyclicks']['first_res_line']."';";
27
- $js_config.= " var _cp_err_msg1 = '".$conf['craftyclicks']['error_msg_1']."';";
28
- $js_config.= " var _cp_err_msg2 = '".$conf['craftyclicks']['error_msg_2']."';";
29
- $js_config.= " var _cp_err_msg3 = '".$conf['craftyclicks']['error_msg_3']."';";
30
- $js_config.= " var _cp_err_msg4 = '".$conf['craftyclicks']['error_msg_4']."';";
31
- $js_config.= " var _cp_token_fe = '".$conf['craftyclicks']['access_token']."';";
32
-
33
- if (array_key_exists('hide_fields',$conf['craftyclicks']) && $conf['craftyclicks']['hide_fields']) {
34
- $js_config.= " var _cp_hide_fields = true;";
35
- } else {
36
- $js_config.= " var _cp_hide_fields = false;";
37
- }
38
-
39
- if (array_key_exists('hide_county',$conf['craftyclicks']) && $conf['craftyclicks']['hide_county']) {
40
- $js_config.= " var _cp_hide_county = true;";
41
- } else {
42
- $js_config.= " var _cp_hide_county = false;";
43
- }
44
-
45
- if (array_key_exists('error_class',$conf['craftyclicks']) && '' != $conf['craftyclicks']['error_class']) {
46
- $js_config.= " var _cp_error_class = '".$conf['craftyclicks']['error_class']."';";
47
- } else {
48
- $js_config.= " var _cp_error_class = '';";
49
- }
50
- ?>
51
-
52
- <script type="text/javascript">
53
- //<![CDATA[
54
-
55
- <?php echo $js_config; ?>
56
-
57
- //]]>
58
- </script>
59
-
60
- <?php
61
- } //if (1 == $conf['craftyclicks']['active']) {
62
- ?>
63
-
js/craftyclicks/crafty_mage_onepage.js~ DELETED
@@ -1,237 +0,0 @@
1
- /*
2
- // This is a collection of JavaScript code to allow easy integration of
3
- // postcode / address finder functionality into magento
4
- //
5
- // Provided by www.CraftyClicks.co.uk
6
- //
7
- // Based on CraftyClicks JS Version - 4.9.1 (23/03/2011)
8
- //
9
- // If you copy/use/modify this code - please keep this
10
- // comment header in place
11
- //
12
- // This code relies on prototype js, you must have a reasonably recent version loaded
13
- // in your template. Magento should include it as standard.
14
- //
15
- // If you need any help, contact support@craftyclicks.co.uk - we will help!
16
- //
17
- **********************************************************************************/
18
-
19
- var _cp_li_class = '';
20
- var _cp_div_class = '';
21
-
22
- var _cp_checkout_type = 'OnePageCheckout';
23
-
24
- var _cp_setup =
25
- [{
26
- "prefix" : "billing",
27
- "fields" : { "postcode_id" : "billing:postcode",
28
- "company_id" : "billing:company",
29
- "street1_id" : "billing:street1",
30
- "street2_id" : "billing:street2",
31
- "street3_id" : "billing:street3",
32
- "town_id" : "billing:city",
33
- "county_id" : "billing:region",
34
- "country_id" : "billing:country_id" },
35
- "lookup_ready" : 0,
36
- "old_postcode_width" : 0,
37
- "cp_obj" : 0,
38
- "orig_postcode_li" : 0,
39
- "div_depth" : 0
40
- },
41
- {
42
- "prefix" : "shipping",
43
- "fields" : { "postcode_id" : "shipping:postcode",
44
- "company_id" : "shipping:company",
45
- "street1_id" : "shipping:street1",
46
- "street2_id" : "shipping:street2",
47
- "street3_id" : "shipping:street3",
48
- "town_id" : "shipping:city",
49
- "county_id" : "shipping:region",
50
- "country_id" : "shipping:country_id" },
51
- "lookup_ready" : 0,
52
- "old_postcode_width" : 0,
53
- "cp_obj" : 0,
54
- "orig_postcode_li" : 0,
55
- "div_depth" : 0
56
- }];
57
-
58
- function _cp_elem_move(e1, e2) {
59
- e1.insert({after : e2});
60
- }
61
-
62
- function _cp_rearrange_fields(setup) {
63
- var fields = setup.fields;
64
- // test element id format, some templates don't follow the magento default naming...
65
- if (!$(setup.fields.postcode_id)) {
66
- // try an underscore
67
- if ($(setup.fields.postcode_id.replace(":", "_"))) {
68
- alert("underscores!");
69
- for (ii in setup.fields) {
70
- setup.fields[ii] = setup.fields[ii].replace(":", "_");
71
- }
72
- }
73
- }
74
-
75
-
76
- // test div depth - some magento temlates wrap fields in two layers of div in a li
77
- var div_depth = 0;
78
- if ($(setup.fields.postcode_id).up('div', 1).descendantOf($(fields.postcode_id).up('li'))) div_depth = 1;
79
- setup.div_depth = div_depth;
80
- //alert("_cp_rearrange_fields div_depth ="+div_depth);
81
-
82
- setup.orig_postcode_li = $(fields.postcode_id).up('li'); // remember the default place for postcode, we migth have to move it about
83
-
84
- // order: country, postcode, company (if we have it), street1, street2, street3 (if we have it), town
85
- var li_list = [ $(fields.country_id).up('li') ];
86
- var idx = 1;
87
-
88
- // is postcode bundled with country?
89
- if ($(fields.country_id).up('li') == $(fields.postcode_id).up('li')) {
90
- // yes, so make sure postcode comes after country
91
- _cp_elem_move($(setup.fields.country_id).up('div', div_depth), $(setup.fields.postcode_id).up('div', div_depth));
92
- } else {
93
- // postcode on a separate li, add it to the list
94
- li_list[idx] = $(fields.postcode_id).up('li'); idx++;
95
- }
96
-
97
- var ne = $(fields.company_id);
98
- if (ne) {
99
- li_list[idx] = ne.up('li'); idx++;
100
- }
101
- li_list[idx] = $(fields.street1_id).up('li'); idx++;
102
- ne = $(fields.street2_id);
103
- if (ne) {
104
- li_list[idx] = ne.up('li'); idx++;
105
- }
106
- ne = $(fields.street3_id);
107
- if (ne) {
108
- li_list[idx] = ne.up('li'); idx++;
109
- }
110
- li_list[idx] = $(fields.town_id).up('li'); idx++;
111
-
112
- // is the State/Province (county) field bundled with postcode field?
113
- if ($(fields.postcode_id).up('li') == $(fields.county_id).up('li')) {
114
- // yes, so move the county together with the town
115
- _cp_elem_move($(setup.fields.town_id).up('div', div_depth), $(setup.fields.county_id).up('div', div_depth));
116
- // if the postocde div has got 'input-postcode' class, remove it - it isn't needed once postcode is on its own line and breaks button position!
117
- if ($(setup.fields.postcode_id).up('div', div_depth).hasClassName('input-postcode')) $(setup.fields.postcode_id).up('div', div_depth).removeClassName('input-postcode');
118
- }
119
-
120
- for (var ii = 0; ii < idx; ii++) {
121
- _cp_elem_move(li_list[ii], li_list[ii+1]);
122
- }
123
- // add result box (hidden initialy)
124
- var tmp_html = '<li '+_cp_li_class+' style="display: none"><label>&nbsp;</label><div class="input-box" id="'+setup.prefix+'_cp_result_display">&nbsp;</div></li>';
125
- $(setup.fields.postcode_id).up('li').insert( {after: tmp_html} );
126
- // create button (hidden initially)
127
- tmp_html = '&nbsp;&nbsp;<button type="button" style="display: none" id="'+setup.prefix+'_cp_button_id" class="'+_cp_button_class+'" onclick="_cp_instances['+_cp_instance_idx+'].doLookup()"><span><span>'+_cp_button_text+'</span></span></button>';
128
- $(setup.fields.postcode_id).insert( {after : tmp_html} );
129
- // add placeholder for postcode (hidden initially)
130
- $(setup.fields.town_id).up('li').insert( {after: '<li '+_cp_li_class+' style="display: none" id="'+setup.prefix+'_cp_postcode_placeholder_id"></li>'} );
131
- }
132
-
133
- function _cp_add_lookup_fields(setup) {
134
- // check if we need to do anything
135
- if (!setup.lookup_ready) {
136
- // do the magic for UK
137
- // move postcode to the top
138
- $(setup.orig_postcode_li).insert( $(setup.fields.postcode_id).up('div', setup.div_depth) );
139
- // shrink postcode field if needed
140
- if ('' != _cp_postcode_field_width) {
141
- setup.old_postcode_width = $(setup.fields.postcode_id).getStyle("width");
142
- $(setup.fields.postcode_id).setStyle({width: _cp_postcode_field_width});
143
- }
144
- // hide the placeholder li
145
- if ($(setup.prefix+"_cp_postcode_placeholder_id")) $(setup.prefix+"_cp_postcode_placeholder_id").hide();
146
- // show result box
147
- $(setup.prefix+"_cp_result_display").up('li').show();
148
- // show button
149
- $(setup.prefix+"_cp_button_id").show();
150
- // set state
151
- setup.lookup_ready = 1;
152
- }
153
- }
154
-
155
- function _cp_remove_lookup_fields(setup) {
156
- // check if we need to do anything
157
- if (setup.lookup_ready) {
158
- // hide result box
159
- setup.cp_obj.update_res(null);
160
- $(setup.prefix+"_cp_result_display").up('li').hide();
161
- // hide button
162
- $(setup.prefix+"_cp_button_id").hide();
163
- // show the placeholder li and move the postcode field there
164
- $(setup.prefix+"_cp_postcode_placeholder_id").show();
165
- $(setup.prefix+"_cp_postcode_placeholder_id").insert( $(setup.fields.postcode_id).up('div', setup.div_depth) );
166
- // restore postcode field width if needed
167
- if (setup.old_postcode_width) {
168
- $(setup.fields.postcode_id).setStyle({width: setup.old_postcode_width});
169
- }
170
- // set state
171
- setup.lookup_ready = 0;
172
- }
173
- }
174
-
175
- function _cp_add_lookup(setup) {
176
- cp_obj = CraftyPostcodeCreate();
177
- setup.cp_obj = cp_obj;
178
- // config
179
- cp_obj.set("access_token", _cp_token_fe);
180
- cp_obj.set("res_autoselect", "0");
181
- cp_obj.set("result_elem_id", setup.prefix+"_cp_result_display");
182
- cp_obj.set("form", "");
183
- cp_obj.set("elem_company" , setup.fields.company_id); // optional
184
- cp_obj.set("elem_street1" , setup.fields.street1_id);
185
- cp_obj.set("elem_street2" , setup.fields.street2_id);
186
- cp_obj.set("elem_street3" , setup.fields.street3_id);
187
- cp_obj.set("elem_town" , setup.fields.town_id);
188
- cp_obj.set("elem_county" , setup.fields.county_id); // optional
189
- cp_obj.set("elem_postcode" , setup.fields.postcode_id);
190
- cp_obj.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found
191
- cp_obj.set("max_width" , _cp_result_box_width);
192
- if (1 < _cp_result_box_height) {
193
- cp_obj.set("first_res_line", "");
194
- cp_obj.set("max_lines" , _cp_result_box_height);
195
- } else {
196
- cp_obj.set("first_res_line", "----- please select your address ----");
197
- cp_obj.set("max_lines" , 1);
198
- }
199
- cp_obj.set("busy_img_url" , _cp_busy_img_url);
200
- cp_obj.set("hide_result" , _cp_hide_result);
201
- cp_obj.set("traditional_county" , 1);
202
-
203
-
204
- // initial page setup
205
- _cp_rearrange_fields(setup);
206
-
207
- if (_cp_enable_for_uk_only) {
208
- _cp_country_process(setup);
209
- $(setup.fields.country_id).observe('change', _cp_country_changed.bindAsEventListener(setup));
210
- } else {
211
- _cp_add_lookup_fields(setup);
212
- }
213
- }
214
-
215
- function _cp_country_changed(e) {
216
- // set the right context for the handler
217
- _cp_country_process(this);
218
- }
219
-
220
- function _cp_country_process(setup) {
221
- // show postcode lookup for:
222
- // "GB" UK
223
- // "JE" Jersey
224
- // "GG" Guernsey
225
- // "IM" Isle of Man
226
- var curr_country = $(setup.fields.country_id).getValue();
227
- if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
228
- _cp_add_lookup_fields(setup);
229
- } else {
230
- _cp_remove_lookup_fields(setup);
231
- }
232
- }
233
-
234
- document.observe("dom:loaded", function() {
235
- _cp_add_lookup(_cp_setup[0]);
236
- _cp_add_lookup(_cp_setup[1]);
237
- });
js/craftyclicks/craftyclicks_aheadworks_onestepcheckout.js CHANGED
@@ -286,11 +286,11 @@ function CraftyClicksMagentoClass () {
286
}
287
288
this.result_ready = function() {
289
- $('.'+this.prefix+'_cp_address_class').invoke('show');
290
}
291
292
this.result_selected = function() {
293
if (_cp_clear_result) this.cp_obj.update_res(null);
294
}
295
296
this.result_error = function() {
286
}
287
288
this.result_ready = function() {
289
}
290
291
this.result_selected = function() {
292
if (_cp_clear_result) this.cp_obj.update_res(null);
293
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
294
}
295
296
this.result_error = function() {
js/craftyclicks/{craftyclicks_magento.js~ → craftyclicks_amesty_onepagecheckout.js} RENAMED
@@ -2,7 +2,7 @@
2
// This is a collection of JavaScript code to allow easy integration of
3
// the Crafty Clicks postcode / address finder functionality into Magento
4
//
5
- // This file works for th standar magento checkout (both community and enterprise)
6
//
7
// It also covers, these aftermarket extensions:
8
//
@@ -78,7 +78,7 @@ function CraftyClicksMagentoClass () {
78
var li_list = [ $(fields.country_id).up('li') ];
79
var idx = 1;
80
81
- var ne = $(fields.company_id);
82
if (ne) {
83
// check if the email address is bundled with the company - on some templates it is and we then should separate it out.
84
if ($(fields.email_id) && ne.up('li') == $(fields.email_id).up('li') && !this.mw_opc) {
@@ -89,7 +89,7 @@ function CraftyClicksMagentoClass () {
89
}
90
li_list[idx] = ne.up('li'); idx++;
91
ne.up('li').addClassName(this.prefix+'_cp_address_class');
92
- }
93
94
li_list[idx] = $(fields.street1_id).up('li'); idx++;
95
$(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
@@ -119,15 +119,15 @@ function CraftyClicksMagentoClass () {
119
this.elem_move(li_list[ii], li_list[ii+1]);
120
}
121
// create a new li to hold the postcode on its own
122
- $(fields.town_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
123
- $(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('div', this.div_depth) );
124
125
// check postcode field width, longer than 350px means we are on a magento enterprise template and we need to shrink things a bit
126
// so the lookup button fits on the form next to the postcode field
127
- var pcWidth = parseInt($(this.fields.postcode_id).getStyle("width"));
128
if (350 < pcWidth) {
129
this.uk_postcode_width = '100px';
130
- }
131
132
// move the telephone above the address - we move it only if we hide other address fields
133
ne = $(fields.telephone_id);
@@ -161,11 +161,11 @@ function CraftyClicksMagentoClass () {
161
}
162
} else {
163
// move postcode to the uk position after the country li
164
- $(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
165
// add result box
166
if (!$(this.prefix+'_cp_result_display')) {
167
var tmp_html = '<li class="'+this.li_class+'" style="display: none"><label>&nbsp;</label><div class="input-box" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
168
- $(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
169
}
170
}
171
// show result box
@@ -176,7 +176,7 @@ function CraftyClicksMagentoClass () {
176
if (0 == this.div_depth) {
177
tmp_html = '<div class="input-box" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label>';
178
} else {
179
- tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
180
}
181
if ('' != _cp_button_image) {
182
tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
@@ -188,17 +188,17 @@ function CraftyClicksMagentoClass () {
188
} else {
189
tmp_html += '</div></div>';
190
}
191
- $(this.fields.postcode_id).up('div', this.div_depth).insert( {after : tmp_html} );
192
- $(this.prefix+"_cp_button_id").observe('click', this.button_clicked.bindAsEventListener(this));
193
}
194
// show button
195
$(this.prefix+"_cp_button_div_id").show();
196
197
// shrink postcode field if needed
198
- if ('' != this.uk_postcode_width) {
199
this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
200
$(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
201
- }
202
203
// hide county if requested (and if it exists in the html at all)
204
if (_cp_hide_county) {
@@ -328,11 +328,11 @@ function CraftyClicksMagentoClass () {
328
}
329
330
this.result_ready = function() {
331
- $('.'+this.prefix+'_cp_address_class').invoke('show');
332
}
333
334
this.result_selected = function() {
335
if (_cp_clear_result) this.cp_obj.update_res(null);
336
}
337
338
this.result_error = function() {
@@ -343,7 +343,7 @@ function CraftyClicksMagentoClass () {
343
344
document.observe("dom:loaded", function() {
345
346
- if (!_cp_integrate) return;
347
348
if ($("billing:postcode")) {
349
var cc1 = new CraftyClicksMagentoClass();
@@ -351,10 +351,7 @@ document.observe("dom:loaded", function() {
351
"prefix" : "billing",
352
"fields" : { "postcode_id" : "billing:postcode",
353
"company_id" : "billing:company",
354
- "street1_id" : "billing:street1",
355
- "street2_id" : "billing:street2",
356
- "street3_id" : "billing:street3",
357
- "street4_id" : "billing:street4",
358
"town_id" : "billing:city",
359
"county_id" : "billing:region",
360
"country_id" : "billing:country_id",
@@ -369,10 +366,7 @@ document.observe("dom:loaded", function() {
369
"prefix" : "shipping",
370
"fields" : { "postcode_id" : "shipping:postcode",
371
"company_id" : "shipping:company",
372
- "street1_id" : "shipping:street1",
373
- "street2_id" : "shipping:street2",
374
- "street3_id" : "shipping:street3",
375
- "street4_id" : "shipping:street4",
376
"town_id" : "shipping:city",
377
"county_id" : "shipping:region",
378
"country_id" : "shipping:country_id",
2
// This is a collection of JavaScript code to allow easy integration of
3
// the Crafty Clicks postcode / address finder functionality into Magento
4
//
5
+ // This file works for the standard magento checkout (both community and enterprise)
6
//
7
// It also covers, these aftermarket extensions:
8
//
78
var li_list = [ $(fields.country_id).up('li') ];
79
var idx = 1;
80
81
+ /*var ne = $(fields.company_id);
82
if (ne) {
83
// check if the email address is bundled with the company - on some templates it is and we then should separate it out.
84
if ($(fields.email_id) && ne.up('li') == $(fields.email_id).up('li') && !this.mw_opc) {
89
}
90
li_list[idx] = ne.up('li'); idx++;
91
ne.up('li').addClassName(this.prefix+'_cp_address_class');
92
+ }*/
93
94
li_list[idx] = $(fields.street1_id).up('li'); idx++;
95
$(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
119
this.elem_move(li_list[ii], li_list[ii+1]);
120
}
121
// create a new li to hold the postcode on its own
122
+ //$(fields.town_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
123
+ //$(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('div', this.div_depth) );
124
125
// check postcode field width, longer than 350px means we are on a magento enterprise template and we need to shrink things a bit
126
// so the lookup button fits on the form next to the postcode field
127
+ /*var pcWidth = parseInt($(this.fields.postcode_id).getStyle("width"));
128
if (350 < pcWidth) {
129
this.uk_postcode_width = '100px';
130
+ }*/
131
132
// move the telephone above the address - we move it only if we hide other address fields
133
ne = $(fields.telephone_id);
161
}
162
} else {
163
// move postcode to the uk position after the country li
164
+ //$(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
165
// add result box
166
if (!$(this.prefix+'_cp_result_display')) {
167
var tmp_html = '<li class="'+this.li_class+'" style="display: none"><label>&nbsp;</label><div class="input-box" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
168
+ $(this.fields.postcode_id).up('.amscheckout-row').insert( {after: tmp_html} );
169
}
170
}
171
// show result box
176
if (0 == this.div_depth) {
177
tmp_html = '<div class="input-box" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label>';
178
} else {
179
+ tmp_html = '<div class="field amscheckout-row" style="width: 50%;" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
180
}
181
if ('' != _cp_button_image) {
182
tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
188
} else {
189
tmp_html += '</div></div>';
190
}
191
+ $(this.fields.postcode_id).up('.amscheckout-row').insert( {after: tmp_html} );
192
+ $(this.prefix+"_cp_button_id").observe('mousedown', this.button_clicked.bindAsEventListener(this));
193
}
194
// show button
195
$(this.prefix+"_cp_button_div_id").show();
196
197
// shrink postcode field if needed
198
+ /*if ('' != this.uk_postcode_width) {
199
this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
200
$(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
201
+ }*/
202
203
// hide county if requested (and if it exists in the html at all)
204
if (_cp_hide_county) {
328
}
329
330
this.result_ready = function() {
331
}
332
333
this.result_selected = function() {
334
if (_cp_clear_result) this.cp_obj.update_res(null);
335
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
336
}
337
338
this.result_error = function() {
343
344
document.observe("dom:loaded", function() {
345
346
+ if (!_cp_integrate_amesty) return;
347
348
if ($("billing:postcode")) {
349
var cc1 = new CraftyClicksMagentoClass();
351
"prefix" : "billing",
352
"fields" : { "postcode_id" : "billing:postcode",
353
"company_id" : "billing:company",
354
+ "street1_id" : "billing:street",
355
"town_id" : "billing:city",
356
"county_id" : "billing:region",
357
"country_id" : "billing:country_id",
366
"prefix" : "shipping",
367
"fields" : { "postcode_id" : "shipping:postcode",
368
"company_id" : "shipping:company",
369
+ "street1_id" : "shipping:street",
370
"town_id" : "shipping:city",
371
"county_id" : "shipping:region",
372
"country_id" : "shipping:country_id",
js/craftyclicks/craftyclicks_ath_oscheckout.js CHANGED
@@ -281,11 +281,11 @@ function CraftyClicksMagentoClass () {
281
}
282
283
this.result_ready = function() {
284
- $('.'+this.prefix+'_cp_address_class').invoke('show');
285
}
286
287
this.result_selected = function() {
288
if (_cp_clear_result) this.cp_obj.update_res(null);
289
}
290
291
this.result_error = function() {
281
}
282
283
this.result_ready = function() {
284
}
285
286
this.result_selected = function() {
287
if (_cp_clear_result) this.cp_obj.update_res(null);
288
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
289
}
290
291
this.result_error = function() {
js/craftyclicks/craftyclicks_ecomm_easycheckout.js CHANGED
@@ -248,11 +248,11 @@ function CraftyClicksMagentoClass () {
248
}
249
250
this.result_ready = function() {
251
- $('.'+this.prefix+'_cp_address_class').invoke('show');
252
}
253
254
this.result_selected = function() {
255
if (_cp_clear_result) this.cp_obj.update_res(null);
256
}
257
258
this.result_error = function() {
248
}
249
250
this.result_ready = function() {
251
}
252
253
this.result_selected = function() {
254
if (_cp_clear_result) this.cp_obj.update_res(null);
255
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
256
}
257
258
this.result_error = function() {
js/craftyclicks/craftyclicks_gomage_lightcheckout.js CHANGED
@@ -274,11 +274,11 @@ function CraftyClicksMagentoClass () {
274
}
275
276
this.result_ready = function() {
277
- $('.'+this.prefix+'_cp_address_class').invoke('show');
278
}
279
280
this.result_selected = function() {
281
if (_cp_clear_result) this.cp_obj.update_res(null);
282
}
283
284
this.result_error = function() {
274
}
275
276
this.result_ready = function() {
277
}
278
279
this.result_selected = function() {
280
if (_cp_clear_result) this.cp_obj.update_res(null);
281
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
282
}
283
284
this.result_error = function() {
js/craftyclicks/craftyclicks_iwd_onestepcheckout.js CHANGED
@@ -277,11 +277,11 @@ function CraftyClicksMagentoClass () {
277
}
278
279
this.result_ready = function() {
280
- $('.'+this.prefix+'_cp_address_class').invoke('show');
281
}
282
283
this.result_selected = function() {
284
if (_cp_clear_result) this.cp_obj.update_res(null);
285
}
286
287
this.result_error = function() {
277
}
278
279
this.result_ready = function() {
280
}
281
282
this.result_selected = function() {
283
if (_cp_clear_result) this.cp_obj.update_res(null);
284
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
285
}
286
287
this.result_error = function() {
js/craftyclicks/{craftyclicks_magento_multiship.js~ → craftyclicks_iwd_onestepcheckout_v2_2.js} RENAMED
@@ -1,323 +1,356 @@
1
- /*
2
- // This is a collection of JavaScript code to allow easy integration of
3
- // the Crafty Clicks postcode / address finder functionality into Magento
4
- //
5
- // Provided by www.CraftyClicks.co.uk
6
- //
7
- // Requires standard CraftyClicks JS - tested with v4.9.1
8
- //
9
- // If you copy/use/modify this code - please keep this
10
- // comment header in place
11
- //
12
- // This code relies on prototype js, you must have a reasonably recent version loaded
13
- // in your template. Magento should include it as standard.
14
- //
15
- // If you need any help, contact support@craftyclicks.co.uk - we will help!
16
- //
17
- **********************************************************************************/
18
- function CraftyClicksMagentoClass () {
19
- this.prefix = "";
20
- this.fields = { "postcode_id" : "", // required
21
- "company_id" : "", // optional
22
- "street1_id" : "", // required
23
- "street2_id" : "", // optional
24
- "street3_id" : "", // optional
25
- "street4_id" : "", // optional
26
- "town_id" : "", // required
27
- "county_id" : "", // optional
28
- "country_id" : "", // required
29
- "email_id" : "" // required
30
- };
31
-
32
- this.current_setup = 'initial'; // can be 'uk' or 'non_uk'
33
- this.uk_postcode_width = ''
34
- this.old_postcode_width = '';
35
- this.cp_obj = 0;
36
- this.uk_postcode_marker = 0;
37
- this.div_depth = 0;
38
- this.li_class = "fields";
39
-
40
- this.elem_move = function(e1, e2) {
41
- e1.insert({after : e2});
42
- }
43
-
44
- // test div depth - some magento temlates wrap fields in two layers of div in a li
45
- this.set_div_depth = function() {
46
- if ($(this.fields.postcode_id).up('div', 1).descendantOf($(this.fields.postcode_id).up('li'))) {
47
- this.div_depth = 1;
48
- }
49
- }
50
-
51
- this.rearrange_fields = function() {
52
- var fields = this.fields;
53
- // postcode should be bundled with country in the same li on the standard magento address templates
54
- // if this isn't the case, the rest of this code unlikely to work!
55
- if ($(fields.country_id).up('li') == $(fields.postcode_id).up('li')) {
56
- // order for non-UK: country, company (if we have it), street1, street2, street3 (if we have it), town, county (if we have it), postcode
57
- var li_list = [ $(fields.country_id).up('li') ];
58
- var idx = 1;
59
-
60
- var ne = $(fields.company_id);
61
- if (ne) {
62
- // check if the email address is bundled with the company - on some templates it is and we then should separate it out.
63
- if ($(fields.email_id) && ne.up('li') == $(fields.email_id).up('li')) {
64
- // create a new li to hold the company on its own
65
- $(fields.street1_id).up('li').insert( {before: '<li '+this.li_class+' id="'+this.prefix+'_company_placeholder_id"></li>'} );
66
- $(this.prefix+"_company_placeholder_id").insert( $(fields.company_id).up('div', this.div_depth) );
67
- ne = $(fields.company_id);
68
- }
69
- li_list[idx] = ne.up('li'); idx++;
70
- ne.up('li').addClassName(this.prefix+'_cp_address_class');
71
- }
72
-
73
- li_list[idx] = $(fields.street1_id).up('li'); idx++;
74
- $(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
75
- ne = $(fields.street2_id);
76
- if (ne) {
77
- li_list[idx] = ne.up('li'); idx++;
78
- ne.up('li').addClassName(this.prefix+'_cp_address_class');
79
- }
80
- ne = $(fields.street3_id);
81
- if (ne) {
82
- li_list[idx] = ne.up('li'); idx++;
83
- ne.up('li').addClassName(this.prefix+'_cp_address_class');
84
- }
85
- ne = $(fields.street4_id);
86
- if (ne) {
87
- li_list[idx] = ne.up('li'); idx++;
88
- ne.up('li').addClassName(this.prefix+'_cp_address_class');
89
- }
90
- li_list[idx] = $(fields.town_id).up('li'); idx++; // town and county are on the same li, so will move together
91
- $(fields.town_id).up('li').addClassName(this.prefix+'_cp_address_class');
92
-
93
- for (var ii = 0; ii < idx; ii++) {
94
- this.elem_move(li_list[ii], li_list[ii+1]);
95
- }
96
-
97
- // create a new li to hold the postcode on its own
98
- $(fields.town_id).up('li').insert( {after: '<li '+this.li_class+' id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
99
- $(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('div', this.div_depth) );
100
-
101
- // check postcode field width, longer than 350px means we are on a magento enterprise template and we need to shrink things a bit
102
- // so the lookup button fits on the form next to the postcode field
103
- var pcWidth = parseInt($(this.fields.postcode_id).getStyle("width"));
104
- if (350 < pcWidth) {
105
- this.uk_postcode_width = '100px';
106
- }
107
-
108
- // check if the telephone field is bundled with the company - on some templates it is and we then should separate it out.
109
- ne = $(fields.telephone_id);
110
- var ne1 = $(fields.company_id);
111
- if (ne && ne1 && ne.up('li') == ne1.up('li')) {
112
- // create a new li to hold the company on its own
113
- $(fields.street1_id).up('li').insert( {before: '<li '+this.li_class+' id="'+this.prefix+'_company_placeholder_id"></li>'} );
114
- $(this.prefix+"_company_placeholder_id").insert( $(fields.company_id).up('div', this.div_depth) );
115
- ne = $(fields.company_id);
116
- }
117
- // move the telephone above the address
118
- if (ne) {
119
- if ($(fields.country_id).up('li') == ne.up('li')) {
120
- // create a new li to hold the postcode on its own
121
- $(fields.town_id).up('li').insert( {after: '<li '+this.li_class+' id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
122
- $(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('div', this.div_depth) );
123
- }
124
-
125
- .insert({before : ne.up('li')});
126
- }
127
- return (true);
128
- } else {
129
- return (false);
130
- }
131
- }
132
-
133
- this.setup_for_uk = function() {
134
- // check if we need to do anything
135
- if ('uk' != this.current_setup) {
136
- // do the magic for UK
137
- // move postcode to the uk position after the country li
138
- $(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
139
- // add result box
140
- if (!$(this.prefix+'_cp_result_display')) {
141
- var tmp_html = '<li '+this.li_class+' style="display: none"><label>&nbsp;</label><div class="input-box" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
142
- $(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
143
- }
144
- // show result box
145
- $(this.prefix+"_cp_result_display").up('li').show();
146
- // add button
147
- if (!$(this.prefix+'_cp_button_div_id')) {
148
- // var tmp_html = '<div id="'+this.prefix+'_cp_button_div_id">&nbsp;&nbsp;&nbsp;<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+ '"><span><span>'+_cp_button_text+'</span></span></button></div>';
149
- var tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
150
- if ('' != _cp_button_image) {
151
- tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
152
- } else {
153
- tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'"><span><span>'+_cp_button_text+'</span></span></button>';
154
- }
155
- tmp_html += '</div></div>';
156
- $(this.fields.postcode_id).up('div', 1).insert( {after : tmp_html} );
157
- $(this.prefix+"_cp_button_id").observe('click', this.button_clicked.bindAsEventListener(this));
158
- }
159
- // show button
160
- $(this.prefix+"_cp_button_div_id").show();
161
-
162
- // shrink postcode field if needed
163
- if ('' != this.uk_postcode_width) {
164
- this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
165
- $(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
166
- }
167
-
168
- // hide county if requested (and if it exists in the html at all)
169
- if (_cp_hide_county) {
170
- ne = $(this.fields.county_id);
171
- if (ne) {
172
- ne.up('div', this.div_depth).hide();
173
- }
174
- }
175
- }
176
-
177
- if ('initial' == this.current_setup && _cp_hide_fields) {
178
- // first time and default to UK, hide address fields
179
- $('.'+this.prefix+'_cp_address_class').invoke('hide');
180
- }
181
-
182
- // set state
183
- this.current_setup = 'uk';
184
- }
185
-
186
- this.setup_for_non_uk = function() {
187
- // check if we need to do anything
188
- if ('non_uk' != this.current_setup) {
189
- // hide result box (if it exist already)
190
- if ($(this.prefix+"_cp_result_display")) {
191
- this.cp_obj.update_res(null);
192
- $(this.prefix+"_cp_result_display").up('li').hide();
193
- }
194
- // hide button (if it exist already)
195
- if ($(this.prefix+"_cp_button_div_id")) {
196
- $(this.prefix+"_cp_button_div_id").hide();
197
- }
198
- // move postcode to the non-uk position after the town/county li
199
- $(this.fields.town_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
200
- // restore postcode field width if needed
201
- if ('' != this.old_postcode_width) {
202
- $(this.fields.postcode_id).setStyle({width: this.old_postcode_width});
203
- }
204
- // show county if it was hidden (and exists in the html at all)
205
- if (_cp_hide_county) {
206
- ne = $(this.fields.county_id);
207
- if (ne) {
208
- ne.up('div', this.div_depth).show();
209
- }
210
- }
211
-
212
- // show all other addres lines
213
- $('.'+this.prefix+'_cp_address_class').invoke('show');
214
- // set state
215
- this.current_setup = 'non_uk';
216
- }
217
- }
218
-
219
- this.add_lookup = function(setup) {
220
- cp_obj = CraftyPostcodeCreate();
221
- this.cp_obj = cp_obj;
222
- // config
223
- this.prefix = setup.prefix;
224
- this.fields = setup.fields;
225
- cp_obj.set("access_token", _cp_token_fe);
226
- cp_obj.set("res_autoselect", "0");
227
- cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
228
- cp_obj.set("form", "");
229
- cp_obj.set("elem_company" , this.fields.company_id); // optional
230
- cp_obj.set("elem_street1" , this.fields.street1_id);
231
- cp_obj.set("elem_street2" , this.fields.street2_id);
232
- cp_obj.set("elem_street3" , this.fields.street3_id);
233
- cp_obj.set("elem_town" , this.fields.town_id);
234
- cp_obj.set("elem_county" , this.fields.county_id); // optional
235
- cp_obj.set("elem_postcode" , this.fields.postcode_id);
236
- cp_obj.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found
237
- cp_obj.set("max_width" , _cp_result_box_width);
238
- if (1 < _cp_result_box_height) {
239
- cp_obj.set("first_res_line", "");
240
- cp_obj.set("max_lines" , _cp_result_box_height);
241
- } else {
242
- cp_obj.set("first_res_line", "----- please select your address ----");
243
- cp_obj.set("max_lines" , 1);
244
- }
245
- cp_obj.set("busy_img_url" , _cp_busy_img_url);
246
- cp_obj.set("hide_result" , _cp_clear_result);
247
- cp_obj.set("traditional_county" , 1);
248
- cp_obj.set("on_result_ready", this.result_ready.bindAsEventListener(this));
249
- cp_obj.set("on_result_selected", this.result_selected.bindAsEventListener(this));
250
- cp_obj.set("on_error", this.result_error.bindAsEventListener(this));
251
- cp_obj.set("first_res_line", _cp_1st_res_line);
252
- cp_obj.set("err_msg1", _cp_err_msg1);
253
- cp_obj.set("err_msg2", _cp_err_msg2);
254
- cp_obj.set("err_msg3", _cp_err_msg3);
255
- cp_obj.set("err_msg4", _cp_err_msg4);
256
- // initial page setup
257
- this.set_div_depth();
258
- if (this.rearrange_fields()) {
259
- if (_cp_enable_for_uk_only) {
260
- this.country_changed();
261
- $(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
262
- } else {
263
- this.setup_for_uk();
264
- }
265
- } else {
266
- alert ('could not do it!!!');
267
- }
268
- }
269
-
270
- this.country_changed = function(e) {
271
- // show postcode lookup for:
272
- // "GB" UK
273
- // "JE" Jersey
274
- // "GG" Guernsey
275
- // "IM" Isle of Man
276
- var curr_country = $(this.fields.country_id).getValue();
277
- if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
278
- this.setup_for_uk();
279
- } else {
280
- this.setup_for_non_uk();
281
- }
282
- }
283
-
284
- this.button_clicked = function(e) {
285
- if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').removeClassName(_cp_error_class);
286
- this.cp_obj.doLookup();
287
- }
288
-
289
- this.result_ready = function() {
290
- $('.'+this.prefix+'_cp_address_class').invoke('show');
291
- }
292
-
293
- this.result_selected = function() {
294
- if (_cp_clear_result) this.cp_obj.update_res(null);
295
- }
296
-
297
- this.result_error = function() {
298
- $('.'+this.prefix+'_cp_address_class').invoke('show');
299
- if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').addClassName(_cp_error_class);
300
- }
301
- }
302
-
303
- document.observe("dom:loaded", function() {
304
- if ($("zip")) {
305
- var cc3 = new CraftyClicksMagentoClass();
306
- cc3.add_lookup({
307
- "prefix" : "",
308
- "fields" : { "postcode_id" : "zip",
309
- "company_id" : "company",
310
- "street1_id" : "street_1",
311
- "street2_id" : "street_2",
312
- "street3_id" : "street_3",
313
- "street4_id" : "street_4",
314
- "town_id" : "city",
315
- "county_id" : "region",
316
- "country_id" : "country",
317
- "email_id" : "email_address",
318
- "telephone_id": "telephone" }
319
- });
320
- }
321
-
322
- });
323
-
1
+ /*
2
+ // This is a collection of JavaScript code to allow easy integration of
3
+ // the Crafty Clicks postcode / address finder functionality into these
4
+ // checkout extensions :
5
+ //
6
+ // OneStepCheckout extension for Magento (www.onestepcheckout.com)
7
+ // http://www.magentocommerce.com/magento-connect/one-step-checkout-version-3.html
8
+ //
9
+ // Magestore OneStepCheckout (www.magestore.com)
10
+ // http://www.magentocommerce.com/magento-connect/one-step-checkout-4908.html
11
+ //
12
+ // Provided by www.CraftyClicks.co.uk
13
+ //
14
+ // Requires standard CraftyClicks JS - tested with v4.9.1
15
+ //
16
+ // If you copy/use/modify this code - please keep this
17
+ // comment header in place
18
+ //
19
+ // Copyright (c) 2009-2012 Crafty Clicks (http://www.craftyclicks.com)
20
+ //
21
+ // This code relies on prototype js, you must have a reasonably recent version loaded
22
+ // in your template. Magento should include it as standard.
23
+ //
24
+ // If you need any help, contact support@craftyclicks.co.uk - we will help!
25
+ //
26
+ **********************************************************************************/
27
+ function CraftyClicksMagentoClass () {
28
+ this.prefix = "";
29
+ this.fields = { "postcode_id" : "", // required
30
+ "company_id" : "", // optional
31
+ "street1_id" : "", // required
32
+ "street2_id" : "", // optional
33
+ "street3_id" : "", // optional
34
+ "street4_id" : "", // optional
35
+ "town_id" : "", // required
36
+ "county_id" : "", // optional
37
+ "country_id" : "" // required
38
+ };
39
+
40
+ this.current_setup = 'initial'; // can be 'uk' or 'non_uk'
41
+ this.uk_postcode_width = ''
42
+ this.old_postcode_width = '';
43
+ this.cp_obj = 0;
44
+ this.div_depth = 0;
45
+ this.li_class = "clearfix";
46
+
47
+ this.elem_move = function(e1, e2) {
48
+ e1.insert({after : e2});
49
+ }
50
+
51
+ // test div depth - some magento templates wrap fields in two layers of div in a li
52
+ this.set_div_depth = function() {
53
+ if ($(this.fields.postcode_id).up('div', 1).descendantOf($(this.fields.postcode_id).up('li'))) {
54
+ this.div_depth = 1;
55
+ }
56
+ }
57
+
58
+ this.rearrange_fields = function() {
59
+ var fields = this.fields;
60
+
61
+ // check we have a postcode field
62
+ if ($(fields.postcode_id)) {
63
+ if ('' != $(fields.town_id).getValue()) {
64
+ _cp_hide_fields = false;
65
+ }
66
+
67
+ if (_cp_move_fields) {
68
+ // postcode could be bundled with county/state or with town in the same li on the OSC templates
69
+ if ($(fields.county_id) && $(fields.county_id).up('li') == $(fields.postcode_id).up('li')) {
70
+ // create a new li to hold the county on its own and put it after the town
71
+ if ($(fields.town_id)) {
72
+ $(fields.town_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_county_placeholder_id"></li>'} );
73
+ $(this.prefix+"_county_placeholder_id").insert( $(fields.county_id).up('div', this.div_depth) );
74
+ }
75
+ } else if ($(fields.town_id) && $(fields.town_id).up('li') == $(fields.postcode_id).up('li')) {
76
+ // create a new li to hold the town on its own and put it after the postcode for now
77
+ $(fields.postcode_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_county_placeholder_id"></li>'} );
78
+ $(this.prefix+"_county_placeholder_id").insert( $(fields.town_id).up('div', this.div_depth) );
79
+ // we probably have the state/county field sitting with the country - separate
80
+ if ($(fields.county_id) && $(fields.county_id).up('li') == $(fields.country_id).up('li')) {
81
+ // put county with the town
82
+ $(fields.town_id).up('div', this.div_depth).insert( {after: $(fields.county_id).up('div', this.div_depth)} );
83
+ }
84
+ // and now move country to the top
85
+ $(fields.street1_id).up('li').insert( {before: $(fields.country_id).up('li')} );
86
+ }
87
+ }
88
+ /*
89
+ if ($(fields.company_id)) {
90
+ $(fields.company_id).up('li').addClassName(this.prefix+'_cp_address_class');
91
+ }*/
92
+ if ($(fields.street1_id)) {
93
+ $(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
94
+ }
95
+ if ($(fields.street2_id)) {
96
+ $(fields.street2_id).up('li').addClassName(this.prefix+'_cp_address_class');
97
+ }
98
+ if ($(fields.street3_id)) {
99
+ $(fields.street3_id).up('li').addClassName(this.prefix+'_cp_address_class');
100
+ }
101
+ if ($(fields.street4_id)) {
102
+ $(fields.street4_id).up('li').addClassName(this.prefix+'_cp_address_class');
103
+ }
104
+ if ($(fields.town_id)) {
105
+ $(fields.town_id).up('li').addClassName(this.prefix+'_cp_address_class');
106
+ }
107
+ if ($(fields.county_id)) {
108
+ $(fields.county_id).up('li').addClassName(this.prefix+'_cp_address_class');
109
+ }
110
+
111
+ return (true);
112
+ } else {
113
+ return (false);
114
+ }
115
+ }
116
+
117
+ this.setup_for_uk = function() {
118
+ // check if we need to do anything
119
+ if ('uk' != this.current_setup) {
120
+
121
+
122
+ // do the magic for UK
123
+ if (_cp_move_fields) {
124
+ // move postcode to the uk position after the country li
125
+ if ('hidden' != $(this.fields.country_id).readAttribute('type')) {
126
+ $(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
127
+ }
128
+ }
129
+ // add result box
130
+ if (!$(this.prefix+'_cp_result_display')) {
131
+ var tmp_html = '<li class="'+this.li_class+'" style="display: none"><div class="input-box input-country" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
132
+ // var tmp_html = '<li class="'+this.li_class+'" style="display: none"><div class="one-field" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
133
+ $(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
134
+ }
135
+ // show result box
136
+ $(this.prefix+"_cp_result_display").up('li').show();
137
+ // add button
138
+ if (!$(this.prefix+'_cp_button_div_id')) {
139
+ var tmp_html = '';
140
+ if (0 == this.div_depth) {
141
+ tmp_html = '<div class="input-box" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><br/>';
142
+ } else {
143
+ tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
144
+ }
145
+ if ('' != _cp_button_image) {
146
+ tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
147
+ } else {
148
+ tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'"><span><span>'+_cp_button_text+'</span></span></button>';
149
+ }
150
+ if (0 == this.div_depth) {
151
+ tmp_html += '</div>';
152
+ } else {
153
+ tmp_html += '</div></div>';
154
+ }
155
+ $(this.fields.postcode_id).up('div', this.div_depth).insert( {after : tmp_html} );
156
+ $(this.prefix+"_cp_button_id").observe('click', this.button_clicked.bindAsEventListener(this));
157
+ }
158
+ // show button
159
+ $(this.prefix+"_cp_button_div_id").show();
160
+
161
+ // shrink postcode field if needed
162
+ if ('' != this.uk_postcode_width) {
163
+ this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
164
+ $(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
165
+ }
166
+
167
+ // hide county if requested (and if it exists in the html at all)
168
+ if (_cp_hide_county) {
169
+ ne = $(this.fields.county_id);
170
+ if (ne) {
171
+ ne.up('div', this.div_depth).hide();
172
+ }
173
+ }
174
+ }
175
+
176
+ if ('initial' == this.current_setup && _cp_hide_fields) {
177
+ // first time and default to UK, hide address fields
178
+ $('.'+this.prefix+'_cp_address_class').invoke('hide');
179
+ }
180
+
181
+ // set state
182
+ this.current_setup = 'uk';
183
+ }
184
+
185
+ this.setup_for_non_uk = function() {
186
+ // check if we need to do anything
187
+ if ('non_uk' != this.current_setup) {
188
+ // hide result box (if it exist already)
189
+ if ($(this.prefix+"_cp_result_display")) {
190
+ this.cp_obj.update_res(null);
191
+ $(this.prefix+"_cp_result_display").up('li').hide();
192
+ }
193
+ // hide button (if it exist already)
194
+ if ($(this.prefix+"_cp_button_div_id")) {
195
+ $(this.prefix+"_cp_button_div_id").hide();
196
+ }
197
+ if (_cp_move_fields) {
198
+ // move postcode to the non-uk position after the town/county li
199
+ if ($(this.fields.county_id)) {
200
+ $(this.fields.county_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
201
+ } else if ($(this.fields.town_id)) {
202
+ $(this.fields.town_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
203
+ }
204
+ }
205
+ // restore postcode field width if needed
206
+ if ('' != this.old_postcode_width) {
207
+ $(this.fields.postcode_id).setStyle({width: this.old_postcode_width});
208
+ }
209
+ // show county if it was hidden (and exists in the html at all)
210
+ if (_cp_hide_county) {
211
+ ne = $(this.fields.county_id);
212
+ if (ne) {
213
+ ne.up('div', this.div_depth).show();
214
+ }
215
+ }
216
+
217
+ // show all other addres lines
218
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
219
+ // set state
220
+ this.current_setup = 'non_uk';
221
+ }
222
+ }
223
+
224
+ this.add_lookup = function(setup) {
225
+ cp_obj = CraftyPostcodeCreate();
226
+ this.cp_obj = cp_obj;
227
+ // config
228
+ this.prefix = setup.prefix;
229
+ this.fields = setup.fields;
230
+ cp_obj.set("access_token", _cp_token_fe);
231
+ cp_obj.set("res_autoselect", "0");
232
+ cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
233
+ cp_obj.set("form", "");
234
+ cp_obj.set("elem_company" , this.fields.company_id); // optional
235
+ cp_obj.set("elem_street1" , this.fields.street1_id);
236
+ cp_obj.set("elem_street2" , this.fields.street2_id);
237
+ cp_obj.set("elem_street3" , this.fields.street3_id);
238
+ cp_obj.set("elem_town" , this.fields.town_id);
239
+ if (_cp_hide_county) {
240
+ cp_obj.set("elem_county" , ""); // optional
241
+ } else {
242
+ cp_obj.set("elem_county" , this.fields.county_id); // optional
243
+ }
244
+ cp_obj.set("elem_postcode" , this.fields.postcode_id);
245
+ cp_obj.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found
246
+ cp_obj.set("max_width" , _cp_result_box_width);
247
+ if (1 < _cp_result_box_height) {
248
+ cp_obj.set("first_res_line", "");
249
+ cp_obj.set("max_lines" , _cp_result_box_height);
250
+ } else {
251
+ cp_obj.set("first_res_line", "----- please select your address ----");
252
+ cp_obj.set("max_lines" , 1);
253
+ }
254
+ cp_obj.set("busy_img_url" , _cp_busy_img_url);
255
+ cp_obj.set("hide_result" , _cp_clear_result);
256
+ cp_obj.set("traditional_county" , 1);
257
+ cp_obj.set("on_result_ready", this.result_ready.bindAsEventListener(this));
258
+ cp_obj.set("on_result_selected", this.result_selected.bindAsEventListener(this));
259
+ cp_obj.set("on_error", this.result_error.bindAsEventListener(this));
260
+ cp_obj.set("first_res_line", _cp_1st_res_line);
261
+ cp_obj.set("err_msg1", _cp_err_msg1);
262
+ cp_obj.set("err_msg2", _cp_err_msg2);
263
+ cp_obj.set("err_msg3", _cp_err_msg3);
264
+ cp_obj.set("err_msg4", _cp_err_msg4);
265
+ // initial page setup
266
+ this.set_div_depth();
267
+ if (this.rearrange_fields()) {
268
+ if (_cp_enable_for_uk_only && 'hidden' != $(this.fields.country_id).readAttribute('type')) {
269
+ this.country_changed();
270
+ $(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
271
+ } else {
272
+ this.setup_for_uk();
273
+ }
274
+ } else {
275
+ // alert ('Postcode Lookup could not be added!');
276
+ }
277
+
278
+
279
+ var holder = new Element('li', { 'class': 'fields' });
280
+ $(this.fields.street1_id).up('li').insert( {before: $(holder)} );
281
+ $(holder).insert( {top: $(this.fields.country_id).up('div').up('div')} );
282
+ $(holder).insert( {after: $(this.prefix +'_cp_result_display').up('li')} );
283
+ $(holder).insert( {after: $(this.fields.postcode_id).up('li')} );
284
+ }
285
+
286
+ this.country_changed = function(e) {
287
+ // show postcode lookup for:
288
+ // "GB" UK
289
+ // "JE" Jersey
290
+ // "GG" Guernsey
291
+ // "IM" Isle of Man
292
+ var curr_country = $(this.fields.country_id).getValue();
293
+ if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
294
+ this.setup_for_uk();
295
+ } else {
296
+ this.setup_for_non_uk();
297
+ }
298
+ }
299
+
300
+ this.button_clicked = function(e) {
301
+ if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').removeClassName(_cp_error_class);
302
+ this.cp_obj.doLookup();
303
+ }
304
+
305
+ this.result_ready = function() {
306
+ }
307
+
308
+ this.result_selected = function() {
309
+ if (_cp_clear_result) this.cp_obj.update_res(null);
310
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
311
+ }
312
+
313
+ this.result_error = function() {
314
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
315
+ if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').addClassName(_cp_error_class);
316
+ }
317
+ }
318
+
319
+ document.observe("dom:loaded", function() {
320
+
321
+ if (!_cp_integrate) return;
322
+
323
+ if ($("billing:postcode")) {
324
+ var cc1 = new CraftyClicksMagentoClass();
325
+ cc1.add_lookup({
326
+ "prefix" : "billing",
327
+ "fields" : { "postcode_id" : "billing:postcode",
328
+ "company_id" : "billing:company",
329
+ "street1_id" : "billing:street1",
330
+ "street2_id" : "billing:street2",
331
+ "street3_id" : "billing:street3",
332
+ "street4_id" : "billing:street4",
333
+ "town_id" : "billing:city",
334
+ "county_id" : "billing:region",
335
+ "country_id" : "billing:country_id" }
336
+ });
337
+ }
338
+
339
+ if ($("shipping:postcode")) {
340
+ var cc2 = new CraftyClicksMagentoClass();
341
+ cc2.add_lookup({
342
+ "prefix" : "shipping",
343
+ "fields" : { "postcode_id" : "shipping:postcode",
344
+ "company_id" : "shipping:company",
345
+ "street1_id" : "shipping:street1",
346
+ "street2_id" : "shipping:street2",
347
+ "street3_id" : "shipping:street3",
348
+ "street4_id" : "shipping:street4",
349
+ "town_id" : "shipping:city",
350
+ "county_id" : "shipping:region",
351
+ "country_id" : "shipping:country_id" }
352
+ });
353
+ }
354
+
355
+ });
356
+
js/craftyclicks/craftyclicks_magento.js CHANGED
@@ -328,11 +328,11 @@ function CraftyClicksMagentoClass () {
328
}
329
330
this.result_ready = function() {
331
- $('.'+this.prefix+'_cp_address_class').invoke('show');
332
}
333
334
this.result_selected = function() {
335
if (_cp_clear_result) this.cp_obj.update_res(null);
336
}
337
338
this.result_error = function() {
328
}
329
330
this.result_ready = function() {
331
}
332
333
this.result_selected = function() {
334
if (_cp_clear_result) this.cp_obj.update_res(null);
335
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
336
}
337
338
this.result_error = function() {
js/craftyclicks/craftyclicks_magento_admin.js CHANGED
@@ -326,6 +326,7 @@ document.observe("dom:loaded", function() {
326
327
var _cp_last_billing_attachement = null;
328
var _cp_last_shipping_attachement = null;
329
function _cp_check_and_attach() {
330
331
if ($('order-billing_address_postcode') && _cp_last_billing_attachement != $('order-billing_address_postcode')) {
@@ -364,6 +365,24 @@ function _cp_check_and_attach() {
364
});
365
}
366
367
window.setTimeout(function() { _cp_check_and_attach(); }, 500);
368
}
369
326
327
var _cp_last_billing_attachement = null;
328
var _cp_last_shipping_attachement = null;
329
+ var _cp_last_edit_attachement = null;
330
function _cp_check_and_attach() {
331
332
if ($('order-billing_address_postcode') && _cp_last_billing_attachement != $('order-billing_address_postcode')) {
365
});
366
}
367
368
+ if ($('postcode') && !$('postcode').disabled && _cp_last_edit_attachement != $('postcode')) {
369
+ _cp_last_edit_attachement = $('postcode');
370
+ var item_html_id = '';
371
+ var cc_tmp = new CraftyClicksMagentoClass();
372
+ cc_tmp.add_lookup({
373
+ "prefix" : item_html_id,
374
+ "fields" : { "postcode_id" : item_html_id+"postcode",
375
+ "company_id" : item_html_id+"company",
376
+ "street1_id" : item_html_id+"street0",
377
+ "street2_id" : item_html_id+"street1",
378
+ "street3_id" : item_html_id+"street2",
379
+ "street4_id" : item_html_id+"street3",
380
+ "town_id" : item_html_id+"city",
381
+ "county_id" : item_html_id+"region",
382
+ "country_id" : item_html_id+"country_id" }
383
+ });
384
+ }
385
+
386
window.setTimeout(function() { _cp_check_and_attach(); }, 500);
387
}
388
js/craftyclicks/craftyclicks_onepagecheckout.js CHANGED
@@ -294,11 +294,11 @@ function CraftyClicksMagentoClass () {
294
}
295
296
this.result_ready = function() {
297
- $('.'+this.prefix+'_cp_address_class').invoke('show');
298
}
299
300
this.result_selected = function() {
301
if (_cp_clear_result) this.cp_obj.update_res(null);
302
}
303
304
this.result_error = function() {
294
}
295
296
this.result_ready = function() {
297
}
298
299
this.result_selected = function() {
300
if (_cp_clear_result) this.cp_obj.update_res(null);
301
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
302
}
303
304
this.result_error = function() {
js/craftyclicks/craftyclicks_tm_firecheckout.js CHANGED
@@ -3,9 +3,9 @@
3
// the Crafty Clicks postcode / address finder functionality into these
4
// checkout extensions :
5
//
6
- // Tempates Master FireCheckout (templates-master.com)
7
- // http://www.magentocommerce.com/magento-connect/fire-checkout-ultimate-one-page-checkout.html
8
- //
9
// Provided by www.CraftyClicks.co.uk
10
//
11
// Requires standard CraftyClicks JS - tested with v4.9.1
@@ -82,29 +82,29 @@ function CraftyClicksMagentoClass () {
82
// check if we need to do anything
83
if ('uk' != this.current_setup) {
84
// do the magic for UK
85
- if (_cp_move_fields) {
86
- // move postcode to the uk position after the country li
87
- if ('hidden' != $(this.fields.country_id).readAttribute('type')) {
88
- $(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
89
- }
90
- }
91
// add result box
92
if (!$(this.prefix+'_cp_result_display')) {
93
var tmp_html = '<li class="wide" style="display: none"><div class="input-box" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
94
- $(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
95
$(this.fields.postcode_id).up('li').removeClassName('wide');
96
- $(this.fields.postcode_id).up('li').addClassName('fields');
97
}
98
// show result box
99
$(this.prefix+"_cp_result_display").up('li').show();
100
// add button
101
- if (!$(this.prefix+'_cp_button_div_id')) {
102
- var tmp_html = '';
103
- // check that postcode is wrapped up in two layers of div
104
- if (!$(this.fields.postcode_id).up('div', 1).descendantOf($(this.fields.postcode_id).up('li'))) {
105
- var newel = new Element('div', {'class': 'field'}).update($(this.fields.postcode_id).up('li').innerHTML);
106
- $(this.fields.postcode_id).up('li').update(newel);
107
- }
108
109
tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
110
if ('' != _cp_button_image) {
@@ -155,13 +155,13 @@ function CraftyClicksMagentoClass () {
155
if ($(this.prefix+"_cp_button_div_id")) {
156
$(this.prefix+"_cp_button_div_id").hide();
157
}
158
- if (_cp_move_fields) {
159
- // move postcode to the non-uk position after the town/county li
160
- if ($(this.fields.county_id)) {
161
- $(this.fields.county_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
162
- } else if ($(this.fields.town_id)) {
163
- $(this.fields.town_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
164
- }
165
}
166
// restore postcode field width if needed
167
if ('' != this.old_postcode_width) {
@@ -225,7 +225,7 @@ function CraftyClicksMagentoClass () {
225
cp_obj.set("err_msg4", _cp_err_msg4);
226
// initial page setup
227
if (this.rearrange_fields()) {
228
- if (_cp_enable_for_uk_only && 'hidden' != $(this.fields.country_id).readAttribute('type')) {
229
this.country_changed();
230
$(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
231
} else {
@@ -256,11 +256,11 @@ function CraftyClicksMagentoClass () {
256
}
257
258
this.result_ready = function() {
259
- $('.'+this.prefix+'_cp_address_class').invoke('show');
260
}
261
262
this.result_selected = function() {
263
if (_cp_clear_result) this.cp_obj.update_res(null);
264
}
265
266
this.result_error = function() {
3
// the Crafty Clicks postcode / address finder functionality into these
4
// checkout extensions :
5
//
6
+ // Tempates Master FireCheckout (templates-master.com)
7
+ // http://www.magentocommerce.com/magento-connect/fire-checkout-ultimate-one-page-checkout.html
8
+ //
9
// Provided by www.CraftyClicks.co.uk
10
//
11
// Requires standard CraftyClicks JS - tested with v4.9.1
82
// check if we need to do anything
83
if ('uk' != this.current_setup) {
84
// do the magic for UK
85
+ if (_cp_move_fields) {
86
+ // move postcode to the uk position after the country li
87
+ if ('hidden' != $(this.fields.country_id).readAttribute('type')) {
88
+ $(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
89
+ }
90
+ }
91
// add result box
92
if (!$(this.prefix+'_cp_result_display')) {
93
var tmp_html = '<li class="wide" style="display: none"><div class="input-box" id="'+this.prefix+'_cp_result_display">&nbsp;</div></li>';
94
+ $(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
95
$(this.fields.postcode_id).up('li').removeClassName('wide');
96
+ $(this.fields.postcode_id).up('li').addClassName('fields');
97
}
98
// show result box
99
$(this.prefix+"_cp_result_display").up('li').show();
100
// add button
101
+ if (!$(this.prefix+'_cp_button_div_id')) {
102
+ var tmp_html = '';
103
+ // check that postcode is wrapped up in two layers of div
104
+ if (!$(this.fields.postcode_id).up('div', 1).descendantOf($(this.fields.postcode_id).up('li'))) {
105
+ var newel = new Element('div', {'class': 'field'}).update($(this.fields.postcode_id).up('li').innerHTML);
106
+ $(this.fields.postcode_id).up('li').update(newel);
107
+ }
108
109
tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id">&nbsp;</label><div class="input-box">';
110
if ('' != _cp_button_image) {
155
if ($(this.prefix+"_cp_button_div_id")) {
156
$(this.prefix+"_cp_button_div_id").hide();
157
}
158
+ if (_cp_move_fields) {
159
+ // move postcode to the non-uk position after the town/county li
160
+ if ($(this.fields.county_id)) {
161
+ $(this.fields.county_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
162
+ } else if ($(this.fields.town_id)) {
163
+ $(this.fields.town_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
164
+ }
165
}
166
// restore postcode field width if needed
167
if ('' != this.old_postcode_width) {
225
cp_obj.set("err_msg4", _cp_err_msg4);
226
// initial page setup
227
if (this.rearrange_fields()) {
228
+ if (_cp_enable_for_uk_only && 'hidden' != $(this.fields.country_id).readAttribute('type')) {
229
this.country_changed();
230
$(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
231
} else {
256
}
257
258
this.result_ready = function() {
259
}
260
261
this.result_selected = function() {
262
if (_cp_clear_result) this.cp_obj.update_res(null);
263
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
264
}
265
266
this.result_error = function() {
js/craftyclicks/craftyclicks_vinagentocheckout.js CHANGED
@@ -266,11 +266,11 @@ function CraftyClicksMagentoClass () {
266
$(this.fields.street1_id).stopObserving(); $(this.fields.street1_id).value = "";
267
}
268
*/
269
- $('.'+this.prefix+'_cp_address_class').invoke('show');
270
}
271
272
this.result_selected = function() {
273
if (_cp_clear_result) this.cp_obj.update_res(null);
274
/* need to fix this - how do we hide the $%^&% labels ??!!!
275
var tmp_val;
276
if ($(this.fields.company_id)) {
266
$(this.fields.street1_id).stopObserving(); $(this.fields.street1_id).value = "";
267
}
268
*/
269
}
270
271
this.result_selected = function() {
272
if (_cp_clear_result) this.cp_obj.update_res(null);
273
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
274
/* need to fix this - how do we hide the $%^&% labels ??!!!
275
var tmp_val;
276
if ($(this.fields.company_id)) {
js/craftyclicks/craftyclicks_webandpeople_onepagecheckout.js CHANGED
@@ -261,11 +261,11 @@ function CraftyClicksMagentoClass () {
261
}
262
263
this.result_ready = function() {
264
- $('.'+this.prefix+'_cp_address_class').invoke('show');
265
}
266
267
this.result_selected = function() {
268
if (_cp_clear_result) this.cp_obj.update_res(null);
269
}
270
271
this.result_error = function() {
261
}
262
263
this.result_ready = function() {
264
}
265
266
this.result_selected = function() {
267
if (_cp_clear_result) this.cp_obj.update_res(null);
268
+ $('.'+this.prefix+'_cp_address_class').invoke('show');
269
}
270
271
this.result_error = function() {
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>UK_Postcode_Address_Finder</name>
4
- <version>2.4.5</version>
5
<stability>stable</stability>
6
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
<channel>community</channel>
@@ -14,7 +14,10 @@ This is a must-have for any webiste targeting the UK. The shoppers in the UK are
14
UK address entry is greatly speeded up thus improving the user experience. The benefits for the merchant are lower drop off rates on checkout/registration and improved quality of address data captured.&#xD;
15
&#xD;
16
The extension is free to try and install, but to go live a paid up account with Crafty Clicks will be required. For current prices please go to http://www.craftyclicks.co.uk/paf-database-pricing</description>
17
- <notes>Release History &#xD;
18
v2.4.5&#xD;
19
* fix packaging issue with v2.4.4, no changes.&#xD;
20
&#xD;
@@ -119,10 +122,10 @@ v 1.1.0 &#xD;
119
* add address lookup to multiship checkout pages&#xD;
120
&#xD;
121
v 1.0.0 - Initial Release</notes>
122
- <authors><author><name>Crafty Clicks</name><user>auto-converted</user><email>support@craftyclicks.co.uk</email></author></authors>
123
- <date>2013-10-14</date>
124
- <time>14:04:33</time>
125
- <contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="CraftyClicks"><dir name="Helper"><file name="Data.php" hash="e5f75947ad629aabb2e3cbcde412e2cc"/></dir><dir name="etc"><file name="config.xml" hash="8b9ebb016b837afc216c3af27daffb7f"/><file name="config.xml~" hash="899a2ba8e56a4040aa16f164e34afc48"/><file name="system.xml" hash="4d59155995bbeef1f8056a4b5f24cab1"/><file name="system.xml~" hash="dcde0b35d40eac36790d7180675de55d"/></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="CraftyClicks.xml" hash="64fc8c4a15bc3ee1e1d45911199a3b01"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="craftyclicks"><file name="common_config.phtml" hash="3d132fde56e2f849a9b4128f9b1437fe"/><file name="common_config.phtml~" hash="11c42a7f0366225407a2a6a883cf2e1a"/></dir></dir><dir name="layout"><file name="craftyclicks.xml" hash="564e0fc7c3800c85e51e6cbdd1f33413"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="craftyclicks.xml" hash="dad3bdf940efdc974b86784da78fe822"/></dir><dir name="template"><dir name="craftyclicks"><file name="common_config.phtml" hash="e1bb4493d4c35f46a1d3cfe60d503d97"/></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="craftyclicks"><file name="crafty_mage_onepage.js~" hash="70e8f88943a3fbf69747bb91327ca4a4"/><file name="crafty_postcode.class.js" hash="44593e9ea50fbfb6a6a35760b878331f"/><file name="craftyclicks_aheadworks_onestepcheckout.js" hash="06427c8acf5fdf405c4e95d37c301205"/><file name="craftyclicks_ath_oscheckout.js" hash="50f8f84903bb2e89195d1161bff6c0ac"/><file name="craftyclicks_ecomm_easycheckout.js" hash="4663cfd160a135e9a85756050f52c5f5"/><file name="craftyclicks_gomage_lightcheckout.js" hash="64954821816280d7855cb642b7012dd4"/><file name="craftyclicks_iwd_onestepcheckout.js" hash="28ebdefad4e7d5f8a2a0b5bfc3b425e1"/><file name="craftyclicks_magento.js" hash="4623a021c53a0ae94655d6e6f1f66673"/><file name="craftyclicks_magento.js~" hash="47dc15c554e7e767bfe1dfba723e5f50"/><file name="craftyclicks_magento_admin.js" hash="83aa04c1a46c9d0db0d56c8c5439c85f"/><file name="craftyclicks_magento_multiship.js~" hash="6793b51960f5cbf2a4eef2b2293e6c9c"/><file name="craftyclicks_onepagecheckout.js" hash="92acad18a8b7b40b6151db7c8ea99f47"/><file name="craftyclicks_tm_firecheckout.js" hash="4c0fdcf7f04a704cee0997221bee7fc1"/><file name="craftyclicks_vinagentocheckout.js" hash="0e2aae082fe6474184ecfe90e983ca66"/><file name="craftyclicks_webandpeople_onepagecheckout.js" hash="ef63d952fced1577e75a3446418eb478"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="craftyclicks"><file name="button_find_address.gif" hash="0fdef9bf7ad0f7ec3f6530b7ff40bf59"/><file name="crafty_postcode_busy.gif" hash="618a14f4dca4f51100cd2400e7f9049c"/></dir></dir></dir></dir></dir></dir></target></contents>
126
<compatible/>
127
- <dependencies/>
128
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>UK_Postcode_Address_Finder</name>
4
+ <version>2.4.6</version>
5
<stability>stable</stability>
6
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
<channel>community</channel>
14
UK address entry is greatly speeded up thus improving the user experience. The benefits for the merchant are lower drop off rates on checkout/registration and improved quality of address data captured.&#xD;
15
&#xD;
16
The extension is free to try and install, but to go live a paid up account with Crafty Clicks will be required. For current prices please go to http://www.craftyclicks.co.uk/paf-database-pricing</description>
17
+ <notes>Release History&#xD;
18
+ v2.4.6&#xD;
19
+ * Added support for Amesty One Step Checkout. Updated IWD Checkout support for a newer version. (backwards compatible to older IWD versions)&#xD;
20
+ &#xD;
21
v2.4.5&#xD;
22
* fix packaging issue with v2.4.4, no changes.&#xD;
23
&#xD;
122
* add address lookup to multiship checkout pages&#xD;
123
&#xD;
124
v 1.0.0 - Initial Release</notes>
125
+ <authors><author><name>Crafty Clicks</name><user>styloa</user><email>support@craftyclicks.co.uk</email></author></authors>
126
+ <date>2014-06-09</date>
127
+ <time>15:09:22</time>
128
+ <contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="CraftyClicks"><dir name="Helper"><file name="Data.php" hash="e5f75947ad629aabb2e3cbcde412e2cc"/></dir><dir name="etc"><file name="config.xml" hash="8b9ebb016b837afc216c3af27daffb7f"/><file name="system.xml" hash="4d59155995bbeef1f8056a4b5f24cab1"/></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="CraftyClicks.xml" hash="64fc8c4a15bc3ee1e1d45911199a3b01"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="craftyclicks"><file name="common_config.phtml" hash="2333be5ff418fe112e9af1548def52e3"/></dir></dir><dir name="layout"><file name="craftyclicks.xml" hash="c74e6d957904855ac7ec70ba5e594f63"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="craftyclicks.xml" hash="d78755c653604a6f969bf289e4a109b5"/></dir><dir name="template"><dir name="craftyclicks"><file name="common_config.phtml" hash="e1bb4493d4c35f46a1d3cfe60d503d97"/></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="craftyclicks"><file name="crafty_postcode.class.js" hash="44593e9ea50fbfb6a6a35760b878331f"/><file name="craftyclicks_aheadworks_onestepcheckout.js" hash="cf50ea20ebf90c128684a18297a232d6"/><file name="craftyclicks_amesty_onepagecheckout.js" hash="5d9e0aef9e1b92a99ba3ea49f57bf169"/><file name="craftyclicks_ath_oscheckout.js" hash="a4fd82428db4635f1e2937ac129e1900"/><file name="craftyclicks_ecomm_easycheckout.js" hash="728e1c3cf223f484f7b9050e84d34c10"/><file name="craftyclicks_gomage_lightcheckout.js" hash="a5c0b20eb5295c5e4561d55019d625a7"/><file name="craftyclicks_iwd_onestepcheckout.js" hash="69053cfee63961ecaced8672bf2386b5"/><file name="craftyclicks_iwd_onestepcheckout_v2_2.js" hash="ee241c97833fb0f24cf9e26ec80523bb"/><file name="craftyclicks_magento.js" hash="3f5947c26932192fa8a35d2a6e9fcc58"/><file name="craftyclicks_magento_admin.js" hash="75f3078d1d678a5813b66b439409679b"/><file name="craftyclicks_onepagecheckout.js" hash="2be54032160205ab7c5fe3e5bdd4d601"/><file name="craftyclicks_tm_firecheckout.js" hash="c469e57c3de18cbddbcc6fa30661d2da"/><file name="craftyclicks_vinagentocheckout.js" hash="250b2f05677fbf17f847b57ae2c50993"/><file name="craftyclicks_webandpeople_onepagecheckout.js" hash="7a9d5c9cf6b341e6e6102e38593bad81"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="craftyclicks"><file name="button_find_address.gif" hash="0fdef9bf7ad0f7ec3f6530b7ff40bf59"/><file name="crafty_postcode_busy.gif" hash="618a14f4dca4f51100cd2400e7f9049c"/></dir></dir></dir></dir></dir></dir></target></contents>
129
<compatible/>
130
+ <dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
131
</package>