Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1090087

    Hello
    Our website uses Affirm financing and we want to install their modal javascript. This is the code they provide with instructions to insert it into the global page template.

    How we do go about this and what would happen on future theme updates? we are not using a child theme.

    <!– Affirm –>
    <script>
    _affirm_config = {
    public_api_key: “YOUR_PUBLIC_KEY”,
    script: “https://cdn1-sandbox.affirm.com/js/v2/affirm.js&#8221;
    };
    (function(l,g,m,e,a,f,b){var d,c=l[m]||{},h=document.createElement(f),n=document.getElementsByTagName(f)[0],k=function(a,b,c){return function(){a[b]._.push([c,arguments])}};c[e]=k(c,e,”set”);d=c[e];c[a]={};c[a]._=[];d._=[];c[a][b]=k(c,a,b);a=0;for(b=”set add save post open empty reset on off trigger ready setProduct”.split(” “);a<b.length;a++)d[b[a]]=k(c,e,b[a]);a=0;for(b=[“get”,”token”,”url”,”items”];a<b.length;a++)d[b[a]]=function(){};h.async=!0;h.src=g[f];n.parentNode.insertBefore(h,n);delete g[f];d(g);l[m]=c})(window,_affirm_config,”affirm”,”checkout”,”ui”,”script”,”ready”);
    // Use your live public API Key and https://cdn1.affirm.com/js/v2/affirm.js script to point to Affirm production environment.
    </script>
    <!– End Affirm –>

    #1090239

    Hey web6s,
    Is this script for the whole site or for one page?
    Please try testing on one page first by adding the script to a code block and use the opening and closing “script” tags.
    If this doesn’t help, please include an admin login in the private content area so we can be of more assistance.

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.