How can i change a variable to uppercase / lowercase in transacional email?

I need to change the customer name

{{htmlescape var=$customer.name}}

and the store name

{{var store.getFrontendName()}}

Here's an attachment showing the problem:

email body and inline text

As you can see, I'm using css to uppercase word exemplo but inline preview text doesn't show as uppercase.

Already tried looking for another functions in templates without any success. Is there any documentation about transactional emails language being used?

Thanks in advance


You need to overwrite this file




and change below code to queueNewOrderEmail function

public function queueNewOrderEmail($forceMode = false)
    if ($this->getCustomerIsGuest()) {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
        $customerName = strtoupper($this->getBillingAddress()->getName());
    } else {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
        $customerName = strtoupper($this->getCustomerName());
  • It won't work that way, because i need show as uppercase in email preview, and css only shows when email is opened. I've already done it with css but isn't enough. – JonnyDevv Dec 5 '18 at 10:28
  • Check my updated answer – hardik Dec 6 '18 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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