2

I want to send a review request using the transaction emails. For this I use the official Mandrill extension for Magento.

In this e-mail I want to get the customers first name.

What {var} do I need to use?

I tried this line but that did not work: {{htmlescape var=$order.getCustomerFirstname()}}

Thanks

2 Answers 2

7

You would have to use this method

In every transactional email you can access the methods of the model, which is in charge for the transactional email, it is: for mails dealing with orders, this is the order-Model, for mails dealing with newsletters, this is the newsletter-model and so on. You can access the methods with the syntax:

{{var model.method()}}

So, in your case, to access the customer's first name in an order confirmation email, you need to look for a suiting method in the order Model, which is getCustomerFirstname() . Then you can call it, following the given syntax:

{{var order.getCustomerFirstname()}}
1
  • I tried {{var order.getCustomerFirstname()}}, but that did not work. Is there an other way to echo the customers name?
    – JGeer
    Mar 31, 2015 at 11:55
-1

You have to select the newly created email template in admin panel. For example, "to configure the Forgot Password email, simply navigate to the SYSTEM CONFIGURATION panel, and select CUSTOMER CONFIGURATION from the customers tab. Here you will click on the PASSWORD OPTIONS> row and select your custom template from the FORGOT PASSWORD TEMPLATES dropdown. "(I found this online)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.