Jump to content

Insert Track Button at Order History Page - Aftership


Recommended Posts

Hi,

I'm using version 1.7.6.5

i'm trying to Insert Track Button at Order History Page from Aftership. i have followed all the help guidelines below but it seems the order-detail.tpl file does not have a line of code $line.tracking_number as per the guidelines.

Insert Track Button at Order History Page

Go to your FTP location and look for order-detail.tpl file in your Theme folder.Edit the theme file  order-detail.tpland replace the following code where you find $line.tracking_number.

Replace

<span id="shipping_number_show">{if $line.tracking_number}{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}{else}-{/if}</span>

With:

<span id="shipping_number_show">{if $line.tracking_number} {literal}<div id="as-root"></div><script>(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n)){aftership.buttonCreator.create();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> {/literal} <div class="as-track-button" data-domain="track.aftership.com" data-size="small"data-tracking-number="{$line.tracking_number}" ></div> {else}-{/if}</span>

can anyone help with this please.

Thanks.

 

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...