Magento Forum

Shipment address Postcode / zipcode as variable? 
 
Jurjen de Vries
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-01-08
Utrecht, Netherlands
 

I like to change the order shipment tracking number template app/design/frontend/default/<name>/template/email/order/shipment/track.phtml. Here in The Netherlands the Dutch postal services TNT have a website where you can track the shipment by tracking number and zipcode. So I like to include the url Track number & zipcode variables with the tracking number and zipcode in the URL.

At line 41, I tryed something like this:

<td align="center" valign="top" style="padding:3px 9px"><a href="https://securepostplaza.tntpost.nl/TPGApps/tracktrace/findByBarcodeServlet?BARCODE=<?php echo $_item->getNumber() ?>&ZIPCODE;=<?php echo $request->getDestPostcode() ?>"><?php echo $_item->getNumber() ?></a></td>

But <?php echo $request->getDestPostcode() ?> is’nt working.
I hope someone knows if it is possible, and if it is what’s the right variable to use.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jurjen de Vries
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-01-08
Utrecht, Netherlands
 

Found it grin

$this->getOrder()->getShippingAddress()->getPostcode()

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top