How can I add Track Button to 3dcart store?

IN THIS ARTICLE

 

 

1. Add a new web page

a. Login to your 3dcart admin panel
b. Click Settings >  Design>  Site Contentat the left navigation
c. Click   Add new page 
d. Enter  Page Name and set Sorting(say "5")
e. Click Add 
f. Click Content to insert the Track Button codes

 

2. Insert Track Button Code

a. Insert the following code or copy from your  AfterShip account (for specific couriers and custom style):

<div id="as-root"></div><script>(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//button.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk")</script> <div data-domain="track.aftership.com" data-size="large" class="as-track-button"></div>

b. Remember to login to your AfterShip account >  apps > Track Button for custom style. You can also replace data-domain="track.aftership.com" with your AfterShip username or custom domain to display tracking results, and apply your carrier settings. 
c. Once done, click Save Changes (DO NOT SWITCH TO WYSIWYG MODE)

 

 

Insert Track Button at Order History Page

 

 

1. Open Template Editor

 

a. Login to your 3dcart admin panel
b. Click  Settings >  Design>  Template Editorat the left navigation

 

2. Edit Theme file for the Order History Page

 

 

a. Edit the theme file order-history-view.html
b. Replace the following code where you find  [trackingcode]
Replace:

<a href="shiptracking.asp?trackingnumber=[trackingcode]" target="new">[trackingcode]</a>

With:

<div id="as-root"></div><script>(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//button.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk")</script> <div data-domain="track.aftership.com" data-size="small"data-tracking-number="[trackingcode]" class="as-track-button"></div>

Was this article helpful?
0 out of 0 found this helpful