Version Notes
Release History
v2.4.9
* Added support for Awesome Checkout
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
Release Info
Developer | Crafty Clicks |
Extension | UK_Postcode_Address_Finder |
Version | 2.4.9 |
Comparing to | |
See all releases |
Code changes from version 2.4.8 to 2.4.9
@@ -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.9</version>
|
16 |
</CraftyClicks>
|
17 |
</modules>
|
18 |
|
@@ -144,4 +144,12 @@
|
|
144 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
145 |
</reference>
|
146 |
</aitcheckout_checkout_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
</layout>
|
144 |
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
145 |
</reference>
|
146 |
</aitcheckout_checkout_index>
|
147 |
+
|
148 |
+
<anattadesign_awesomecheckout_onepage_index>
|
149 |
+
<reference name="head">
|
150 |
+
<action method="addJs"><script>craftyclicks/crafty_postcode.class.js</script></action>
|
151 |
+
<action method="addJs"><script>craftyclicks/craftyclicks_awesome_checkout.js</script></action>
|
152 |
+
<block type="page/html" name="craftyclicks_config" template="craftyclicks/common_config.phtml"/>
|
153 |
+
</reference>
|
154 |
+
</anattadesign_awesomecheckout_onepage_index>
|
155 |
</layout>
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(typeof jQuery !== 'undefined')
|
2 |
+
jQuery.noConflict();
|
3 |
+
|
4 |
+
function CraftyClicksMagentoClass () {
|
5 |
+
this.prefix = "";
|
6 |
+
this.fields = { "postcode_id" : "", // required
|
7 |
+
"company_id" : "", // optional
|
8 |
+
"street1_id" : "", // required
|
9 |
+
"street2_id" : "", // optional
|
10 |
+
"street3_id" : "", // optional
|
11 |
+
"street4_id" : "", // optional
|
12 |
+
"town_id" : "", // required
|
13 |
+
"county_id" : "", // optional
|
14 |
+
"country_id" : "", // required
|
15 |
+
"email_id" : "" // required
|
16 |
+
};
|
17 |
+
|
18 |
+
this.current_setup = 'initial'; // can be 'uk' or 'non_uk'
|
19 |
+
this.uk_postcode_width = ''
|
20 |
+
this.old_postcode_width = '';
|
21 |
+
this.cp_obj = 0;
|
22 |
+
this.div_depth = 0;
|
23 |
+
this.li_class = '';
|
24 |
+
this.mw_opc = false;
|
25 |
+
|
26 |
+
this.elem_move = function(e1, e2) {
|
27 |
+
e1.insert({after : e2});
|
28 |
+
}
|
29 |
+
|
30 |
+
// test div depth - some magento temlates wrap fields in two layers of div in a li
|
31 |
+
this.set_div_depth = function() {
|
32 |
+
if ($(this.fields.postcode_id).up('div', 1).descendantOf($(this.fields.postcode_id).up('li'))) {
|
33 |
+
this.div_depth = 1;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
this.rearrange_fields = function() {
|
38 |
+
var fields = this.fields;
|
39 |
+
|
40 |
+
// postcode should be bundled with country in the same li on the standard magento address templates
|
41 |
+
// if this isn't the case, the rest of this code unlikely to work!
|
42 |
+
|
43 |
+
if ('' != $(fields.town_id).getValue()) {
|
44 |
+
_cp_hide_fields = false;
|
45 |
+
}
|
46 |
+
|
47 |
+
// order for non-UK: country, company (if we have it), street1, street2, street3 (if we have it), town, county (if we have it), postcode
|
48 |
+
var li_list = [ $(fields.country_id).up('li') ];
|
49 |
+
var idx = 1;
|
50 |
+
|
51 |
+
var ne = $(fields.company_id);
|
52 |
+
if (ne) {
|
53 |
+
li_list[idx] = ne.up('li'); idx++;
|
54 |
+
ne.up('li').addClassName(this.prefix+'_cp_address_class');
|
55 |
+
}
|
56 |
+
|
57 |
+
li_list[idx] = $(fields.street1_id).up('li'); idx++;
|
58 |
+
$(fields.street1_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
59 |
+
ne = $(fields.street2_id);
|
60 |
+
if (ne) {
|
61 |
+
li_list[idx] = ne.up('li'); idx++;
|
62 |
+
ne.up('li').addClassName(this.prefix+'_cp_address_class');
|
63 |
+
}
|
64 |
+
ne = $(fields.street3_id);
|
65 |
+
if (ne) {
|
66 |
+
li_list[idx] = ne.up('li'); idx++;
|
67 |
+
ne.up('li').addClassName(this.prefix+'_cp_address_class');
|
68 |
+
}
|
69 |
+
ne = $(fields.street4_id);
|
70 |
+
if (ne) {
|
71 |
+
li_list[idx] = ne.up('li'); idx++;
|
72 |
+
ne.up('li').addClassName(this.prefix+'_cp_address_class');
|
73 |
+
}
|
74 |
+
li_list[idx] = $(fields.town_id).up('li'); idx++; // town and county are on the same li, so will move together
|
75 |
+
$(fields.town_id).up('li').addClassName(this.prefix+'_cp_address_class');
|
76 |
+
|
77 |
+
|
78 |
+
li_list[idx] = $(fields.county_id).up('li'); idx++;
|
79 |
+
li_list[idx] = $(fields.postcode_id).up('li'); idx++;
|
80 |
+
|
81 |
+
for (var ii = 0; ii < idx; ii++) {
|
82 |
+
this.elem_move(li_list[ii], li_list[ii+1]);
|
83 |
+
}
|
84 |
+
// create a new li to hold the postcode on its own
|
85 |
+
//$(fields.town_id).up('li').insert( {after: '<li class="'+this.li_class+'" id="'+this.prefix+'_cp_postcode_placeholder_id"></li>'} );
|
86 |
+
|
87 |
+
//$(this.prefix+"_cp_postcode_placeholder_id").insert( $(this.fields.postcode_id).up('div', this.div_depth) );
|
88 |
+
|
89 |
+
// check postcode field width, longer than 350px means we are on a magento enterprise template and we need to shrink things a bit
|
90 |
+
// so the lookup button fits on the form next to the postcode field
|
91 |
+
var pcWidth = parseInt($(this.fields.postcode_id).getStyle("width"));
|
92 |
+
if (350 < pcWidth || _cp_button_fixposition) {
|
93 |
+
this.uk_postcode_width = '100px';
|
94 |
+
}
|
95 |
+
/*
|
96 |
+
// move the telephone above the address - we move it only if we hide other address fields
|
97 |
+
ne = $(fields.telephone_id);
|
98 |
+
if (_cp_hide_fields && ne) {
|
99 |
+
// telephone may be bundled with company, if so separate it out
|
100 |
+
if ($(fields.company_id) && ne.up('li') == $(fields.company_id).up('li')) {
|
101 |
+
// create a new li to hold the telephone on its own at the top of the address
|
102 |
+
$(fields.country_id).up('li').insert( {before: '<li class="'+this.li_class+'" id="'+this.prefix+'_telephone_placeholder_id"></li>'} );
|
103 |
+
$(this.prefix+"_telephone_placeholder_id").insert( ne.up('div', this.div_depth) );
|
104 |
+
} else {
|
105 |
+
// telephone is probably on its own, or with fax
|
106 |
+
$(fields.country_id).up('li').insert({before : ne.up('li')});
|
107 |
+
}
|
108 |
+
}
|
109 |
+
*/
|
110 |
+
return (true);
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
this.setup_for_uk = function() {
|
115 |
+
// check if we need to do anything
|
116 |
+
if ('uk' != this.current_setup) {
|
117 |
+
// do the magic for UK
|
118 |
+
|
119 |
+
// move postcode to the uk position after the country li
|
120 |
+
$(this.fields.country_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
|
121 |
+
// add result box
|
122 |
+
if (!$(this.prefix+'_cp_result_display')) {
|
123 |
+
var tmp_html = '<li class="'+this.li_class+'" style="display: none"><div class="input-box" id="'+this.prefix+'_cp_result_display"> </div></li>';
|
124 |
+
$(this.fields.postcode_id).up('li').insert( {after: tmp_html} );
|
125 |
+
}
|
126 |
+
// show result box
|
127 |
+
//$(this.prefix+"_cp_result_display").up('li').show();
|
128 |
+
// add button
|
129 |
+
if (!$(this.prefix+'_cp_button_div_id')) {
|
130 |
+
var tmp_html = '';
|
131 |
+
if (0 == this.div_depth) {
|
132 |
+
tmp_html = '<div class="input-box" id="'+this.prefix+'_cp_button_div_id">';
|
133 |
+
} else {
|
134 |
+
tmp_html = '<div class="field" id="'+this.prefix+'_cp_button_div_id"><div class="input-box">';
|
135 |
+
}
|
136 |
+
if ('' != _cp_button_image) {
|
137 |
+
tmp_html += '<img style="cursor: pointer;" src="'+_cp_button_image+'" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" title="'+_cp_button_text+'"/>';
|
138 |
+
} else {
|
139 |
+
tmp_html += '<button type="button" id="'+this.prefix+'_cp_button_id" class="'+_cp_button_class+'" style="height:100%; padding: 6px 6px; margin: 2px 5px;"><span><span>'+_cp_button_text+'</span></span></button>';
|
140 |
+
}
|
141 |
+
if (0 == this.div_depth) {
|
142 |
+
tmp_html += '</div>';
|
143 |
+
} else {
|
144 |
+
tmp_html += '</div></div>';
|
145 |
+
}
|
146 |
+
$(this.fields.postcode_id).up('div', this.div_depth).insert( {after : tmp_html} );
|
147 |
+
$(this.prefix+"_cp_button_id").observe('click', this.button_clicked.bindAsEventListener(this));
|
148 |
+
}
|
149 |
+
|
150 |
+
// shrink postcode field if needed
|
151 |
+
if ('' != this.uk_postcode_width) {
|
152 |
+
this.old_postcode_width = $(this.fields.postcode_id).getStyle("width");
|
153 |
+
$(this.fields.postcode_id).setStyle({width: this.uk_postcode_width});
|
154 |
+
}
|
155 |
+
|
156 |
+
// show button
|
157 |
+
$(this.prefix+"_cp_button_div_id").show();
|
158 |
+
|
159 |
+
// hide county if requested (and if it exists in the html at all)
|
160 |
+
if (_cp_hide_county) {
|
161 |
+
ne = $(this.fields.county_id);
|
162 |
+
if (ne) {
|
163 |
+
ne.up('div', this.div_depth+1).hide();
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
if ('initial' == this.current_setup && _cp_hide_fields) {
|
169 |
+
// first time and default to UK, hide address fields
|
170 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('hide');
|
171 |
+
}
|
172 |
+
|
173 |
+
// set state
|
174 |
+
this.current_setup = 'uk';
|
175 |
+
}
|
176 |
+
|
177 |
+
this.setup_for_non_uk = function() {
|
178 |
+
// check if we need to do anything
|
179 |
+
if ('non_uk' != this.current_setup) {
|
180 |
+
// hide result box (if it exist already)
|
181 |
+
if ($(this.prefix+"_cp_result_display")) {
|
182 |
+
this.cp_obj.update_res(null);
|
183 |
+
$(this.prefix+"_cp_result_display").up('li').hide();
|
184 |
+
}
|
185 |
+
// hide button (if it exist already)
|
186 |
+
if ($(this.prefix+"_cp_button_div_id")) {
|
187 |
+
$(this.prefix+"_cp_button_div_id").hide();
|
188 |
+
}
|
189 |
+
$(this.fields.street2_id).up('li').insert( {after: $(this.fields.postcode_id).up('li')} );
|
190 |
+
|
191 |
+
// restore postcode field width if needed
|
192 |
+
if ('' != this.old_postcode_width) {
|
193 |
+
$(this.fields.postcode_id).setStyle({width: this.old_postcode_width});
|
194 |
+
}
|
195 |
+
// show county if it was hidden (and exists in the html at all)
|
196 |
+
if (_cp_hide_county) {
|
197 |
+
ne = $(this.fields.county_id);
|
198 |
+
if (ne) {
|
199 |
+
ne.up('.state').show();
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
// show all other addres lines
|
204 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
205 |
+
// set state
|
206 |
+
this.current_setup = 'non_uk';
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
this.add_lookup = function(setup) {
|
211 |
+
cp_obj = CraftyPostcodeCreate();
|
212 |
+
this.cp_obj = cp_obj;
|
213 |
+
// config
|
214 |
+
this.prefix = setup.prefix;
|
215 |
+
this.fields = setup.fields;
|
216 |
+
cp_obj.set("access_token", _cp_token_fe);
|
217 |
+
cp_obj.set("res_autoselect", "0");
|
218 |
+
cp_obj.set("result_elem_id", this.prefix+"_cp_result_display");
|
219 |
+
cp_obj.set("form", "");
|
220 |
+
cp_obj.set("elem_company" , this.fields.company_id); // optional
|
221 |
+
cp_obj.set("elem_street1" , this.fields.street1_id);
|
222 |
+
cp_obj.set("elem_street2" , this.fields.street2_id);
|
223 |
+
cp_obj.set("elem_street3" , this.fields.street3_id);
|
224 |
+
cp_obj.set("elem_town" , this.fields.town_id);
|
225 |
+
if (_cp_hide_county) {
|
226 |
+
cp_obj.set("elem_county" , ""); // optional
|
227 |
+
} else {
|
228 |
+
cp_obj.set("elem_county" , this.fields.county_id); // optional
|
229 |
+
}
|
230 |
+
cp_obj.set("elem_postcode" , this.fields.postcode_id);
|
231 |
+
cp_obj.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found
|
232 |
+
cp_obj.set("max_width" , _cp_result_box_width);
|
233 |
+
if (1 < _cp_result_box_height) {
|
234 |
+
cp_obj.set("first_res_line", "");
|
235 |
+
cp_obj.set("max_lines" , _cp_result_box_height);
|
236 |
+
} else {
|
237 |
+
cp_obj.set("first_res_line", "----- please select your address ----");
|
238 |
+
cp_obj.set("max_lines" , 1);
|
239 |
+
}
|
240 |
+
cp_obj.set("busy_img_url" , _cp_busy_img_url);
|
241 |
+
cp_obj.set("hide_result" , _cp_clear_result);
|
242 |
+
cp_obj.set("traditional_county" , 1);
|
243 |
+
cp_obj.set("on_result_ready", this.result_ready.bindAsEventListener(this));
|
244 |
+
cp_obj.set("on_result_selected", this.result_selected.bindAsEventListener(this));
|
245 |
+
cp_obj.set("on_error", this.result_error.bindAsEventListener(this));
|
246 |
+
cp_obj.set("first_res_line", _cp_1st_res_line);
|
247 |
+
cp_obj.set("err_msg1", _cp_err_msg1);
|
248 |
+
cp_obj.set("err_msg2", _cp_err_msg2);
|
249 |
+
cp_obj.set("err_msg3", _cp_err_msg3);
|
250 |
+
cp_obj.set("err_msg4", _cp_err_msg4);
|
251 |
+
// initial page setup
|
252 |
+
this.set_div_depth();
|
253 |
+
if (this.rearrange_fields()) {
|
254 |
+
if (_cp_enable_for_uk_only) {
|
255 |
+
this.country_changed();
|
256 |
+
//$(this.fields.country_id).observe('change', this.country_changed.bindAsEventListener(this));
|
257 |
+
jQuery(jq(this.fields.country_id)).on('change',this.country_changed.bindAsEventListener(this));
|
258 |
+
} else {
|
259 |
+
this.setup_for_uk();
|
260 |
+
}
|
261 |
+
} else {
|
262 |
+
// alert ('Postcode Lookup could not be added!');
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
this.country_changed = function(e) {
|
267 |
+
// show postcode lookup for:
|
268 |
+
// "GB" UK
|
269 |
+
// "JE" Jersey
|
270 |
+
// "GG" Guernsey
|
271 |
+
// "IM" Isle of Man
|
272 |
+
var curr_country = $(this.fields.country_id).getValue();
|
273 |
+
if ('GB' == curr_country || 'JE' == curr_country || 'GG' == curr_country || 'IM' == curr_country) {
|
274 |
+
this.setup_for_uk();
|
275 |
+
} else {
|
276 |
+
this.setup_for_non_uk();
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
this.button_clicked = function(e) {
|
281 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').removeClassName(_cp_error_class);
|
282 |
+
this.cp_obj.doLookup();
|
283 |
+
$(this.prefix+"_cp_result_display").up('li').show();
|
284 |
+
}
|
285 |
+
|
286 |
+
this.result_ready = function() {
|
287 |
+
}
|
288 |
+
|
289 |
+
this.result_selected = function() {
|
290 |
+
if (_cp_clear_result) this.cp_obj.update_res(null);
|
291 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
292 |
+
$(this.prefix+"_cp_result_display").up('li').hide();
|
293 |
+
}
|
294 |
+
|
295 |
+
this.result_error = function() {
|
296 |
+
$$('.'+this.prefix+'_cp_address_class').invoke('show');
|
297 |
+
if ('' != _cp_error_class) $(this.prefix+'_cp_result_display').addClassName(_cp_error_class);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
document.observe("dom:loaded", function(){_cp_init_lookup();});
|
302 |
+
|
303 |
+
function _cp_init_lookup() {
|
304 |
+
|
305 |
+
if (!_cp_integrate) return;
|
306 |
+
|
307 |
+
setInterval(function(){
|
308 |
+
if($("billing:postcode") && !$$('.billing_cp_address_class').length != 0){
|
309 |
+
var cc1 = new CraftyClicksMagentoClass();
|
310 |
+
cc1.add_lookup({
|
311 |
+
"prefix" : "billing",
|
312 |
+
"fields" : { "postcode_id" : "billing:postcode",
|
313 |
+
"company_id" : "billing:company",
|
314 |
+
"street1_id" : "billing:street1",
|
315 |
+
"street2_id" : "billing:street2",
|
316 |
+
"street3_id" : "billing:street3",
|
317 |
+
"street4_id" : "billing:street4",
|
318 |
+
"town_id" : "billing:city",
|
319 |
+
"county_id" : "billing:region",
|
320 |
+
"country_id" : "billing:country_id",
|
321 |
+
"email_id" : "billing:email",
|
322 |
+
"telephone_id": "billing:telephone" }
|
323 |
+
});
|
324 |
+
}
|
325 |
+
if ($("shipping:postcode") && !$$('.shipping_cp_address_class').length != 0) {
|
326 |
+
var cc2 = new CraftyClicksMagentoClass();
|
327 |
+
cc2.add_lookup({
|
328 |
+
"prefix" : "shipping",
|
329 |
+
"fields" : { "postcode_id" : "shipping:postcode",
|
330 |
+
"company_id" : "shipping:company",
|
331 |
+
"street1_id" : "shipping:street1",
|
332 |
+
"street2_id" : "shipping:street2",
|
333 |
+
"street3_id" : "shipping:street3",
|
334 |
+
"street4_id" : "shipping:street4",
|
335 |
+
"town_id" : "shipping:city",
|
336 |
+
"county_id" : "shipping:region",
|
337 |
+
"country_id" : "shipping:country_id",
|
338 |
+
"email_id" : "shipping:email",
|
339 |
+
"telephone_id": "shipping:telephone" }
|
340 |
+
});
|
341 |
+
}
|
342 |
+
|
343 |
+
},250);
|
344 |
+
|
345 |
+
|
346 |
+
if
|
347 |
+
($("zip")) {
|
348 |
+
var cc3 = new CraftyClicksMagentoClass();
|
349 |
+
cc3.add_lookup({
|
350 |
+
"prefix" : "",
|
351 |
+
"fields" : { "postcode_id" : "zip",
|
352 |
+
"company_id" : "company",
|
353 |
+
"street1_id" : "street_1",
|
354 |
+
"street2_id" : "street_2",
|
355 |
+
"street3_id" : "street_3",
|
356 |
+
"street4_id" : "street_4",
|
357 |
+
"town_id" : "city",
|
358 |
+
"county_id" : "region",
|
359 |
+
"country_id" : "country",
|
360 |
+
"email_id" : "email_address",
|
361 |
+
"telephone_id": "telephone" }
|
362 |
+
});
|
363 |
+
}
|
364 |
+
|
365 |
+
// preload the busy img
|
366 |
+
if ('' != _cp_busy_img_url) {
|
367 |
+
var image = new Image();
|
368 |
+
image.src = _cp_busy_img_url;
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
@@ -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,9 +15,12 @@ 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.8
|
19 |
-
*Added support for the new Responsive Magento Template. New option in settings: Button Absolute Position.
|
20 |
-
*If the company field is hidden, push the company data into the address field.
|
21 |

|
22 |
v2.4.7
|
23 |
*Added support for AITOC Checkout.
|
@@ -130,9 +133,9 @@ v 1.1.0 
|
|
130 |

|
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-
|
134 |
-
<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="
|
136 |
<compatible/>
|
137 |
<dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
|
138 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>UK_Postcode_Address_Finder</name>
|
4 |
+
<version>2.4.9</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.9
|
19 |
+
* Added support for Awesome Checkout
|
20 |
+

|
21 |
v2.4.8
|
22 |
+
* Added support for the new Responsive Magento Template. New option in settings: Button Absolute Position.
|
23 |
+
* If the company field is hidden, push the company data into the address field.
|
24 |

|
25 |
v2.4.7
|
26 |
*Added support for AITOC Checkout.
|
133 |

|
134 |
v 1.0.0 - Initial Release</notes>
|
135 |
<authors><author><name>Crafty Clicks</name><user>styloa</user><email>support@craftyclicks.co.uk</email></author></authors>
|
136 |
+
<date>2014-09-15</date>
|
137 |
+
<time>19:09:24</time>
|
138 |
+
<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="d25a6a33c3a92dcddc04197859323240"/><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="b825fe5968b19ba08c72bee8b7082904"/></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_awesome_checkout.js" hash="94a3fc551eca17e227c4524e2eb5a397"/><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>
|
139 |
<compatible/>
|
140 |
<dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
|
141 |
</package>
|