Jump to content

Third Party Widget in Checkout Page

Go to solution Solved by paul2009,

Recommended Posts

Posted

Hi everyone,

 

can you please help? I have a widget from third party shipping service (maybe some of you know Packeta) that I want to place on my checkout page, where customers fill out shipping info, emails, etc. But so far I have not find a way to put it there. I tried code injection, custom CCS, advanced option in page menu, but nothing worked. I am attaching screenshot with the instructions and the code that I need to implement. 

Thank you in advance

Tomas


<script src="https://widget.packeta.com/v6/www/js/library.js"></script>

  <script>
    const packetaApiKey = 'd3e4bbb9eec4a4da';

    const packetaOptions = {
        country: "sk", 
    language: "sk", 
    valueFormat: "\"Packeta\",id,carrierId,carrierPickupPointId,name,city,street", 
    defaultPrice: "3.3"
    };

    function showSelectedPickupPoint(point) {
        // Add here an action on pickup point selection
        const saveElement = document.querySelector(".packeta-selector-value");
        saveElement.innerText = '';
        if (point) {
          console.log("Selected point", point);
          saveElement.innerText = "Address: " + point.formatedValue; 
        };
    }


  </script>

   <button class="packeta-selector-open" onclick="Packeta.Widget.pick(packetaApiKey, showSelectedPickupPoint, packetaOptions)">Select pick-up point</button>    
   <div class="packeta-selector-value"></div>

 


 

Packeta WIdget.jpg

  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Solution
Posted

You cannot integrate this. The Squarespace checkout is locked down.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.