I want to insert an external js to popup tracking page to get shipping information provided by an API service.

I need to pass the shipping number (that is yet in the popup tracking) to this js... here is the code:

<!-- Place this code after <body> tag -->
<script type="text/javascript">
    var apiKey = "7b1b7235"; // public APY Key
    var trackingNumber = "HEREPASSTHESHIPPINGNUMBER"; // shipment's tracking number
<script type="text/javascript" src="https://api.qapla.it/js/1.1/qapla-tracking.js"></script></p>
<p><!-- Place this element where you want to display the Qapla' Tracking -->
<div id="qapla-tracking"></div></p>  

I use 2 approach:

  1. edit details.phtml adding the JS but not working
  2. Insert code in a block and call via widget but I don't know how to call shipping tracking number.

Here where I want to display the tracking magento popup tracking

Here the tracking script tracking script result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.