0

The customer's IP address is stored against the order record in the back end of Magento (ver 1.7.0.2 but it is not available as a variable to add to the New Order Confirmation Email.

Can anyone help me change the email template so that I can get this field added to the email?

Many thanks

Matt
  • 5
  • 5
  • U can change default email template from /app/locale/en_US/template/email/ – monojit Aug 20 '13 at 06:29
  • 1
    How to add new field value in email template for this check http://www.expertwebadvisor.com/add-custom-fields-in-contact-us-form-in-magento/ and http://stackoverflow.com/questions/11393479/add-custom-attribute-in-order-email-templates-magento – monojit Aug 20 '13 at 06:33
  • Thanks for your reply but the links do not really help. I am not looking to a new custom variable. The IP address already exists against every customer order. I understand how to change the order email template but I am looking for a way of getting this field that already exists on to the template. Thanks – Matt Aug 27 '13 at 14:02
  • ok..so u want pass your custom variable (ip address) in order mail.right!do u check this three links http://stackoverflow.com/questions/7358971/magento-how-to-add-custom-variables-to-new-order-e-mail , http://marius-strajeru.blogspot.in/2010/04/add-new-variable-to-order-update-e-mail.html and http://stackoverflow.com/questions/11393479/add-custom-attribute-in-order-email-templates-magento – monojit Aug 27 '13 at 15:24

1 Answers1

1

6 months late maybe, but is this what you're looking for?

$order->getRemoteIp()

I've not tried it in the context of an email template but I'd guess this:

{{var remote_ip}}

or failing that, try:

{{var order.getRemoteIp()}}

FWIW I found the getRemoteIp() function used in app/design/adminhtml/default/default/template/sales/order/view/info.phtml.

Doug McLean
  • 1,289
  • 12
  • 26