Plugin Directory

Changeset 2372925


Ignore:
Timestamp:
09/01/2020 09:25:19 AM (5 years ago)
Author:
craftyclicks
Message:

Added WPML compatibility, Fetchify branding

Location:
clicktoaddress-auto-complete/trunk
Files:
3 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • clicktoaddress-auto-complete/trunk/admin/css/popup.css

    r1645076 r2372925  
    1 #crafty-background {
     1#fetchify-popup {
    22  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  
    11/*
    2  * Crafty Clicks plugin for WooCommerce
     2 * Fetchify plugin for WooCommerce
    33 *
    44 * @author      Crafty Clicks Limited
    5  * @link        https://craftyclicks.co.uk
     5 * @link        https://fetchify.com
    66 * @copyright   Copyright (c) 2020, Crafty Clicks Limited
    77 * @license     Licensed under the terms of the MIT license.
    8  * @version     1.2.1
     8 * @version     1.3.0
    99 */
    1010
     
    112112    });
    113113
    114     craftyHideSections();
     114    fetchifyHideSections();
    115115    jQuery('.cc_enabled_select').on('change', function(){
    116116        // Don't allow Auto-Complete and Postcode Lookup to be active at the same time
     
    129129        }
    130130        // Show / hide sections for each product
    131         craftyHideSections();
     131        fetchifyHideSections();
    132132    });
    133133});
    134134
    135 function craftyHideSections() {
     135function fetchifyHideSections() {
    136136    var cc_sections = [
    137137        'checkout',
  • clicktoaddress-auto-complete/trunk/admin/js/orders.js

    r2351596 r2372925  
    11/*
    2 * Crafty Clicks plugin for WooCommerce
     2* Fetchify plugin for WooCommerce
    33*
    44* @author       Crafty Clicks Limited
    5 * @link         https://craftyclicks.co.uk
     5* @link         https://fetchify.com
    66* @copyright    Copyright (c) 2020, Crafty Clicks Limited
    77* @license      Licensed under the terms of the MIT license.
    8 * @version      1.2.1
     8* @version      1.3.0
    99*/
    1010
     
    2525    var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc();
    2626    var c2a_autocomplete_config = {
    27         tag:                        'w1-2-1o',
     27        tag:                        'w1-3-0o',
    2828        accessToken:                window.cc_c2a_config.autocomplete.access_token,
    2929        domMode:                    'object',
     
    153153        // Add the address search field
    154154        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">' +
    156156                                        window.cc_c2a_config.autocomplete.search_label +
    157157                                    '</label>' +
     
    178178        window.cc_c2a_functions.autocomplete.add_button_css(cc_manual_button);
    179179        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);
    182182        cc_hide_button.insertBefore(jQuery(dom.line_2).prev('label'));
    183183
  • 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()}
     1function 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  
    11/*
    2 * Crafty Clicks plugin for WooCommerce
     2* Fetchify plugin for WooCommerce
    33*
    44* @author       Crafty Clicks Limited
    5 * @link         https://craftyclicks.co.uk
     5* @link         https://fetchify.com
    66* @copyright    Copyright (c) 2020, Crafty Clicks Limited
    77* @license      Licensed under the terms of the MIT license.
    8 * @version      1.2.1
     8* @version      1.3.0
    99*/
    1010
     
    2525    var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc();
    2626    var c2a_autocomplete_config = {
    27         tag:                        'w1-2-1u',
     27        tag:                        'w1-3-0u',
    2828        accessToken:                window.cc_c2a_config.autocomplete.access_token,
    2929        domMode:                    'object',
     
    151151        var tmp_html = jQuery(  '<tr>' +
    152152                                    '<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 + '">' +
    154154                                            window.cc_c2a_config.autocomplete.search_label +
    155155                                        '</label>' +
  • clicktoaddress-auto-complete/trunk/clicktoaddress-auto-complete.php

    r2351596 r2372925  
    11<?php
    22/**
    3  * Plugin Name: Crafty Clicks
     3 * Plugin Name: Fetchify
    44 * 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.1
    7  * Author: Crafty Clicks
     5 * 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
    88 * Author URI: https://fetchify.com/
    99 * Text Domain: clicktoaddress-auto-complete
    1010 * WC requires at least: 2.4
    11  * WC tested up to: 4.3
     11 * WC tested up to: 4.4
    1212 * Copyright: © 2020 Crafty Clicks.
    1313 * License: GNU General Public License v3.0
  • clicktoaddress-auto-complete/trunk/frontend/js/checkout.js

    r2351596 r2372925  
    11/*
    2 * Crafty Clicks plugin for WooCommerce
     2* Fetchify plugin for WooCommerce
    33*
    44* @author       Crafty Clicks Limited
    5 * @link         https://craftyclicks.co.uk
     5* @link         https://fetchify.com
    66* @copyright    Copyright (c) 2020, Crafty Clicks Limited
    77* @license      Licensed under the terms of the MIT license.
    8 * @version      1.2.1
     8* @version      1.3.0
    99*/
    1010
     
    2525    var c2a_enabled_countries = window.cc_c2a_functions.autocomplete.countries_by_wc();
    2626    var c2a_autocomplete_config = {
    27         tag:                        'w1-2-1c',
     27        tag:                        'w1-3-0c',
    2828        accessToken:                window.cc_c2a_config.autocomplete.access_token,
    2929        domMode:                    'object',
     
    171171        // Add the address search field
    172172        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+'">' +
    174174                                        window.cc_c2a_config.autocomplete.search_label +
    175175                                    '</label>' +
     
    200200        window.cc_c2a_functions.autocomplete.add_button_css(cc_manual_button);
    201201        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));
    203203        if (window.cc_c2a_config.autocomplete.lock_country) {
    204204            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  
    55 * @package  ClickToAddress Integration
    66 * @category Integration
    7  * @author   Crafty Clicks
     7 * @author   Fetchify
    88 */
    99
     
    1919
    2020        $this->id                   = 'clicktoaddress_autocomplete';
    21         $this->method_title         = __( 'Crafty Clicks', 'woocommerce-clicktoaddress-autocomplete' );
    22         $this->method_description   = __( 'Adds Crafty Clicks products 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' );
    2323
    2424        // Load the settings.
     
    6666                'err_msg4'              => $this->get_option( 'postcode_err_msg4' ),
    6767                '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__ )
    6969            ),
    7070            'phone' => (object) array(
     
    105105        wp_add_inline_script(
    106106            '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           
    108109            'before'
    109110        );
     
    229230                'type'          => 'title',
    230231                'title'         => __( 'Enabled Products', 'woocommerce' ),
    231                 'description'   => __( 'Choose the Crafty Clicks products you would like to enable.', 'woocommerce' ),
     232                'description'   => __( 'Choose the Fetchify products you would like to enable.', 'woocommerce' ),
    232233                'css'           => ''
    233234            ),
     
    276277                'type'          => 'title',
    277278                'title'         => __( 'Access Token', 'woocommerce' ),
    278                 'description'   => __( 'Enter the access token you received by email when you signed up for a Crafty Clicks account.', 'woocommerce' ),
     279                'description'   => __( 'Enter the access token you received by email when you signed up for a Fetchify account.', 'woocommerce' ),
    279280                'css'           => ''
    280281            ),
  • clicktoaddress-auto-complete/trunk/readme.txt

    r2351596 r2372925  
    1 === Crafty Clicks ===
     1=== Fetchify ===
    22Contributors: craftyclicks
    33Donate link: https://fetchify.com/
    44Tags: address, autocomplete, checkout, data, email, lookup, phone, postcode, search, validation, verification, woocommerce
    55Requires at least: 4.0
    6 Tested up to: 5.4
    7 Stable tag: 1.2.1
     6Tested up to: 5.5
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 This plugin provides address auto-complete functionality on address forms on the front-end in WooCommerce.
     15This 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.
    1616
    17 It provides international data for 240+ countries.
     17= Address Auto-Complete =
     18
     19Adds address auto-fill, lookup and validation to address forms on the front-end in WooCommerce for over 240 countries.
    1820
    1921The 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
     25The 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
     29Verifies 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
     33Email 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.
    2034
    2135= Customer Satisfaction & Conversions =
     
    2337
    2438= Data Quality =
    25 User input is validated in real time and your customer database is populated with fully verified addresses. Fewer missed deliveries.
     39User 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
     43This plugin is compatible with WPML to make your checkout multilingual. To find out more about WPML go to https://wpml.org/
    2644
    2745= Getting Started =
     
    3149Our service is split into 3 parts:
    3250
    33 1. API server that delivers the data
    34 2. a JS library that can retrieve the data, and generate a basic UI, regardless of platform
    35 3. a WooCommerce specific JS file. (located in clicktoaddress-auto-complete/js)
     511. An API server that delivers the data
     522. A JS library that can retrieve the data, and generate a basic UI, regardless of platform
     533. WooCommerce specific JS files (located in clicktoaddress-auto-complete/frontend/js and clicktoaddress-auto-complete/admin/js)
    3654
    37 The JS library is located on our CDN to make sure 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.
     55The 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.
    3856
    3957== Installation ==
    4058
    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].
     591. 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.
     602. Unpack the zip file and copy the clicktoaddress-auto-complete folder to your WordPress installation’s wp-content/plugins folder.
     613. In your WordPress admin panel, go to Plugins / Installed Plugins, and activate the Fetchify plugin.
     624. 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.
     635. 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.
     64Postcode Lookup only: AA1 1AA, AA1 1AB, AA1 1AD and AA1 1AE.
     656. 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.
    4666
    47 == Configuration ==
     67If you need assistance, drop us an email on [email protected] – we will help!
    4868
    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 =
     70Our plugin is compatible with https://wpml.org/ which allows translation of certain texts in the search UI. The following texts can be translated.
     71
     72Address 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
     82Postcode 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
     90If 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
     96You 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
     981. In your WordPress admin panel, go to WPML / String Translation.
     992. 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.
     1003. 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
     102Your translated texts will now appear in the search UI!
    51103
    52104== Frequently Asked Questions ==
    53105
    54106= 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 happy help.
     107Yes, 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.
    56108
    57 = Is this really completely free? =
    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? =
     110The 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.
    59111
    60112= 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.
     113You’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? =
     116Yes, 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? =
     119No, one account covers all the products you choose to use.
    62120
    63121== Changelog ==
     122
     123= 1.3.0 =
     124* Added WPML compatibility.
     125* Added Fetchify branding.
    64126
    65127= 1.2.1 =
Note: See TracChangeset for help on using the changeset viewer.