Add custom tracking link in order status page

New Member
11 0 0

Hi all,

 

I haven't found a solution for my question so I open a new topic.

As said in title, i want to add the possibility for my costumer to track their order with 17track, far better than the tracking option shopify automaticaly furnish.

 

Idealy i would like to automaticaly change the shopify tracking url by the 17track one for all my order, if someone know how to do this ?!

 

If no answer to this, my question is how could i automaticaly add the tracking number in the "value" of "input" (where is "Numéro de suivi" line 4 of script further down). Or even better, run the script with the tracking number so the widget is automatycaly open when arriving on the page.

 

At the moment, i been able to add this script, better than nothing :

 

<script>
Shopify.Checkout.OrderStatus.addContentBox(
'<h2>Suivre votre commande :</h2>',
'<input type="text" value="Numéro de suivi" id="YQNum" maxlength="50"/><input type="button" value="SUIVRE" onclick="doTrack()"/><div id="YQContainer"></div>'
)
</script>

<!--Le script peut être mis en bas de page. Attendez que cette dernière soit chargée et exécutez.-->
<script type="text/javascript" src="//www.17track.net/externalcall.js"></script>
<script type="text/javascript">
function doTrack() {
var num = document.getElementById("YQNum").value;
if(num===""){
alert("Enter your number.");
return;
}
YQV5.trackSingle({
//Requis, spécifiez l'ID du conteneur du contenu de l'hôte.
YQ_ContainerId:"YQContainer",
//Optionnel, spécifiez la hauteur du résultat du numéro de suivi. Hauteur max de 800px, la valeur par défaut est 560px.
YQ_Height:560,
//Optionnel, sélectionnez le transporteur, identifié automatiquement par défaut.
YQ_Fc:"0",
//Optionnel, spécifiez la langue de l'interface, cette dernière est automatiquement détectée selon les paramètres de votre navigateur.
YQ_Lang:"fr",
//Requis, spécifiez ce dont le numéro a besoin pour être suivi.
YQ_Num:num
});
}
</script>

 

Cheers

 

Damien

0 Likes
New Member
11 0 0

Anyone that could help ?

0 Likes
New Member
11 0 0

Someone around here ????

0 Likes
New Member
11 0 0

I've tried with {{ line_item.fulfillment.tracking_number | escape }} as value but still nothing appear...

 

<script>
Shopify.Checkout.OrderStatus.addContentBox(
'<h2>Suivi détaillé de votre commande avec 17TRACK :</h2><p>Insérez manuellement votre numéro de suivi ci-dessous et cliquez sur SUIVRE',
'<input type="text" value="{{ line_item.fulfillment.tracking_number | escape }}" style="border:solid 1px lightgrey;" id="YQNum" maxlength="50"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="SUIVRE" style="color:white; background-color:#23a10a; padding:3px 15px; border-radius:5px;" onclick="doTrack()"/><br><div id="YQContainer"></div>'
)
</script>

0 Likes
New Member
3 0 1

Hi Damien,

 

Do you add the tracking page successfully? That 's a pity that I have not see your question ealier. Actually we operate the Trackingmore tool, also we developed Trackingmore Shopify apps. So we would like to offer free but great tracking page service for you and anyone who interested in.  So you can easily reach your goal and improve customers satisfaction. Don' t worry about code problems, tell us then our team will help you to fix it. Trackingmore developed since 2014 and now Over 100,000 people are using our service. Don' t hesitate to let me know if you want more details. 

 

Regards,

Colin

0 Likes
New Member
11 0 0

Yes thanks, actualy, i just need to add tracking number object in the input js. Do you know this variable and how to add it ?

 

0 Likes
New Member
3 0 1

lol, sorry Damien I am not a developer and know less about code. You can visit the website and send question to my colleagues, technical support. Good luck 

0 Likes