Version Notes
Release History
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
Release Info
Developer | Crafty Clicks |
Extension | UK_Postcode_Address_Finder |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
@@ -18,8 +18,6 @@
|
|
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 |
|
@@ -138,4 +136,12 @@
|
|
138 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
139 |
</reference>
|
140 |
</firecheckout_index_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
</layout>
|
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 |
|
136 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
137 |
</reference>
|
138 |
</firecheckout_index_index>
|
139 |
+
<aitcheckout_checkout_index>
|
140 |
+
<!-- AITOC one step checkout - http://www.aitoc.com/en/one_step_checkout_manager.html -->
|
141 |
+
<reference name="head">
|
142 |
+
<action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
|
143 |
+
<action method="addJs"><script>craftyclicks/craftyclicks_aitoc_checkout.js</script></action>
|
144 |
+
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
145 |
+
</reference>
|
146 |
+
</aitcheckout_checkout_index>
|
147 |
</layout>
|
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
$conf = Mage::getStoreConfig('general');
|
5 |
$js_config = "";
|
6 |
|
7 |
if (1 == $conf['craftyclicks']['active']) {
|
@@ -68,13 +67,6 @@ if (1 == $conf['craftyclicks']['active']) {
|
|
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 |
}
|
1 |
<?php
|
2 |
|
3 |
+
$conf = Mage::getStoreConfig('general');
|
|
|
4 |
$js_config = "";
|
5 |
|
6 |
if (1 == $conf['craftyclicks']['active']) {
|
67 |
$js_config.= " var _cp_move_fields = false;";
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
} else { //if (1 == $conf['craftyclicks']['active']) {
|
71 |
$js_config = " var _cp_integrate = false; ";
|
72 |
}
|
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
_cp_move_fields=true;
|
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 country & postcode on its own and put it after the postcode for now
|
77 |
+
$(fields.company_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
|
78 |
+
$(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.country_id).up('.field') );
|
79 |
+
$(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('.field') );
|
80 |
+
$(this.fields.town_id).up('.fields').insert( $(this.fields.county_id).up('.field') );
|
81 |
+
// we probably have the state/county field sitting with the country - separate
|
82 |
+
}
|
83 |
+
}
|
84 |
+
/*
|
85 |
+
if ($(fields.company_id)) {
|
86 |
+
$(fields.company_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
87 |
+
}*/
|
88 |
+
if ($(fields.street1_id)) {
|
89 |
+
$(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
90 |
+
}
|
91 |
+
if ($(fields.street2_id)) {
|
92 |
+
$(fields.street2_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
93 |
+
}
|
94 |
+
if ($(fields.street3_id)) {
|
95 |
+
$(fields.street3_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
96 |
+
}
|
97 |
+
if ($(fields.street4_id)) {
|
98 |
+
$(fields.street4_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
99 |
+
}
|
100 |
+
if ($(fields.town_id)) {
|
101 |
+
$(fields.town_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
102 |
+
}
|
103 |
+
if ($(fields.county_id)) {
|
104 |
+
$(fields.county_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
105 |
+
}
|
106 |
+
|
107 |
+
return (true);
|
108 |
+
} else {
|
109 |
+
return (false);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
this.setup_for_uk = function() {
|
114 |
+
// check if we need to do anything
|
115 |
+
if ('uk' != this.current_setup) {
|
116 |
+
// do the magic for UK
|
117 |
+
if (_cp_move_fields) {
|
118 |
+
// move postcode to the uk position after the country li
|
119 |
+
if ('hidden' != $(this.fields.country_id).readAttribute('type')) {
|
120 |
+
$(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
|
121 |
+
}
|
122 |
+
}
|
123 |
+
// add result box
|
124 |
+
if (!$(this.prefix+'_cp_result_display')) {
|
125 |
+
var tmp_html = '<li class="'+this.li_class+' wide" style="display: none"><div class="input-box input-country" id="'+this.prefix+'_cp_result_display"> </div></li>';
|
126 |
+
// var tmp_html = '<li class="'+this.li_class+'" style="display: none"><div class="one-field" id="'+this.prefix+'_cp_result_display"> </div></li>';
|
127 |
+
$(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
|
128 |
+
}
|
129 |
+
// show result box
|
130 |
+
//$(this.prefix+"_cp_result_display").up('li').show();
|
131 |
+
// add button
|
132 |
+
if (!$(this.prefix+'_cp_button_div_id')) {
|
133 |
+
var tmp_html = '';
|
134 |
+
if (0 == this.div_depth) {
|
135 |
+
tmp_html = '<div class="input-box" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id"> </label><br/>';
|
136 |
+
} else {
|
137 |
+
tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><label style="width:5px" for="'+this.prefix+'_cp_button_id"> </label><div class="input-box">';
|
138 |
+
}
|
139 |
+
if ('' != _cp_button_image) {
|
140 |
+
tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
|
141 |
+
} else {
|
142 |
+
tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'"><span><span>'+_cp_button_text+'</span></span></button>';
|
143 |
+
}
|
144 |
+
if (0 == this.div_depth) {
|
145 |
+
tmp_html += '</div>';
|
146 |
+
} else {
|
147 |
+
tmp_html += '</div></div>';
|
148 |
+
}
|
149 |
+
$(this.fields.postcode_id).up('div', this.div_depth).insert( {after : tmp_html} );
|
150 |
+
$(this.prefix+"_cp_button_id").observe('mouseup', this.button_clicked.bindAsEventListener(this));
|
151 |
+
}
|
152 |
+
// show button
|
153 |
+
$(this.prefix+"_cp_button_div_id").show();
|
154 |
+
|
155 |
+
// shrink postcode field if needed
|
156 |
+
if ('' != this.uk_postcode_width) {
|
157 |
+
this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
|
158 |
+
$(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
|
159 |
+
}
|
160 |
+
|
161 |
+
// hide county if requested (and if it exists in the html at all)
|
162 |
+
if (_cp_hide_county) {
|
163 |
+
ne = $(this.fields.county_id);
|
164 |
+
if (ne) {
|
165 |
+
ne.up('div', this.div_depth).hide();
|
166 |
+
}
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
if ('initial' == this.current_setup && _cp_hide_fields) {
|
171 |
+
// first time and default to UK, hide address fields
|
172 |
+
$$('.'+this.prefix+'_cp_address_class').each(function(e){e.hide();});
|
173 |
+
}
|
174 |
+
|
175 |
+
// set state
|
176 |
+
this.current_setup = 'uk';
|
177 |
+
}
|
178 |
+
|
179 |
+
this.setup_for_non_uk = function() {
|
180 |
+
// check if we need to do anything
|
181 |
+
if ('non_uk' != this.current_setup) {
|
182 |
+
// hide result box (if it exist already)
|
183 |
+
if ($(this.prefix+"_cp_result_display")) {
|
184 |
+
this.cp_obj.update_res(null);
|
185 |
+
$(this.prefix+"_cp_result_display").up('li').hide();
|
186 |
+
}
|
187 |
+
// hide button (if it exist already)
|
188 |
+
if ($(this.prefix+"_cp_button_div_id")) {
|
189 |
+
$(this.prefix+"_cp_button_div_id").hide();
|
190 |
+
}
|
191 |
+
/*
|
192 |
+
if (_cp_move_fields) {
|
193 |
+
// move postcode to the non-uk position after the town/county li
|
194 |
+
if ($(this.fields.county_id)) {
|
195 |
+
$(this.fields.county_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
|
196 |
+
} else if ($(this.fields.town_id)) {
|
197 |
+
$(this.fields.town_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
|
198 |
+
}
|
199 |
+
}*/
|
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 |
+
if (_cp_hide_county) {
|
235 |
+
cp_obj.set("elem_county" , ""); // optional
|
236 |
+
} else {
|
237 |
+
cp_obj.set("elem_county" , this.fields.county_id); // optional
|
238 |
+
}
|
239 |
+
cp_obj.set("elem_postcode" , this.fields.postcode_id);
|
240 |
+
cp_obj.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found
|
241 |
+
cp_obj.set("max_width" , _cp_result_box_width);
|
242 |
+
if (1 < _cp_result_box_height) {
|
243 |
+
cp_obj.set("first_res_line", "");
|
244 |
+
cp_obj.set("max_lines" , _cp_result_box_height);
|
245 |
+
} else {
|
246 |
+
cp_obj.set("first_res_line", "----- please select your address ----");
|
247 |
+
cp_obj.set("max_lines" , 1);
|
248 |
+
}
|
249 |
+
cp_obj.set("busy_img_url" , _cp_busy_img_url);
|
250 |
+
cp_obj.set("hide_result" , _cp_clear_result);
|
251 |
+
cp_obj.set("traditional_county" , 1);
|
252 |
+
cp_obj.set("on_result_ready", this.result_ready.bindAsEventListener(this));
|
253 |
+
cp_obj.set("on_result_selected", this.result_selected.bindAsEventListener(this));
|
254 |
+
cp_obj.set("on_error", this.result_error.bindAsEventListener(this));
|
255 |
+
cp_obj.set("first_res_line", _cp_1st_res_line);
|
256 |
+
cp_obj.set("err_msg1", _cp_err_msg1);
|
257 |
+
cp_obj.set("err_msg2", _cp_err_msg2);
|
258 |
+
cp_obj.set("err_msg3", _cp_err_msg3);
|
259 |
+
cp_obj.set("err_msg4", _cp_err_msg4);
|
260 |
+
// initial page setup
|
261 |
+
this.set_div_depth();
|
262 |
+
if (this.rearrange_fields()) {
|
263 |
+
if (_cp_enable_for_uk_only && 'hidden' != $(this.fields.country_id).readAttribute('type')) {
|
264 |
+
this.country_changed();
|
265 |
+
$(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
|
266 |
+
} else {
|
267 |
+
this.setup_for_uk();
|
268 |
+
}
|
269 |
+
} else {
|
270 |
+
// alert ('Postcode Lookup could not be added!');
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
this.country_changed = function(e) {
|
275 |
+
// show postcode lookup for:
|
276 |
+
// "GB" UK
|
277 |
+
// "JE" Jersey
|
278 |
+
// "GG" Guernsey
|
279 |
+
// "IM" Isle of Man
|
280 |
+
var curr_country = $(this.fields.country_id).getValue();
|
281 |
+
if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
|
282 |
+
this.setup_for_uk();
|
283 |
+
} else {
|
284 |
+
this.setup_for_non_uk();
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
this.button_clicked = function(e) {
|
289 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').removeClassName(_cp_error_class);
|
290 |
+
this.cp_obj.doLookup();
|
291 |
+
}
|
292 |
+
|
293 |
+
this.result_ready = function() {
|
294 |
+
$(this.prefix+'_cp_result_display').down('select').addClassName('form-control');
|
295 |
+
$(this.prefix+'_cp_result_display').up().show();
|
296 |
+
}
|
297 |
+
|
298 |
+
this.result_selected = function() {
|
299 |
+
if (_cp_clear_result) this.cp_obj.update_res(null);
|
300 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
301 |
+
}
|
302 |
+
|
303 |
+
this.result_error = function() {
|
304 |
+
$(this.prefix+'_cp_result_display').up().show();
|
305 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
306 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').addClassName(_cp_error_class);
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
document.observe("dom:loaded", function() {
|
311 |
+
|
312 |
+
if (!_cp_integrate) return;
|
313 |
+
|
314 |
+
if ($("billing:postcode")) {
|
315 |
+
var cc1 = new CraftyClicksMagentoClass();
|
316 |
+
cc1.add_lookup({
|
317 |
+
"prefix" : "billing",
|
318 |
+
"fields" : { "postcode_id" : "billing:postcode",
|
319 |
+
"company_id" : "billing:company",
|
320 |
+
"street1_id" : "billing:street1",
|
321 |
+
"street2_id" : "billing:street2",
|
322 |
+
"street3_id" : "billing:street3",
|
323 |
+
"street4_id" : "billing:street4",
|
324 |
+
"town_id" : "billing:city",
|
325 |
+
"county_id" : "billing:region",
|
326 |
+
"country_id" : "billing:country_id" }
|
327 |
+
});
|
328 |
+
}
|
329 |
+
|
330 |
+
if ($("shipping:postcode")) {
|
331 |
+
var cc2 = new CraftyClicksMagentoClass();
|
332 |
+
cc2.add_lookup({
|
333 |
+
"prefix" : "shipping",
|
334 |
+
"fields" : { "postcode_id" : "shipping:postcode",
|
335 |
+
"company_id" : "shipping:company",
|
336 |
+
"street1_id" : "shipping:street1",
|
337 |
+
"street2_id" : "shipping:street2",
|
338 |
+
"street3_id" : "shipping:street3",
|
339 |
+
"street4_id" : "shipping:street4",
|
340 |
+
"town_id" : "shipping:city",
|
341 |
+
"county_id" : "shipping:region",
|
342 |
+
"country_id" : "shipping:country_id" }
|
343 |
+
});
|
344 |
+
}
|
345 |
+
|
346 |
+
});
|
347 |
+
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>UK_Postcode_Address_Finder</name>
|
4 |
-
<version>2.4.
|
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,9 @@ UK address entry is greatly speeded up thus improving the user experience. The b
|
|
15 |

|
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
|
|
|
|
|
|
|
18 |
v2.4.6
|
19 |
* Added support for Amesty One Step Checkout. Updated IWD Checkout support for a newer version. (backwards compatible to older IWD versions)
|
20 |

|
@@ -123,9 +126,9 @@ v 1.1.0 
|
|
123 |

|
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-
|
127 |
-
<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="
|
129 |
<compatible/>
|
130 |
<dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
|
131 |
</package>
|
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 |

|
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
|
18 |
+
v2.4.7
|
19 |
+
*Added support for AITOC Checkout.
|
20 |
+

|
21 |
v2.4.6
|
22 |
* Added support for Amesty One Step Checkout. Updated IWD Checkout support for a newer version. (backwards compatible to older IWD versions)
|
23 |

|
126 |

|
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>
|