UK_Postcode_Address_Finder - Version 2.4.8

Version Notes

Release History
v2.4.8
*Added support for the new Responsive Magento Template. New option in settings: Button Absolute Position.
*If the company field is hidden, push the company data into the address field.

v2.4.7
*Added support for AITOC Checkout.

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.8
Comparing to
See all releases


Code changes from version 2.4.7 to 2.4.8

app/code/local/CraftyClicks/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <CraftyClicks>
15
- <version>2.4.5</version>
16
  </CraftyClicks>
17
  </modules>
18
 
@@ -65,6 +65,7 @@
65
  <error_msg_2>This postcode is not valid, please try again or enter your address manually</error_msg_2>
66
  <error_msg_3>Unable to connect to address lookup server, please enter your address manually</error_msg_3>
67
  <error_msg_4>An unexpected error occured, please enter your address manually</error_msg_4>
 
68
  </craftyclicks>
69
  </general>
70
  </default>
12
  <config>
13
  <modules>
14
  <CraftyClicks>
15
+ <version>2.4.8</version>
16
  </CraftyClicks>
17
  </modules>
18
 
65
  <error_msg_2>This postcode is not valid, please try again or enter your address manually</error_msg_2>
66
  <error_msg_3>Unable to connect to address lookup server, please enter your address manually</error_msg_3>
67
  <error_msg_4>An unexpected error occured, please enter your address manually</error_msg_4>
68
+ <button_fixposition>0</button_fixposition>
69
  </craftyclicks>
70
  </general>
71
  </default>
app/code/local/CraftyClicks/etc/system.xml CHANGED
@@ -29,7 +29,7 @@
29
  <show_in_website>1</show_in_website>
30
  <show_in_store>0</show_in_store>
31
  </active>
32
-
33
  <active_admin_panel translate="label">
34
  <label>Enabled - Admin Panel</label>
35
  <frontend_type>select</frontend_type>
@@ -79,6 +79,18 @@
79
  <show_in_store>0</show_in_store>
80
  <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>
81
  </button_class>
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  <hide_fields translate="label">
84
  <label>Hide Address Fields for New Address Entry</label>
29
  <show_in_website>1</show_in_website>
30
  <show_in_store>0</show_in_store>
31
  </active>
32
+
33
  <active_admin_panel translate="label">
34
  <label>Enabled - Admin Panel</label>
35
  <frontend_type>select</frontend_type>
79
  <show_in_store>0</show_in_store>
80
  <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>
81
  </button_class>
82
+
83
+ <button_fixposition translate="label">
84
+ <label>Button Absolute Position</label>
85
+ <frontend_type>select</frontend_type>
86
+ <source_model>adminhtml/system_config_source_yesno</source_model>
87
+ <sort_order>14</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ <comment>Force button to be displayed right next to the postcode input box. (required for the new default magento template)</comment>
92
+ </button_fixposition>
93
+
94
 
95
  <hide_fields translate="label">
96
  <label>Hide Address Fields for New Address Entry</label>
app/design/frontend/base/default/template/craftyclicks/common_config.phtml CHANGED
@@ -66,6 +66,11 @@ if (1 == $conf['craftyclicks']['active']) {
66
  } else {
67
  $js_config.= " var _cp_move_fields = false;";
68
  }
 
 
 
 
 
69
 
70
  } else { //if (1 == $conf['craftyclicks']['active']) {
71
  $js_config = " var _cp_integrate = false; ";
66
  } else {
67
  $js_config.= " var _cp_move_fields = false;";
68
  }
69
+ if (array_key_exists('button_fixposition',$conf['craftyclicks']) && 1 == $conf['craftyclicks']['button_fixposition']) {
70
+ $js_config.= " var _cp_button_fixposition = true;";
71
+ } else {
72
+ $js_config.= " var _cp_button_fixposition = false;";
73
+ }
74
 
