Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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