Skip to content

Shipping information block and customer email

I’m relatively new to Magento development and we’re currently using version 2.4.5-p1.

We recently migrated from Magento 1 and I’m now working on customizing the new order email. So far, I’ve encountered two issues.

Initially, the order created date variable wasn’t functioning. However, after some online research, I used the variable {{var created_at_formatted}}, which now correctly displays the order date. So that issue has been resolved.

However, I’m currently experiencing an issue with our shipping information. We have a block similar to this one:

                            <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
                               {{var formattedShippingAddress|raw}}
                                 
                            </td>

This block displays the shipping information correctly, such as the name, address, and phone number. However, the customer’s email field is empty. Does anyone have any ideas on how I can populate this field?

Thanks in advance!