75
  } else { //if (1 == $conf['craftyclicks']['active']) {
76
  $js_config = " var _cp_integrate = false; ";
app/etc/modules/CraftyClicks.xml CHANGED
@@ -4,7 +4,7 @@
4
  <CraftyClicks>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
- <version>2.4.5</version>
8
  </CraftyClicks>
9
  </modules>
10
  </config>
4
  <CraftyClicks>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
+ <version>2.4.8</version>
8
  </CraftyClicks>
9
  </modules>
10
  </config>
js/craftyclicks/craftyclicks_magento.js CHANGED
@@ -125,7 +125,7 @@ function CraftyClicksMagentoClass () {
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
 
@@ -181,7 +181,7 @@ function CraftyClicksMagentoClass () {
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+'"/>';
183
  } else {
184
- tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" style="height:100%"><span><span>'+_cp_button_text+'</span></span></button>';
185
  }
186
  if (0 == this.div_depth) {
187
  tmp_html += '</div>';
@@ -191,8 +191,6 @@ function CraftyClicksMagentoClass () {
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) {
@@ -200,6 +198,18 @@ function CraftyClicksMagentoClass () {
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) {
205
  ne = $(this.fields.county_id);
@@ -263,7 +273,8 @@ function CraftyClicksMagentoClass () {
263
  cp_obj.set("res_autoselect", "0");
264
  cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
265
  cp_obj.set("form", "");
266
- cp_obj.set("elem_company" , this.fields.company_id); // optional
 
267
  cp_obj.set("elem_street1" , this.fields.street1_id);
268
  cp_obj.set("elem_street2" , this.fields.street2_id);
269
  cp_obj.set("elem_street3" , this.fields.street3_id);
@@ -399,5 +410,10 @@ document.observe("dom:loaded", function() {
399
  });
400
  }
401
 
 
 
 
 
 
402
  });
403
 
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 || _cp_button_fixposition) {
129
  this.uk_postcode_width = '100px';
130
  }
131
 
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+'"/>';
183
  } else {
184
+ tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'"><span><span>'+_cp_button_text+'</span></span></button>';
185
  }
186
  if (0 == this.div_depth) {
187
  tmp_html += '</div>';
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
 
195
  // shrink postcode field if needed
196
  if ('' != this.uk_postcode_width) {
198
  $(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
199
  }
200
 
201
+ // black magic against new magento template
202
+
203
+ if(_cp_button_fixposition){
204
+ // button is below the input box. Set the bounding LI element relative
205
+ $(this.prefix+'_cp_button_div_id').up('li').setStyle({position:'relative'});
206
+ // set the button's div to absolute. (0,0 is the li's 0,0)
207
+ // set the button's div to be on same distance on Y axis as the input box & input box width + 10 px extra on the X axis.
208
+ $(this.prefix+'_cp_button_div_id').setStyle({position:'absolute', top: "0px", left: parseInt($(this.fields.postcode_id).getStyle('width')) + 10 + "px"});
209
+ }
210
+ // show button
211
+ $(this.prefix+"_cp_button_div_id").show();
212
+
213
  // hide county if requested (and if it exists in the html at all)
214
  if (_cp_hide_county) {
215
  ne = $(this.fields.county_id);
273
  cp_obj.set("res_autoselect", "0");
274
  cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
275
  cp_obj.set("form", "");
276
+ if ($(this.fields.company_id)) cp_obj.set("elem_company" , this.fields.company_id); // company field exists, use it
277
+ else cp_obj.set("elem_company" , this.fields.street1_id); // no company field, put company names on 1st line of address
278
  cp_obj.set("elem_street1" , this.fields.street1_id);
279
  cp_obj.set("elem_street2" , this.fields.street2_id);
280
  cp_obj.set("elem_street3" , this.fields.street3_id);
410
  });
411
  }
412
 
413
+ // preload the busy img
414
+ if ('' != _cp_busy_img_url) {
415
+ var image = new Image();
416
+ image.src = _cp_busy_img_url;
417
+ }
418
  });
419
 
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.7</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>
@@ -15,6 +15,10 @@ UK address entry is greatly speeded up thus improving the user experience. The b
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.7&#xD;
19
  *Added support for AITOC Checkout.&#xD;
20
  &#xD;
@@ -126,9 +130,9 @@ v 1.1.0 &#xD;
126
  &#xD;
127
  v 1.0.0 - Initial Release</notes>
128
  <authors><author><name>Crafty Clicks</name><user>styloa</user><email>support@craftyclicks.co.uk</email></author></authors>
129
- <date>2014-07-10</date>
130
- <time>10:41:59</time>
131
- <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="a00e29daabf49ca31b9bd5d6c37e2e31"/></dir></dir><dir name="layout"><file name="craftyclicks.xml" hash="6a2d0787193ce3249ee8791d5f5fba9c"/></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_aitoc_checkout.js" hash="c92b1d13b6292a64cdb6851e171ec329"/><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>
132
  <compatible/>
133
  <dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
134
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>UK_Postcode_Address_Finder</name>
4
+ <version>2.4.8</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>
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.8&#xD;
19
+ *Added support for the new Responsive Magento Template. New option in settings: Button Absolute Position.&#xD;
20
+ *If the company field is hidden, push the company data into the address field.&#xD;
21
+ &#xD;
22
  v2.4.7&#xD;
23
  *Added support for AITOC Checkout.&#xD;
24
  &#xD;
130
  &#xD;
131
  v 1.0.0 - Initial Release</notes>
132
  <authors><author><name>Crafty Clicks</name><user>styloa</user><email>support@craftyclicks.co.uk</email></author></authors>
133
+ <date>2014-08-26</date>
134
+ <time>11:05:03</time>
135
+ <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="bf304f31f05d91eee121b40d412e86aa"/><file name="system.xml" hash="dddb7095040104cde614e322bb40636e"/></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="CraftyClicks.xml" hash="f6644a9ea28f2b7dff329c4731b8473d"/></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="3c663645e65dd5b2efbc329876032856"/></dir></dir><dir name="layout"><file name="craftyclicks.xml" hash="6a2d0787193ce3249ee8791d5f5fba9c"/></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_aitoc_checkout.js" hash="c92b1d13b6292a64cdb6851e171ec329"/><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="9a48ef8a5ba1bbbc4ae7de09468129c7"/><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>
136
  <compatible/>
137
  <dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
138
  </package>