1"use strict";(globalThis.webpackChunk_atlas_docs_zen=globalThis.webpackChunk_atlas_docs_zen||[]).push([[328],{4056(e,n,i){i.d(n,{R:()=>d,x:()=>c});var s=i(2155);const t={},o=s.createContext(t);function d(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(o.Provider,{value:n},e.children)}},4730(e,n,i){i.r(n),i.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"integrations/shopwired","title":"ShopWired Address Verification | Documentation","description":"ShopWired Integration for UK Address Search and Validation","source":"@site/docs/integrations/shopwired.mdx","sourceDirName":"integrations","slug":"/integrations/shopwired","permalink":"/docs/integrations/shopwired","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"sidebar_label":"ShopWired","title":"ShopWired Address Verification | Documentation"}}');var t=i(5723),o=i(4056);const d={sidebar_label:"ShopWired",title:"ShopWired Address Verification | Documentation"},c="ShopWired",r={},a=[{value:"Features",id:"features",level:2},{value:"Screenshots",id:"screenshots",level:2},{value:"Address Lookup",id:"address-lookup",level:3},{value:"Enable on Checkout",id:"enable-on-checkout",level:2},{value:"Access Advanced Customization",id:"access-advanced-customization",level:3},{value:"Insert Activation Code",id:"insert-activation-code",level:3},{value:"Enable on Accounts",id:"enable-on-accounts",level:2},{value:"Access Theme Templates",id:"access-theme-templates",level:3},{value:"Insert Activation Code",id:"insert-activation-code-1",level:3},{value:"Configuration",id:"configuration",level:2},{value:"Defaults",id:"defaults",level:3},{value:"Upgrades",id:"upgrades",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("img",{className:"page-icon",src:"/img/icons/integrations/shopwired.svg",alt:"",width:"64",height:"64"}),"\n",(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"shopwired",children:"ShopWired"})}),"\n",(0,t.jsx)(n.p,{children:"ShopWired Integration for UK Address Search and Validation"}),"\n",(0,t.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Address autocompletion on:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Checkout (shipping and billing pages)"}),"\n",(0,t.jsx)(n.li,{children:"User registration page"}),"\n",(0,t.jsx)(n.li,{children:"Account details page"}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.li,{children:"Checks if the API Key is usable before enabling autocomplete"}),"\n",(0,t.jsx)(n.li,{children:"Populates organization name from selected address"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["If you need support, you can reach out to us on our ",(0,t.jsx)(n.a,{href:"https://addresszen.com/support",children:"support page"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"screenshots",children:"Screenshots"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://img.ideal-postcodes.co.uk/shopwired-demo.gif",alt:"Shopwired Demo"})}),"\n",(0,t.jsx)(n.h3,{id:"address-lookup",children:"Address Lookup"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://img.ideal-postcodes.co.uk/shopwired-autocomplete.png",alt:"Activate Address Lookup on your address collection forms-screenshot"})}),"\n",(0,t.jsx)(n.h2,{id:"enable-on-checkout",children:"Enable on Checkout"}),"\n",(0,t.jsx)(n.p,{children:"To enable Address Validation on checkout, you will need to use ShopWired's Advanced Customization."}),"\n",(0,t.jsx)(n.h3,{id:"access-advanced-customization",children:"Access Advanced Customization"}),"\n",(0,t.jsxs)(n.p,{children:["From the Administration page sidebar, navigate to ",(0,t.jsx)(n.code,{children:"Checkout"})," \u2192 ",(0,t.jsx)(n.code,{children:"Platform Checkout"})," and scroll down to ",(0,t.jsx)(n.code,{children:"Advanced Customization"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"insert-activation-code",children:"Insert Activation Code"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Script contents"})," editor, insert the below configuration code and click on ",(0,t.jsx)(n.code,{children:"Save"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-html",children:'<script>\n window.idpcConfig = {\n apiKey: "Your API Key goes here"\n };\n<\/script>\n\n<script \n async \n type="text/javascript"\n crossorigin="anonymous"\n src="https://cdn.jsdelivr.net/npm/@ideal-postcodes/shopwired@2">\n<\/script>\n'})}),"\n",(0,t.jsx)(n.p,{children:"When inserting the configuration and initialization codes into the editor, take special care to replace the following:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"apiKey"})," attribute in the first script tag. This should be replaced with the Key on your account."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"enable-on-accounts",children:"Enable on Accounts"}),"\n",(0,t.jsx)(n.p,{children:"To enable Address Validation on user accounts and other pages you will need to update your ShopWired theme template."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://img.ideal-postcodes.co.uk/shopwired-twig-1.png",alt:"Go to theme template-screenshot"})}),"\n",(0,t.jsx)(n.h3,{id:"access-theme-templates",children:"Access Theme Templates"}),"\n",(0,t.jsxs)(n.p,{children:["From the Administration page sidebar, navigate to ",(0,t.jsx)(n.code,{children:"Themes"})," \u2192 ",(0,t.jsx)(n.code,{children:"Installed Themes"})," and click on ",(0,t.jsx)(n.code,{children:"Page Editor"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://img.ideal-postcodes.co.uk/shopwired-twig-2.png",alt:"Access the page editor-screenshot"})}),"\n",(0,t.jsx)(n.h3,{id:"insert-activation-code-1",children:"Insert Activation Code"}),"\n",(0,t.jsxs)(n.p,{children:["From the ",(0,t.jsx)(n.code,{children:"Page Editor"}),", click on ",(0,t.jsx)(n.code,{children:"Views"})," then ",(0,t.jsx)(n.code,{children:"Templates"})," then ",(0,t.jsx)(n.code,{children:"master.twig"}),". At the bottom of the editor before ",(0,t.jsx)(n.code,{children:"</body>"}),", add the same activation code as the checkout section (above)."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://img.ideal-postcodes.co.uk/shopwired-master.png",alt:"Insert configuration code-screenshot"})}),"\n",(0,t.jsxs)(n.p,{children:["Once again update ",(0,t.jsx)(n.code,{children:"apiKey"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,t.jsx)(n.p,{children:"The minimum configuration is as follows:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-html",children:'<script>\n window.idpcConfig = {\n apiKey: "Your API Key goes here"\n };\n<\/script>\n'})}),"\n",(0,t.jsxs)(n.p,{children:["See our ",(0,t.jsx)(n.a,{href:"/docs/address-lookup/configuration-reference",children:"integration configuration guide"})," to understand how to customize this."]}),"\n",(0,t.jsx)(n.h3,{id:"defaults",children:"Defaults"}),"\n",(0,t.jsx)(n.p,{children:"The available configuration attributes for the configuration are as follows:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",children:'{\n // API Key is not set by default\n apiKey: "",\n\n // Autocomplete is enabled\n autocomplete: true,\n\n // Company name field is updated\n populateOrganisation: true,\n // County name field is not updated\n populateCounty: false,\n \n // Advanced configuration\n autocompleteOverride: {},\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"upgrades",children:"Upgrades"}),"\n",(0,t.jsxs)(n.p,{children:["This integration will be continually updated without your action. However, there will be occasions when a breaking change is introduced. When this happens we will increment the version number at the end of the script ",(0,t.jsx)(n.code,{children:"src"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.