Page 1 of 1

Variable to insert TRACKING NUMBER in an email template?

Posted: Mon Sep 22, 2014 12:02 pm
by bugman
What is the variable for Tracking Number, and the syntax to insert it into an email template?

We use Shiprush to process & ship orders, and have it set to send the shipment tracking info once the shipment is processed. Sometimes there is a problem with an order that results in the shipment having to be voided, and a new shipment processed - so it now has a different tracking number than the one Shiprush originally emailed to the customer.

When this happens, we go into the order details & update the customer's order info with the new correct tracking number. While we're in there, we'd like to click on customer's email address & email them a predefined template that gives them their new tracking number.

Re: Variable to insert TRACKING NUMBER in an email template?

Posted: Thu Sep 25, 2014 9:33 am
by bugman
Anybody?....

Re: Variable to insert TRACKING NUMBER in an email template?

Posted: Thu Sep 25, 2014 1:33 pm
by rmaweb
For our AC7 email templates we have

Code: Select all

#foreach($trackingNumber in $shipment.TrackingNumbers)

#if($trackingNumber.ShipGateway)

#set($provider = $trackingNumber.ShipGateway.GetProviderInstance())

#set($summary = $provider.GetTrackingSummary($trackingNumber))

#if($summary.TrackingResultType == "ExternalLink")
<a href='$summary.TrackingLink'>$trackingNumber.TrackingNumberData</a>
#end

#end
#end
Still in the process of upgrading to Gold, have not tested it there yet.