5

The email template doesn't get a shipping method variable.

Email template

As you can see $billing.getName not works. Shipping and Billing information is empty. Maybe something wrong with forms or submitting process?

3
  • This email template is magento 1 to magento 2 in migrate. Please check all email template also. Jun 27, 2019 at 11:00
  • @Vijay-CyberLocker how can I back default email templates?
    – Ashen One
    Jun 27, 2019 at 11:02
  • You can select default email template or create new email template. Jun 27, 2019 at 11:12

3 Answers 3

4

For email template changes following section

    For Guest User

    {{trans "%customer_name," customer_name=$order.getBillingAddress().getName()}}

    For Customer

    {{trans "%customer_name," customer_name=$order.getCustomerName()}}

    Billing Information:

    {{var formattedShippingAddress|raw}}

    Payment Method:

    {{var payment_html|raw}}

    Shipping Information:

    {{var formattedShippingAddress|raw}}

    Shipping Method:

    {{var order.getShippingDescription()}}
1

To get the customer name in Email template, Please Use

{{trans "%name," name=$billing.getName()}}

For billing and shipping address, Please use below code respectively.

{{trans "Billing Info"}}

{{var formattedBillingAddress|raw}}

{{trans "Shipping Info"}}

{{var formattedShippingAddress|raw}}

1

For guest email

<p class="greeting">{{trans "%customer_name," customer_name=$order_data.customer_name}}</p>

Your Answer

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

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