Version Notes
Release History
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 | Magento Core Team |
Extension | UK_Postcode_Address_Finder |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
@@ -12,7 +12,7 @@
|
|
12 |
<config>
|
13 |
<modules>
|
14 |
<CraftyClicks>
|
15 |
-
<version>2.4.
|
16 |
</CraftyClicks>
|
17 |
</modules>
|
18 |
|
12 |
<config>
|
13 |
<modules>
|
14 |
<CraftyClicks>
|
15 |
+
<version>2.4.3</version>
|
16 |
</CraftyClicks>
|
17 |
</modules>
|
18 |
|
@@ -110,4 +110,13 @@
|
|
110 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
111 |
</reference>
|
112 |
</oscheckout_index_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
</layout>
|
110 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
111 |
</reference>
|
112 |
</oscheckout_index_index>
|
113 |
+
|
114 |
+
<aw_onestepcheckout_index_index>
|
115 |
+
<!-- Ahead Works One Step Checkout - http://www.magentocommerce.com/magento-connect/one-step-checkout-by-aheadworks-8829.html -->
|
116 |
+
<reference name="head">
|
117 |
+
<action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
|
118 |
+
<action method="addJs"><script>craftyclicks/craftyclicks_aheadworks_onestepcheckout.js</script></action>
|
119 |
+
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
120 |
+
</reference>
|
121 |
+
</aw_onestepcheckout_index_index>
|
122 |
</layout>
|
@@ -4,7 +4,7 @@
|
|
4 |
<CraftyClicks>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
-
<version>2.4.
|
8 |
</CraftyClicks>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<CraftyClicks>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
+
<version>2.4.3</version>
|
8 |
</CraftyClicks>
|
9 |
</modules>
|
10 |
</config>
|
@@ -0,0 +1,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Magento checkout extensions :
|
5 |
+
//
|
6 |
+
// Ahead Works One Step Checkout
|
7 |
+
// http://www.magentocommerce.com/magento-connect/one-step-checkout-by-aheadworks-8829.html
|
8 |
+
//
|
9 |
+
// Provided by www.CraftyClicks.co.uk
|
10 |
+
//
|
11 |
+
// Requires standard CraftyClicks JS - tested with v4.9.2
|
12 |
+
//
|
13 |
+
// If you copy/use/modify this code - please keep this
|
14 |
+
// comment header in place
|
15 |
+
//
|
16 |
+
// Copyright (c) 2009-2013 Crafty Clicks (http://www.craftyclicks.com)
|
17 |
+
//
|
18 |
+
// This code relies on prototype js, you must have a reasonably recent version loaded
|
19 |
+
// in your template. Magento should include it as standard.
|
20 |
+
//
|
21 |
+
// If you need any help, contact support@craftyclicks.co.uk - we will help!
|
22 |
+
//
|
23 |
+
**********************************************************************************/
|
24 |
+
function CraftyClicksMagentoClass () {
|
25 |
+
this.prefix = "";
|
26 |
+
this.fields = { "postcode_id" : "", // required
|
27 |
+
"company_id" : "", // optional
|
28 |
+
"street1_id" : "", // required
|
29 |
+
"street2_id" : "", // optional
|
30 |
+
"street3_id" : "", // optional
|
31 |
+
"street4_id" : "", // optional
|
32 |
+
"town_id" : "", // required
|
33 |
+
"county_id" : "", // optional
|
34 |
+
"country_id" : "", // required
|
35 |
+
"telephone_id" : "" // required
|
36 |
+
};
|
37 |
+
|
38 |
+
this.current_setup = 'initial'; // can be 'uk' or 'non_uk'
|
39 |
+
this.uk_postcode_width = '114px';
|
40 |
+
this.old_postcode_width = '';
|
41 |
+
this.cp_obj = 0;
|
42 |
+
this.change_field_order = 1;
|
43 |
+
|
44 |
+
this.elem_move = function(e1, e2) {
|
45 |
+
e1.insert({after : e2});
|
46 |
+
}
|
47 |
+
|
48 |
+
this.rearrange_fields = function() {
|
49 |
+
var fields = this.fields;
|
50 |
+
// check postcode field exists
|
51 |
+
if (! $(fields.postcode_id)) return false;
|
52 |
+
|
53 |
+
// postcode could be bundled with county
|
54 |
+
if ($(fields.county_id).up('div', 1) == $(fields.postcode_id).up('div', 1).next() &&
|
55 |
+
$(fields.county_id).up('div', 1).hasClassName('aw-onestepcheckout-general-form-field-right') &&
|
56 |
+
$(fields.postcode_id).up('div', 1).hasClassName('aw-onestepcheckout-general-form-field-left')) {
|
57 |
+
|
58 |
+
// move the county and postcode on its own lines
|
59 |
+
$(fields.county_id).up('div', 1).removeClassName('aw-onestepcheckout-general-form-field-right');
|
60 |
+
$(fields.county_id).up('div', 1).addClassName('aw-onestepcheckout-general-form-field-wide');
|
61 |
+
$(fields.postcode_id).up('div', 1).removeClassName('aw-onestepcheckout-general-form-field-left');
|
62 |
+
$(fields.postcode_id).up('div', 1).addClassName('aw-onestepcheckout-general-form-field-wide');
|
63 |
+
}
|
64 |
+
|
65 |
+
if ('' != $(fields.town_id).getValue()) {
|
66 |
+
_cp_hide_fields = false;
|
67 |
+
}
|
68 |
+
|
69 |
+
// order for non-UK: country, company (if we have it), street1, street2, street3 (if we have it), town, county (if we have it), postcode
|
70 |
+
var li_list = [ $(fields.country_id).up('div', 1) ];
|
71 |
+
var idx = 1;
|
72 |
+
|
73 |
+
var ne = $(fields.company_id);
|
74 |
+
if (ne) {
|
75 |
+
li_list[idx] = ne.up('div', 1); idx++;
|
76 |
+
ne.up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
77 |
+
}
|
78 |
+
|
79 |
+
li_list[idx] = $(fields.street1_id).up('div', 1); idx++;
|
80 |
+
$(fields.street1_id).up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
81 |
+
ne = $(fields.street2_id);
|
82 |
+
if (ne) {
|
83 |
+
li_list[idx] = ne.up('div', 1); idx++;
|
84 |
+
ne.up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
85 |
+
}
|
86 |
+
ne = $(fields.street3_id);
|
87 |
+
if (ne) {
|
88 |
+
li_list[idx] = ne.up('div', 1); idx++;
|
89 |
+
ne.up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
90 |
+
}
|
91 |
+
ne = $(fields.street4_id);
|
92 |
+
if (ne) {
|
93 |
+
li_list[idx] = ne.up('div', 1); idx++;
|
94 |
+
ne.up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
95 |
+
}
|
96 |
+
li_list[idx] = $(fields.town_id).up('div', 1); idx++;
|
97 |
+
$(fields.town_id).up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
98 |
+
|
99 |
+
li_list[idx] = $(fields.county_id).up('div', 1); idx++;
|
100 |
+
$(fields.county_id).up('div', 1).addClassName(this.prefix+'_cp_address_class');
|
101 |
+
|
102 |
+
li_list[idx] = $(fields.postcode_id).up('div', 1); idx++;
|
103 |
+
|
104 |
+
if (this.change_field_order) {
|
105 |
+
for (var ii = 0; ii < idx; ii++) {
|
106 |
+
this.elem_move(li_list[ii], li_list[ii+1]);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
/*
|
111 |
+
// shrink postcode field width, so the lookup button fits on the form next to the postcode field
|
112 |
+
var pcWidth = parseInt($(this.fields.postcode_id).getStyle("width"));
|
113 |
+
if (350 < pcWidth) {
|
114 |
+
this.uk_postcode_width = '100px';
|
115 |
+
}
|
116 |
+
*/
|
117 |
+
return (true);
|
118 |
+
}
|
119 |
+
|
120 |
+
this.setup_for_uk = function() {
|
121 |
+
// check if we need to do anything
|
122 |
+
if ('uk' != this.current_setup) {
|
123 |
+
// do the magic for UK
|
124 |
+
// move postcode to the uk position after the country li
|
125 |
+
if (this.change_field_order) {
|
126 |
+
$(this.fields.country_id).up('div', 1).insert( {after: $(this.fields.postcode_id).up('div', 1)} );
|
127 |
+
}
|
128 |
+
// add result box
|
129 |
+
if (!$(this.prefix+'_cp_result_display')) {
|
130 |
+
var tmp_html = '</div><div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-wide" style="display: none"><label> </label><div class="input-box" id="'+this.prefix+'_cp_result_display"> </div></div>';
|
131 |
+
$(this.fields.postcode_id).up('div', 1).insert( {after: tmp_html} );
|
132 |
+
}
|
133 |
+
// show result box
|
134 |
+
$(this.prefix+"_cp_result_display").up('div').show();
|
135 |
+
// add button
|
136 |
+
if (!$(this.prefix+'_cp_button_div_id')) {
|
137 |
+
// postcode will be on its own by now...
|
138 |
+
$(this.fields.postcode_id).up('div', 1).removeClassName('aw-onestepcheckout-general-form-field-wide');
|
139 |
+
$(this.fields.postcode_id).up('div', 1).addClassName('aw-onestepcheckout-general-form-field-left');
|
140 |
+
var tmp_html = '<div class="aw-onestepcheckout-general-form-field aw-onestepcheckout-general-form-field-right" id="'+this.prefix+'_cp_button_div_id"><label> </label><div class="input-box">';
|
141 |
+
if ('' != _cp_button_image) {
|
142 |
+
tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
|
143 |
+
} else {
|
144 |
+
tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'"><span><span>'+_cp_button_text+'</span></span></button>';
|
145 |
+
}
|
146 |
+
tmp_html += '</div><div style="clear:both;"></div></div>';
|
147 |
+
|
148 |
+
$(this.fields.postcode_id).up('div', 1).insert( {after : tmp_html} );
|
149 |
+
$(this.prefix+"_cp_button_id").observe('click', this.button_clicked.bindAsEventListener(this));
|
150 |
+
}
|
151 |
+
// show button
|
152 |
+
$(this.prefix+"_cp_button_div_id").show();
|
153 |
+
|
154 |
+
// shrink postcode field if needed
|
155 |
+
if ('' != this.uk_postcode_width) {
|
156 |
+
this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
|
157 |
+
$(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
|
158 |
+
}
|
159 |
+
|
160 |
+
// hide county if requested (and if it exists in the html at all)
|
161 |
+
if (_cp_hide_county) {
|
162 |
+
ne = $(this.fields.county_id);
|
163 |
+
if (ne) {
|
164 |
+
ne.up('div', 1).hide();
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
if ('initial' == this.current_setup && _cp_hide_fields) {
|
170 |
+
// first time and default to UK, hide address fields
|
171 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('hide');
|
172 |
+
}
|
173 |
+
|
174 |
+
// set state
|
175 |
+
this.current_setup = 'uk';
|
176 |
+
}
|
177 |
+
|
178 |
+
this.setup_for_non_uk = function() {
|
179 |
+
// check if we need to do anything
|
180 |
+
if ('non_uk' != this.current_setup) {
|
181 |
+
// hide result box (if it exist already)
|
182 |
+
if ($(this.prefix+"_cp_result_display")) {
|
183 |
+
this.cp_obj.update_res(null);
|
184 |
+
$(this.prefix+"_cp_result_display").up('div').hide();
|
185 |
+
}
|
186 |
+
// hide button (if it exist already)
|
187 |
+
if ($(this.prefix+"_cp_button_div_id")) {
|
188 |
+
$(this.fields.postcode_id).up('div', 1).removeClassName('aw-onestepcheckout-general-form-field-left');
|
189 |
+
$(this.fields.postcode_id).up('div', 1).addClassName('aw-onestepcheckout-general-form-field-wide');
|
190 |
+
$(this.prefix+"_cp_button_div_id").remove();
|
191 |
+
}
|
192 |
+
// move postcode to the non-uk position after the town/county li
|
193 |
+
if (this.change_field_order) {
|
194 |
+
$(this.fields.county_id).up('div', 1).insert( {after: $(this.fields.postcode_id).up('div', 1)} );
|
195 |
+
}
|
196 |
+
// restore postcode field width if needed
|
197 |
+
if ('' != this.old_postcode_width) {
|
198 |
+
$(this.fields.postcode_id).setStyle({width: this.old_postcode_width});
|
199 |
+
}
|
200 |
+
// show county if it was hidden (and exists in the html at all)
|
201 |
+
if (_cp_hide_county) {
|
202 |
+
ne = $(this.fields.county_id);
|
203 |
+
if (ne) {
|
204 |
+
ne.up('div', 1).show();
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
// show all other addres lines
|
209 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
210 |
+
// set state
|
211 |
+
this.current_setup = 'non_uk';
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
this.add_lookup = function(setup) {
|
216 |
+
cp_obj = CraftyPostcodeCreate();
|
217 |
+
this.cp_obj = cp_obj;
|
218 |
+
// config
|
219 |
+
this.prefix = setup.prefix;
|
220 |
+
this.fields = setup.fields;
|
221 |
+
cp_obj.set("access_token", _cp_token_fe);
|
222 |
+
cp_obj.set("res_autoselect", "0");
|
223 |
+
cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
|
224 |
+
cp_obj.set("form", "");
|
225 |
+
cp_obj.set("elem_company" , this.fields.company_id); // optional
|
226 |
+
cp_obj.set("elem_street1" , this.fields.street1_id);
|
227 |
+
cp_obj.set("elem_street2" , this.fields.street2_id);
|
228 |
+
cp_obj.set("elem_street3" , this.fields.street3_id);
|
229 |
+
cp_obj.set("elem_town" , this.fields.town_id);
|
230 |
+
if (_cp_hide_county) {
|
231 |
+
cp_obj.set("elem_county" , ""); // optional
|
232 |
+
} else {
|
233 |
+
cp_obj.set("elem_county" , this.fields.county_id); // optional
|
234 |
+
}
|
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 |
+
if (this.rearrange_fields()) {
|
258 |
+
if (_cp_enable_for_uk_only) {
|
259 |
+
this.country_changed();
|
260 |
+
$(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
|
261 |
+
} else {
|
262 |
+
this.setup_for_uk();
|
263 |
+
}
|
264 |
+
} else {
|
265 |
+
// alert ('Postcode Lookup could not be added!');
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
this.country_changed = function(e) {
|
270 |
+
// show postcode lookup for:
|
271 |
+
// "GB" UK
|
272 |
+
// "JE" Jersey
|
273 |
+
// "GG" Guernsey
|
274 |
+
// "IM" Isle of Man
|
275 |
+
var curr_country = $(this.fields.country_id).getValue();
|
276 |
+
if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
|
277 |
+
this.setup_for_uk();
|
278 |
+
} else {
|
279 |
+
this.setup_for_non_uk();
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
this.button_clicked = function(e) {
|
284 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').removeClassName(_cp_error_class);
|
285 |
+
this.cp_obj.doLookup();
|
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() {
|
297 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
298 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').addClassName(_cp_error_class);
|
299 |
+
}
|
300 |
+
}
|
301 |
+
|
302 |
+
document.observe("dom:loaded", function() {
|
303 |
+
|
304 |
+
if (!_cp_integrate) return;
|
305 |
+
|
306 |
+
if ($("billing:postcode")) {
|
307 |
+
var cc1 = new CraftyClicksMagentoClass();
|
308 |
+
cc1.add_lookup({
|
309 |
+
"prefix" : "billing",
|
310 |
+
"fields" : { "postcode_id" : "billing:postcode",
|
311 |
+
"company_id" : "billing:company",
|
312 |
+
"street1_id" : "billing:street1",
|
313 |
+
"street2_id" : "billing:street2",
|
314 |
+
"street3_id" : "billing:street3",
|
315 |
+
"street4_id" : "billing:street4",
|
316 |
+
"town_id" : "billing:city",
|
317 |
+
"county_id" : "billing:region",
|
318 |
+
"country_id" : "billing:country_id",
|
319 |
+
"telephone_id": "billing:telephone" }
|
320 |
+
});
|
321 |
+
}
|
322 |
+
|
323 |
+
if ($("shipping:postcode")) {
|
324 |
+
var cc2 = new CraftyClicksMagentoClass();
|
325 |
+
cc2.add_lookup({
|
326 |
+
"prefix" : "shipping",
|
327 |
+
"fields" : { "postcode_id" : "shipping:postcode",
|
328 |
+
"company_id" : "shipping:company",
|
329 |
+
"street1_id" : "shipping:street1",
|
330 |
+
"street2_id" : "shipping:street2",
|
331 |
+
"street3_id" : "shipping:street3",
|
332 |
+
"street4_id" : "shipping:street4",
|
333 |
+
"town_id" : "shipping:city",
|
334 |
+
"county_id" : "shipping:region",
|
335 |
+
"country_id" : "shipping:country_id",
|
336 |
+
"telephone_id": "shipping:telephone" }
|
337 |
+
});
|
338 |
+
}
|
339 |
+
|
340 |
+
if ($("zip")) {
|
341 |
+
var cc3 = new CraftyClicksMagentoClass();
|
342 |
+
cc3.add_lookup({
|
343 |
+
"prefix" : "",
|
344 |
+
"fields" : { "postcode_id" : "zip",
|
345 |
+
"company_id" : "company",
|
346 |
+
"street1_id" : "street_1",
|
347 |
+
"street2_id" : "street_2",
|
348 |
+
"street3_id" : "street_3",
|
349 |
+
"street4_id" : "street_4",
|
350 |
+
"town_id" : "city",
|
351 |
+
"county_id" : "region",
|
352 |
+
"country_id" : "country",
|
353 |
+
"telephone_id": "telephone" }
|
354 |
+
});
|
355 |
+
}
|
356 |
+
|
357 |
+
});
|
358 |
+
|
@@ -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.2
|
19 |
* add support for further one-page-checkout extensions, supported now are: AHT, EcommerceTeam, GoMage, IWD, Magestore, Mage World, OneStepCheckout, Tempates Master, Vinagento, Web Experiment
|
20 |
* small changes to config settings
|
@@ -110,9 +113,9 @@ v 1.1.0 
|
|
110 |

|
111 |
v 1.0.0 - Initial Release</notes>
|
112 |
<authors><author><name>Crafty Clicks</name><user>auto-converted</user><email>support@craftyclicks.co.uk</email></author></authors>
|
113 |
-
<date>2013-08-
|
114 |
-
<time>
|
115 |
-
<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="
|
116 |
<compatible/>
|
117 |
<dependencies/>
|
118 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>UK_Postcode_Address_Finder</name>
|
4 |
+
<version>2.4.3</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.3
|
19 |
+
* add support of AheadWorks OneStepCheckout
|
20 |
+

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

|
114 |
v 1.0.0 - Initial Release</notes>
|
115 |
<authors><author><name>Crafty Clicks</name><user>auto-converted</user><email>support@craftyclicks.co.uk</email></author></authors>
|
116 |
+
<date>2013-08-20</date>
|
117 |
+
<time>11:17:53</time>
|
118 |
+
<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="afad8500a6a3191f7b923ced7dae1d70"/><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="a67641987f005f4651a8cdf764454334"/></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="5a9ebbf859f53cd0ea44f54e4abf51e8"/><file name="common_config.phtml~" hash="11c42a7f0366225407a2a6a883cf2e1a"/></dir></dir><dir name="layout"><file name="craftyclicks.xml" hash="dd6d8026d40a30011010df8363e22fd7"/></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="cd1f53eb75cc60e0e14512d2a6424394"/><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="2e17e7d0aedbb914bf742afb8bc57008"/><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>
|
119 |
<compatible/>
|
120 |
<dependencies/>
|
121 |
</package>
|