Changeset 2372925
- Timestamp:
- 09/01/2020 09:25:19 AM (5 years ago)
- Location:
- clicktoaddress-auto-complete/trunk
- Files:
-
- 3 added
- 2 deleted
- 9 edited
-
admin/css/popup.css (modified) (1 diff)
-
admin/js/config.js (modified) (3 diffs)
-
admin/js/orders.js (modified) (4 diffs)
-
admin/js/popup.min.js (modified) (1 diff)
-
admin/js/users.js (modified) (3 diffs)
-
cc_logo.png (deleted)
-
clicktoaddress-auto-complete.php (modified) (1 diff)
-
crafty_postcode_busy.gif (deleted)
-
fetchify_logo.png (added)
-
fetchify_postcode_busy.gif (added)
-
frontend/js/checkout.js (modified) (4 diffs)
-
includes/class-wc-clicktoaddress-autocomplete-integration.php (modified) (6 diffs)
-
readme.txt (modified) (4 diffs)
-
wpml-config.xml (added)
Legend:
- Unmodified
- Added
- Removed
-
clicktoaddress-auto-complete/trunk/admin/css/popup.css
r1645076 r2372925 1 # crafty-background{1 #fetchify-popup { 2 2 font-family: Arial,Helvetica,sans-serif; 3 font-size: 14px; 4 background-color: rgba(0, 0, 0, 0.5); 5 position: fixed; 6 top: 0; 7 right: 0; 8 bottom: 0; 9 left: 0; 10 z-index: 1000; 11 } 12 #crafty-background #crafty-content { 13 position: relative; 14 margin-left: auto; 15 margin-right: auto; 16 margin-top: 8%; 17 background-color: white; 18 width: 100%; 19 max-width: 500px; 20 border-style: solid; 21 border-width: 1px; 22 border-color: rgba(0, 0, 0, 0.2); 23 border-radius: 0px; 24 padding: 20px; 25 -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); 26 } 27 #crafty-background #crafty-content h3 { 28 margin-top: 20px; 29 } 30 #crafty-background #crafty-content #craftyErrorDisplay { 31 display: none; 32 margin-top: 20px; 33 padding: 1em; 34 border-radius: 4px; 35 font-size: 15px; 36 font-weight: bold; 37 color: white; 38 background-color: #efa91f; 39 text-align: center; 40 } 41 #crafty-background #crafty-content #craftyResultDisplay { 42 margin-top: 20px; 43 margin-bottom: 5px; 44 } 45 #crafty-background #crafty-content form#craftyForm input:not(.cc-button-lg) { 46 width: 100%; 47 background-color: WhiteSmoke; 48 border: none; 49 border-radius: 3.5px; 50 padding: 10px; 51 margin-bottom: 1em; 52 -webkit-box-sizing: border-box; 53 -moz-box-sizing: border-box; 54 box-sizing: border-box; 55 } 56 #crafty-background #crafty-content form#craftyForm input.cc-button-lg { 57 background-color: #57AADA; 58 text-transform: uppercase; 59 font-weight: bold; 60 border-radius: 3.5px; 61 padding: 20px; 62 color: white; 63 cursor: pointer; 64 width: 100%; 65 border-width: 0px; 66 text-align: center; 67 } 68 #crafty-background #crafty-content img { 69 display: block; 70 margin: auto; 71 } 72 #crafty-background #crafty-content #craftyCloseButton { 73 width: 20px; 74 height: 20px; 75 float: right; 76 cursor: pointer; 77 fill: silver; 78 } 79 #crafty-background #crafty-content #craftyLoadingImg { 80 width: 50px; 81 height: 50px; 82 margin: 100px auto; 83 } 84 #crafty-background #crafty-content #craftyLoadingImg svg rect { 85 fill: #459fd3; 86 } 87 #crafty-background #crafty-content #craftyResultDisplay table { 88 width: 100%; 89 border-collapse: collapse; 90 } 91 #crafty-background #crafty-content #craftyResultDisplay table tr { 92 border-style: solid; 93 border-width: 1px; 94 border-color: #d3d3d3; 95 } 96 #crafty-background #crafty-content #craftyResultDisplay table tr td { 97 padding: 0.5em 0.75em; 98 } 99 #crafty-background #crafty-content #craftyResultDisplay table thead { 100 background-color: #e8e8e8; 101 font-weight: bold; 102 } 103 #crafty-background #crafty-content #craftyResultDisplay table tbody tr:nth-child(2n+1) { 104 background-color: rgba(175, 175, 175, 0.1); 105 } 106 #crafty-background #crafty-content #craftyResultDisplay table tbody tr:hover { 107 background-color: #57AADA; 108 color: #ffffff; 109 cursor: pointer; 110 } 111 #crafty-background #crafty-content #craftyResultDisplay table tbody tr td { 112 padding: 0.5em 0.75em; 113 } 114 115 #cc_insert_token { 116 color: #ea7601; 117 text-decoration: underline; 118 cursor: pointer; 119 } 120 121 /*# sourceMappingURL=popup.css.map */ 3 font-size: 14px; } 4 #fetchify-popup .fetchify-background { 5 background-color: rgba(0, 0, 0, 0.5); 6 position: fixed; 7 top: 0; 8 right: 0; 9 bottom: 0; 10 left: 0; 11 z-index: 1000; } 12 #fetchify-popup .fetchify-background .fetchify-content { 13 position: relative; 14 margin-left: auto; 15 margin-right: auto; 16 margin-top: 8%; 17 background-color: white; 18 width: 100%; 19 max-width: 500px; 20 border-style: solid; 21 border-width: 1px; 22 border-color: rgba(0, 0, 0, 0.2); 23 border-radius: 5px; 24 -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); 25 -webkit-touch-callout: none; 26 /* iOS Safari */ 27 -webkit-user-select: none; 28 /* Safari */ 29 -khtml-user-select: none; 30 /* Konqueror HTML */ 31 -moz-user-select: none; 32 /* Old versions of Firefox */ 33 -ms-user-select: none; 34 /* Internet Explorer/Edge */ 35 user-select: none; 36 /* Chrome, Edge, Opera and Firefox */ } 37 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-top { 38 padding: 20px 0; 39 border-bottom: 1px solid #ddd; } 40 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-top .fetchify-content-top-inner { 41 padding: 0 20px; } 42 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-top .fetchify-content-top-inner img { 43 display: block; 44 margin: auto; } 45 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-top .fetchify-content-top-inner .fetchify-close-button { 46 width: 20px; 47 height: 20px; 48 float: right; 49 cursor: pointer; 50 fill: silver; } 51 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-top .fetchify-content-top-inner .fetchify-close-button:hover { 52 fill: #063EA0; } 53 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom { 54 padding: 20px; } 55 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom h4 { 56 margin-top: 0; } 57 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-error-display { 58 display: none; 59 margin-bottom: 20px; 60 padding: 1em; 61 border-radius: 4px; 62 font-size: 15px; 63 font-weight: bold; 64 color: white; 65 background-color: #efa91f; 66 text-align: center; } 67 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom form.fetchify-form input:not([type="submit"]) { 68 width: 100%; 69 background-color: WhiteSmoke; 70 border: 1px solid #BDC4C9; 71 border-radius: 3.5px; 72 padding: 10px 15px; 73 margin-bottom: 10px; 74 line-height: 2; 75 -webkit-box-sizing: border-box; 76 -moz-box-sizing: border-box; 77 box-sizing: border-box; } 78 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom form.fetchify-form input.fetchify-load-button { 79 background-color: #14AAFE; 80 text-transform: uppercase; 81 font-weight: bold; 82 border-radius: 3.5px; 83 padding: 20px; 84 color: white; 85 cursor: pointer; 86 width: 100%; 87 border-width: 0px; } 88 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom form.fetchify-form input.fetchify-load-button:hover { 89 background-color: #063EA0; } 90 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-loading-img { 91 width: 50px; 92 height: 50px; 93 margin: 100px auto; } 94 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-loading-img svg rect { 95 fill: #063EA0; } 96 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table { 97 width: 100%; 98 border-collapse: collapse; } 99 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table tr { 100 border-style: solid; 101 border-width: 1px; 102 border-color: #d3d3d3; } 103 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table tr td { 104 padding: 0.5em 0.75em; } 105 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table thead { 106 background-color: #e8e8e8; 107 font-weight: bold; } 108 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table tbody tr:nth-child(2n+1) { 109 background-color: rgba(175, 175, 175, 0.1); } 110 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table tbody tr:hover { 111 background-color: #063EA0; 112 color: #ffffff; 113 cursor: pointer; } 114 #fetchify-popup .fetchify-background .fetchify-content .fetchify-content-bottom .fetchify-result-display table tbody tr td { 115 padding: 0.5em 0.75em; } -
clicktoaddress-auto-complete/trunk/admin/js/config.js
r2351596 r2372925 1 1 /* 2 * Crafty Clicksplugin for WooCommerce2 * Fetchify plugin for WooCommerce 3 3 * 4 4 * @author Crafty Clicks Limited 5 * @link https:// craftyclicks.co.uk5 * @link https://fetchify.com 6 6 * @copyright Copyright (c) 2020, Crafty Clicks Limited 7 7 * @license Licensed under the terms of the MIT license. 8 * @version 1. 2.18 * @version 1.3.0 9 9 */ 10 10 … … 112 112 }); 113 113 114 craftyHideSections();114 fetchifyHideSections(); 115 115 jQuery('.cc_enabled_select').on('change', function(){ 116 116 // Don't allow Auto-Complete and Postcode Lookup to be active at the same time … … 129 129 } 130 130 // Show / hide sections for each product 131 craftyHideSections();131 fetchifyHideSections(); 132 132 }); 133 133 }); 134 134 135 function craftyHideSections() {135 function fetchifyHideSections() { 136 136 var cc_sections = [ 137 137 'checkout', -
clicktoaddress-auto-complete/trunk/admin/js/orders.js
r2351596 r2372925 1 1 /* 2 * Crafty Clicksplugin for WooCommerce2 * Fetchify plugin for WooCommerce 3 3 * 4 4 * @author Crafty Clicks Limited 5 * @link https:// craftyclicks.co.uk5 * @link https://fetchify.com 6 6 * @copyright Copyright (c) 2020, Crafty Clicks Limited 7 7 * @license Licensed under the terms of the MIT license. 8 * @version 1. 2.18 * @version 1.3.0 9 9 */ 10 10 … … 25 25 var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc(); 26 26 var c2a_autocomplete_config = { 27 tag: 'w1- 2-1o',27 tag: 'w1-3-0o', 28 28 accessToken: window.cc_c2a_config.autocomplete.access_token, 29 29 domMode: 'object', … … 153 153 // Add the address search field 154 154 var tmp_html = jQuery( '<p class="form-field ' + prefix + '_cc_c2a_search_input_field">' + 155 '<label id=" crafty_find_label_' + prefix + '" for="' + prefix + '_cc_c2a_search_input">' +155 '<label id="fetchify_find_label_' + prefix + '" for="' + prefix + '_cc_c2a_search_input">' + 156 156 window.cc_c2a_config.autocomplete.search_label + 157 157 '</label>' + … … 178 178 window.cc_c2a_functions.autocomplete.add_button_css(cc_manual_button); 179 179 window.cc_c2a_functions.autocomplete.add_button_css(cc_hide_button); 180 var crafty_label = jQuery('#crafty_find_label_' + prefix);181 cc_manual_button.insertBefore( crafty_label);180 var fetchify_label = jQuery('#fetchify_find_label_' + prefix); 181 cc_manual_button.insertBefore(fetchify_label); 182 182 cc_hide_button.insertBefore(jQuery(dom.line_2).prev('label')); 183 183 -
clicktoaddress-auto-complete/trunk/admin/js/popup.min.js
r2351596 r2372925 1 function get_cc_token( a){cc_obj={},cc_obj.callback=a,cc_obj.token="",cc_obj.url="https://account-api.craftyclicks.co.uk/",cc_obj.login_details={},cc_obj.access_tokens=[],cc_obj.make_popup=function(){var a=jQuery('<div id="crafty-background"><div id="crafty-content"><div id="craftyCloseButton"><svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve"><g><g><g><path d="M207,182.8c-6.7-6.7-17.6-6.7-24.3,0s-6.7,17.6,0,24.3l38,38l-38,38c-6.7,6.7-6.7,17.6,0,24.3c3.3,3.3,7.7,5,12.1,5 c4.4,0,8.8-1.7,12.1-5l38-38l38,38c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5c6.7-6.7,6.7-17.6,0-24.3l-38-38l38-38 c6.7-6.7,6.7-17.6,0-24.3s-17.6-6.7-24.3,0l-38,38L207,182.8z"/><path d="M0,245c0,135.1,109.9,245,245,245s245-109.9,245-245S380.1,0,245,0S0,109.9,0,245z M455.7,245 c0,116.2-94.5,210.7-210.7,210.7S34.3,361.2,34.3,245S128.8,34.3,245,34.3S455.7,128.8,455.7,245z"/></g></g></g></svg></div><img src="' + ((typeof cc_c2a_logo_url !== 'undefined') ? cc_c2a_logo_url : '') + '" alt="Crafty Clicks" style="width:345px;height:54px;"><div id="craftyErrorDisplay"></div><form id="craftyForm"><h3>Log in to your Crafty Clicks account</h3><input id="cc-user" placeholder="Email"><input id="cc-password" type="password" placeholder="Password"></input><input id="craftyLoadButton" class="cc-button-lg" value="Load Tokens"></input></form><div id="craftyLoadingImg" style="display: none;"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 24 30" style="enable-background:new 0 0 50 50;" xml:space="preserve"><rect x="0" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite" /></rect><rect x="8" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite" /></rect><rect x="16" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite" /></rect></svg></div><div id="craftyResultDisplay" style="display: none"><h4>Your access tokens:</h4><table><thead><tr><td>ID</td><td>Token</td><td>Alias</td></tr></thead><tbody></tbody></table></div></div></div>');jQuery("body").append(a),jQuery("#craftyCloseButton").on("click",function(){cc_obj.close_popup()}),jQuery("#craftyLoadButton").on("click",function(a){cc_obj.loading(),setTimeout(function(){cc_obj.authenticate()},500)})},cc_obj.close_popup=function(){jQuery("#crafty-background").remove()},cc_obj.authenticate=function(){cc_obj.login_details.user=jQuery("#cc-user").val(),cc_obj.login_details.password=jQuery("#cc-password").val();var a=new XMLHttpRequest;a.open("GET",cc_obj.url+"access/token",!0),a.setRequestHeader("CRAFTY-CLICKS-APPLICATION-KEY","woocommerce-plugin"),a.setRequestHeader("Authorization","Basic "+btoa(cc_obj.login_details.user+":"+cc_obj.login_details.password)),a.send(),a.onreadystatechange=function(){if(4==a.readyState&&200==a.status){var b=JSON.parse(this.responseText);cc_obj.account_id=b.user_info.account_id;var c=new XMLHttpRequest;c.open("GET",cc_obj.url+"ws_tokens/get?account_id="+cc_obj.account_id,!0),c.setRequestHeader("CRAFTY-CLICKS-APPLICATION-KEY","woocommerce-plugin"),c.setRequestHeader("Authorization","Basic "+btoa(cc_obj.login_details.user+":"+cc_obj.login_details.password)),c.send(),c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var a=JSON.parse(this.responseText);if(a.ws_tokens.length){for(var b=0;b<a.ws_tokens.length;b++)!a.ws_tokens[b].deleted&&a.ws_tokens[b].enabled&&(cc_obj.access_tokens[b]={token_id:a.ws_tokens[b].token_id,access_token:a.ws_tokens[b].token,nickname:a.ws_tokens[b].nickname});cc_obj.display_token_list()}else cc_obj.error("No access tokens were found for this account.")}else 4==c.readyState&&200!=c.status&&cc_obj.error("Unable to retrieve access tokens as an error occurred. Please try again.")}}else 4==a.readyState&&401==a.status?cc_obj.error("There was a problem with the details you provided. Please try again."):4==a.readyState&&200!=a.status&&cc_obj.error("Unable to retrieve access tokens as an error occurred. Please try again.")}},cc_obj.loading=function(){jQuery("#craftyForm").css({display:"none"}),jQuery("#craftyLoadingImg").show()},cc_obj.display_token_list=function(){if(jQuery("#craftyLoadingImg").hide(),cc_obj.access_tokens.length){jQuery("#craftyErrorDisplay").hide(),jQuery("#craftyResultDisplay").show();for(var a="",b=0;b<cc_obj.access_tokens.length;b++)void 0!==cc_obj.access_tokens[b]&&(a+='<tr data-token="'+cc_obj.access_tokens[b].access_token+'"><td>'+cc_obj.access_tokens[b].token_id+"</td><td>"+cc_obj.access_tokens[b].access_token+"</td><td>"+cc_obj.access_tokens[b].nickname+"</td></tr>");jQuery("#craftyResultDisplay").find("tbody")[0].innerHTML=a,jQuery("#craftyResultDisplay").find("tr").each(function(a,b){jQuery(b).on("click",function(){cc_obj.callback(b.getAttribute("data-token")),cc_obj.close_popup()})})}else cc_obj.error("No access tokens were found for this account.")},cc_obj.error=function(a){jQuery("#craftyLoadingImg").hide(),jQuery("#craftyForm").show(),jQuery("#craftyErrorDisplay").show(),document.getElementById("craftyErrorDisplay").innerHTML=a},cc_obj.make_popup()}1 function get_cc_token(e){cc_obj={},cc_obj.callback=e,cc_obj.token="",cc_obj.url="https://account-api.craftyclicks.co.uk/",cc_obj.login_details={},cc_obj.access_tokens=[],cc_obj.make_popup=function(){var e=jQuery('<div id="fetchify-popup"><div class="fetchify-background"><div class="fetchify-content"><div class="fetchify-content-top"><div class="fetchify-content-top-inner"><div class="fetchify-close-button"><svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve"><g><g><g><path d="M207,182.8c-6.7-6.7-17.6-6.7-24.3,0s-6.7,17.6,0,24.3l38,38l-38,38c-6.7,6.7-6.7,17.6,0,24.3c3.3,3.3,7.7,5,12.1,5 c4.4,0,8.8-1.7,12.1-5l38-38l38,38c3.3,3.3,7.7,5,12.1,5s8.8-1.7,12.1-5c6.7-6.7,6.7-17.6,0-24.3l-38-38l38-38 c6.7-6.7,6.7-17.6,0-24.3s-17.6-6.7-24.3,0l-38,38L207,182.8z"/><path d="M0,245c0,135.1,109.9,245,245,245s245-109.9,245-245S380.1,0,245,0S0,109.9,0,245z M455.7,245 c0,116.2-94.5,210.7-210.7,210.7S34.3,361.2,34.3,245S128.8,34.3,245,34.3S455.7,128.8,455.7,245z"/></g></g></g></svg></div><img src="'+("undefined"!=typeof fetchify_logo_url?fetchify_logo_url:"")+'" alt="Fetchify"></div></div><div class="fetchify-content-bottom"><div class="fetchify-error-display"></div><form class="fetchify-form"><h4>Log in to your Fetchify account</h4><input id="cc-user" placeholder="Email"><input id="cc-password" type="password" placeholder="Password"></input><input class="fetchify-load-button" type="submit" value="Load Tokens"></input></form><div class="fetchify-loading-img" style="display: none;"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 24 30" style="enable-background:new 0 0 50 50;" xml:space="preserve"><rect x="0" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite" /></rect><rect x="8" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite" /></rect><rect x="16" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite" /><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite" /></rect></svg></div><div class="fetchify-result-display" style="display: none"><h4>Select an access token:</h4><table><thead><tr><td>ID</td><td>Token</td><td>Alias</td></tr></thead><tbody></tbody></table></div></div></div></div></div>');jQuery("body").append(e),jQuery(".fetchify-close-button").on("click",function(){cc_obj.close_popup()}),jQuery(".fetchify-load-button").on("click",function(e){e.preventDefault(),cc_obj.loading(),setTimeout(function(){cc_obj.authenticate()},500)})},cc_obj.close_popup=function(){jQuery("#fetchify-popup").remove()},cc_obj.authenticate=function(){cc_obj.login_details.user=jQuery("#cc-user").val(),cc_obj.login_details.password=jQuery("#cc-password").val();var t=new XMLHttpRequest;t.open("GET",cc_obj.url+"access/token",!0),t.setRequestHeader("CRAFTY-CLICKS-APPLICATION-KEY","woocommerce-plugin"),t.setRequestHeader("Authorization","Basic "+btoa(cc_obj.login_details.user+":"+cc_obj.login_details.password)),t.send(),t.onreadystatechange=function(){var e,c;4==t.readyState&&200==t.status?(e=JSON.parse(this.responseText),cc_obj.account_id=e.user_info.account_id,(c=new XMLHttpRequest).open("GET",cc_obj.url+"ws_tokens/get?account_id="+cc_obj.account_id,!0),c.setRequestHeader("CRAFTY-CLICKS-APPLICATION-KEY","woocommerce-plugin"),c.setRequestHeader("Authorization","Basic "+btoa(cc_obj.login_details.user+":"+cc_obj.login_details.password)),c.send(),c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var e=JSON.parse(this.responseText);if(e.ws_tokens.length){for(var t=0;t<e.ws_tokens.length;t++)!e.ws_tokens[t].deleted&&e.ws_tokens[t].enabled&&(cc_obj.access_tokens[t]={token_id:e.ws_tokens[t].token_id,access_token:e.ws_tokens[t].token,nickname:e.ws_tokens[t].nickname});cc_obj.display_token_list()}else cc_obj.error("No access tokens were found for this account.")}else 4==c.readyState&&200!=c.status&&cc_obj.error("Unable to retrieve access tokens as an error occurred. Please try again.")}):4==t.readyState&&401==t.status?cc_obj.error("There was a problem with the details you provided. Please try again."):4==t.readyState&&200!=t.status&&cc_obj.error("Unable to retrieve access tokens as an error occurred. Please try again.")}},cc_obj.loading=function(){jQuery(".fetchify-form").hide(100),jQuery(".fetchify-error-display").hide(100),jQuery(".fetchify-loading-img").show(100)},cc_obj.display_token_list=function(){if(jQuery(".fetchify-loading-img").hide(100),cc_obj.access_tokens.length){jQuery(".fetchify-error-display").hide(100),jQuery(".fetchify-result-display").show(100);for(var e="",t=0;t<cc_obj.access_tokens.length;t++)void 0!==cc_obj.access_tokens[t]&&(e+='<tr data-token="'+cc_obj.access_tokens[t].access_token+'"><td>'+cc_obj.access_tokens[t].token_id+"</td><td>"+cc_obj.access_tokens[t].access_token+"</td><td>"+cc_obj.access_tokens[t].nickname+"</td></tr>");jQuery(".fetchify-result-display").find("tbody")[0].innerHTML=e,jQuery(".fetchify-result-display").find("tr").each(function(e,t){jQuery(t).on("click",function(){cc_obj.callback(t.getAttribute("data-token")),cc_obj.close_popup()})})}else cc_obj.error("No access tokens were found for this account.")},cc_obj.error=function(e){jQuery(".fetchify-loading-img").hide(100),jQuery(".fetchify-form").show(100),jQuery(".fetchify-error-display").show(100),jQuery(".fetchify-error-display")[0].innerHTML=e},cc_obj.make_popup()} -
clicktoaddress-auto-complete/trunk/admin/js/users.js
r2351596 r2372925 1 1 /* 2 * Crafty Clicksplugin for WooCommerce2 * Fetchify plugin for WooCommerce 3 3 * 4 4 * @author Crafty Clicks Limited 5 * @link https:// craftyclicks.co.uk5 * @link https://fetchify.com 6 6 * @copyright Copyright (c) 2020, Crafty Clicks Limited 7 7 * @license Licensed under the terms of the MIT license. 8 * @version 1. 2.18 * @version 1.3.0 9 9 */ 10 10 … … 25 25 var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc(); 26 26 var c2a_autocomplete_config = { 27 tag: 'w1- 2-1u',27 tag: 'w1-3-0u', 28 28 accessToken: window.cc_c2a_config.autocomplete.access_token, 29 29 domMode: 'object', … … 151 151 var tmp_html = jQuery( '<tr>' + 152 152 '<th>' + 153 '<label for="' + prefix + '_cc_c2a_search_input" id=" crafty_find_label_' + prefix + '">' +153 '<label for="' + prefix + '_cc_c2a_search_input" id="fetchify_find_label_' + prefix + '">' + 154 154 window.cc_c2a_config.autocomplete.search_label + 155 155 '</label>' + -
clicktoaddress-auto-complete/trunk/clicktoaddress-auto-complete.php
r2351596 r2372925 1 1 <?php 2 2 /** 3 * Plugin Name: Crafty Clicks3 * Plugin Name: Fetchify 4 4 * Plugin URI: https://fetchify.com/integrations/woocommerce/ 5 * Description: Adds Crafty Clicks'Address Auto-Complete, Postcode Lookup, Phone Validation and Email Validation to WooCommerce address forms.6 * Version: 1. 2.17 * Author: Crafty Clicks5 * Description: Adds Fetchify's Address Auto-Complete, Postcode Lookup, Phone Validation and Email Validation to WooCommerce address forms. 6 * Version: 1.3.0 7 * Author: Fetchify 8 8 * Author URI: https://fetchify.com/ 9 9 * Text Domain: clicktoaddress-auto-complete 10 10 * WC requires at least: 2.4 11 * WC tested up to: 4. 311 * WC tested up to: 4.4 12 12 * Copyright: © 2020 Crafty Clicks. 13 13 * License: GNU General Public License v3.0 -
clicktoaddress-auto-complete/trunk/frontend/js/checkout.js
r2351596 r2372925 1 1 /* 2 * Crafty Clicksplugin for WooCommerce2 * Fetchify plugin for WooCommerce 3 3 * 4 4 * @author Crafty Clicks Limited 5 * @link https:// craftyclicks.co.uk5 * @link https://fetchify.com 6 6 * @copyright Copyright (c) 2020, Crafty Clicks Limited 7 7 * @license Licensed under the terms of the MIT license. 8 * @version 1. 2.18 * @version 1.3.0 9 9 */ 10 10 … … 25 25 var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc(); 26 26 var c2a_autocomplete_config = { 27 tag: 'w1- 2-1c',27 tag: 'w1-3-0c', 28 28 accessToken: window.cc_c2a_config.autocomplete.access_token, 29 29 domMode: 'object', … … 171 171 // Add the address search field 172 172 var tmp_html = jQuery( '<p class="form-row form-row form-row-wide address-field">' + 173 '<label id=" crafty_find_label_' + prefix+'">' +173 '<label id="fetchify_find_label_' + prefix+'">' + 174 174 window.cc_c2a_config.autocomplete.search_label + 175 175 '</label>' + … … 200 200 window.cc_c2a_functions.autocomplete.add_button_css(cc_manual_button); 201 201 window.cc_c2a_functions.autocomplete.add_button_css(cc_hide_button); 202 cc_manual_button.insertBefore(jQuery('# crafty_find_label_' + prefix));202 cc_manual_button.insertBefore(jQuery('#fetchify_find_label_' + prefix)); 203 203 if (window.cc_c2a_config.autocomplete.lock_country) { 204 204 cc_hide_button.insertBefore(jQuery(dom.line_1).closest('p').find('label')[0]); -
clicktoaddress-auto-complete/trunk/includes/class-wc-clicktoaddress-autocomplete-integration.php
r2351596 r2372925 5 5 * @package ClickToAddress Integration 6 6 * @category Integration 7 * @author Crafty Clicks7 * @author Fetchify 8 8 */ 9 9 … … 19 19 20 20 $this->id = 'clicktoaddress_autocomplete'; 21 $this->method_title = __( ' Crafty Clicks', 'woocommerce-clicktoaddress-autocomplete' );22 $this->method_description = __( 'Adds Crafty Clicksproducts to WooCommerce forms.', 'woocommerce-clicktoaddress-autocomplete' );21 $this->method_title = __( 'Fetchify', 'woocommerce-clicktoaddress-autocomplete' ); 22 $this->method_description = __( 'Adds Fetchify products to WooCommerce forms.', 'woocommerce-clicktoaddress-autocomplete' ); 23 23 24 24 // Load the settings. … … 66 66 'err_msg4' => $this->get_option( 'postcode_err_msg4' ), 67 67 'button_css' => $this->get_option( 'postcode_button_css' ), 68 'busy_img_url' => plugins_url( '../ crafty_postcode_busy.gif', __FILE__ )68 'busy_img_url' => plugins_url( '../fetchify_postcode_busy.gif', __FILE__ ) 69 69 ), 70 70 'phone' => (object) array( … … 105 105 wp_add_inline_script( 106 106 'clicktoaddress-autocomplete-js-popup', 107 'var cc_c2a_logo_url = "' . plugins_url( '../cc_logo.png', __FILE__ ) . '";', 107 'var fetchify_logo_url = "' . plugins_url( '../fetchify_logo.png', __FILE__ ) . '";', 108 108 109 'before' 109 110 ); … … 229 230 'type' => 'title', 230 231 'title' => __( 'Enabled Products', 'woocommerce' ), 231 'description' => __( 'Choose the Crafty Clicksproducts you would like to enable.', 'woocommerce' ),232 'description' => __( 'Choose the Fetchify products you would like to enable.', 'woocommerce' ), 232 233 'css' => '' 233 234 ), … … 276 277 'type' => 'title', 277 278 'title' => __( 'Access Token', 'woocommerce' ), 278 'description' => __( 'Enter the access token you received by email when you signed up for a Crafty Clicksaccount.', 'woocommerce' ),279 'description' => __( 'Enter the access token you received by email when you signed up for a Fetchify account.', 'woocommerce' ), 279 280 'css' => '' 280 281 ), -
clicktoaddress-auto-complete/trunk/readme.txt
r2351596 r2372925 1 === Crafty Clicks===1 === Fetchify === 2 2 Contributors: craftyclicks 3 3 Donate link: https://fetchify.com/ 4 4 Tags: address, autocomplete, checkout, data, email, lookup, phone, postcode, search, validation, verification, woocommerce 5 5 Requires at least: 4.0 6 Tested up to: 5. 47 Stable tag: 1. 2.16 Tested up to: 5.5 7 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 This plugin provides address auto-complete functionality on address forms on the front-end in WooCommerce.15 This plugin can be configured to provide up to 4 different data validation products. It replaces our previous plugins Crafty Clicks Address Auto-Complete and Crafty Clicks Postcode Lookup. 16 16 17 It provides international data for 240+ countries. 17 = Address Auto-Complete = 18 19 Adds address auto-fill, lookup and validation to address forms on the front-end in WooCommerce for over 240 countries. 18 20 19 21 The checkout experience becomes faster and easier as a customer no longer has to type out their full address. The smart predictive search helps speed up form filling and boosts usability. Every address is verified at the point of entry. Problems due to incorrect or badly typed address data are drastically reduced. 22 23 = Postcode Lookup = 24 25 The defacto solution for address capture and validation in the UK. Enter any UK postcode in the search field, click the search button and the drop down will show all the relevant address results for that postcode. Select the required address and the form will immediately be populated with accurate information. 26 27 = Phone Validation = 28 29 Verifies all number types and formats including mobile, international and landline numbers in every country/territory worldwide. Corrects and re-formats common mistakes within forms to ensure data quality. 30 31 = Email Validation = 32 33 Email Validation provides real-time validation of any email address. Invalid format emails are declined immediately while valid emails are checked to ensure they link to an active provider. The API verifies username and domain elements of the email address. 20 34 21 35 = Customer Satisfaction & Conversions = … … 23 37 24 38 = Data Quality = 25 User input is validated in real time and your customer database is populated with fully verified addresses. Fewer missed deliveries. 39 User input is validated in real time and your customer database is populated with fully verified addresses, phone numbers and email addresses. Address verification can reduce failed deliveries by up to 50%. 40 41 = WPML Compatibility = 42 43 This plugin is compatible with WPML to make your checkout multilingual. To find out more about WPML go to https://wpml.org/ 26 44 27 45 = Getting Started = … … 31 49 Our service is split into 3 parts: 32 50 33 1. A PI server that delivers the data34 2. aJS library that can retrieve the data, and generate a basic UI, regardless of platform35 3. a WooCommerce specific JS file. (located in clicktoaddress-auto-complete/js)51 1. An API server that delivers the data 52 2. A JS library that can retrieve the data, and generate a basic UI, regardless of platform 53 3. WooCommerce specific JS files (located in clicktoaddress-auto-complete/frontend/js and clicktoaddress-auto-complete/admin/js) 36 54 37 The JS library is located on our CDN to makesure that you will automatically receive any updates. If there's an update to the API and changes to the JS library are required in order for the plugin to function correctly, you will not have to worry about updating it yourself.55 The JS library is located on our CDN to ensure that you will automatically receive any updates. If there's an update to the API and changes to the JS library are required in order for the plugin to function correctly, you will not have to worry about updating it yourself. 38 56 39 57 == Installation == 40 58 41 1. Unpack the zip file and copy the clicktoaddress-auto-complete folder to your WordPress installation’s wp-content/plugins folder. 42 2. On the admin panel, go to Plugins / Installed Plugins, and activate the ClickToAddress Auto-Complete Integration. 43 3. From the admin panel, go to WooCommerce / Settings / Integration and click on the ClickToAddress Auto-Complete tab. Here you can insert your access token, which is needed to use this plugin on a live site. To get an access token, you will need to sign up for an account with us, and we will email you an access token. On this page you will also find configuration options, which are explained below in the Configuration section. When you have finished, click 'Save changes'. 44 4. You can test the plugin without an access token using our free test postcodes: AA11AA, AA11AB, AA11AD and AA11AE. If all is OK so far and you haven't got an account with us yet, register at www.craftyclicks.co.uk. You will get an email with your access token. Remember that you need a paid up account to go live on a public facing website (the trial only gives you up to 30 clicks of live address searches). 45 5. (optional) Any suggestions for improvements to the module? Let us know at [email protected]. 59 1. If you have not already done so, you will first need to sign up for a Fetchify account. We offer a trial account with 30 free lookups for testing. You will then receive an access token which will give you access to our service. 60 2. Unpack the zip file and copy the clicktoaddress-auto-complete folder to your WordPress installation’s wp-content/plugins folder. 61 3. In your WordPress admin panel, go to Plugins / Installed Plugins, and activate the Fetchify plugin. 62 4. From the admin panel, go to WooCommerce / Settings / Integration and select the Fetchify tab. Here you will need to insert your access token, which is required to use the plugin. To get an access token, you will need to sign up for an account with us, and we will email you an access token. On this page you can also choose the products you would like to enable. All products are disabled by default. Note that Address Auto-Complete and Postcode Lookup cannot both be active at the same time. For Address Auto-Complete, Postcode Lookup and Phone Validation, additional configuration options are available. These options will only become visible once the product has been enabled. Hover over the tooltip icons for more information about each setting. When you have finished configuring the plugin, click the ‘Save changes’ button at the bottom of the page. 63 5. Before you go live, test the integration to make sure it is working properly. We have postcodes that you can test for free. For Address Auto-Complete only: SL6 1QZ, for Postcode Lookup only: AA1 1AA, AA1 1AB, AA1 1AD and AA1 1AE. 64 Postcode Lookup only: AA1 1AA, AA1 1AB, AA1 1AD and AA1 1AE. 65 6. Once your trial lookups run out, you will need to decide on the best purchasing option based on the volume of usage you expect on your site. If you would like us to advise you then please get in touch. 46 66 47 == Configuration == 67 If you need assistance, drop us an email on [email protected] – we will help! 48 68 49 * Search Layout: You can change whether the search interface is displayed below the search field or surrounds the search field. 50 * Hide Address Fields: There is an option to hide address fields until a search result is selected. This means that a customer has to use the address search box to enter an address and the accuracy of addresses that are captured is improved. 69 = WPML Configuration = 70 Our plugin is compatible with https://wpml.org/ which allows translation of certain texts in the search UI. The following texts can be translated. 71 72 Address Auto-Complete: 73 * Search field label 74 * Reveal fields button 75 * Hide fields button 76 * Search field placeholder 77 * Country search placeholder 78 * Change country button 79 * Generic error message 80 * No results message 81 82 Postcode Lookup: 83 * Lookup button text 84 * Search in progress message 85 * Unknown postcode message 86 * Invalid postcode message 87 * Server error message 88 * Unknown error message 89 90 If you want to use WPML to translate the Fetchify plugin, the following plugins must first be installed: 91 * Fetchify 92 * WPML Multilingual CMS 93 * WPML String Translation 94 * WooCommerce Multilingual 95 96 You must also configure the Fetchify plugin first. You can find the plugin settings in WooCommerce / Settings / Integration / Fetchify. Select the products that you would like to enable and enter the texts you would like to use for your site's default language. 97 98 1. In your WordPress admin panel, go to WPML / String Translation. 99 2. A list will be displayed showing all strings available for translation. First you should filter this list to show only the options related to the plugin. You can do this using 'Select strings within domain'. You should select this domain: admin_texts_woocommerce_clicktoaddress_autocomplete_settings. This will display all the options from the Fetchify plugin that can be translated. Note that some of these options are for Address Auto-Complete and some are for Postcode Lookup. You can ignore any options that do not require translation. 100 3. For each option, click the 'translations' button next to the string. Here you can set custom translations for each language that you have enabled. When you are happy with the translation, make sure you mark that translation as complete, then save your changes. 101 102 Your translated texts will now appear in the search UI! 51 103 52 104 == Frequently Asked Questions == 53 105 54 106 = Do you offer support? = 55 Yes, we do offer support during normal business hours. If you run into any issues, let us know and we will be happyhelp.107 Yes, we do offer support during normal business hours. If you contact us outside these hours we will get back to you the next working day. If you run into any issues, let us know at [email protected] and we will be happy to help. 56 108 57 = Is this really completelyfree? =58 The extension is free to download and try, but to use it on a live site you will need a paid account with us. 109 = Is this plugin free? = 110 The extension is free to download and try, but to use it on a live site you will need a paid account with us. We do offer a free trial to test. 59 111 60 112 = Do I need to sign up for an account to try it? = 61 You’ll need a trial account to test. You can easily sign up for a free trial account. 113 You’ll need a trial account to test. You can easily sign up for a free trial account at our website fetchify.com. You do not need to give us your credit card details for a trial account. 114 115 = Can I use more than one of the products? = 116 Yes, our products are designed to work together and separately from the same plugin installation. However, you cannot use both Address Auto-Complete and Postcode Lookup on the same form. 117 118 = Will I need separate accounts for each product? = 119 No, one account covers all the products you choose to use. 62 120 63 121 == Changelog == 122 123 = 1.3.0 = 124 * Added WPML compatibility. 125 * Added Fetchify branding. 64 126 65 127 = 1.2.1 =
Note: See TracChangeset
for help on using the changeset viewer.