Magento – Edit billing and shipping address in email template

billing-addressemail-templatesmagento2order-confirmationshipping-address

In magento 2 how to remove coma from billing and shipping address of order confirmation email template.

Order confirmation mail is called from "order_new.html" file.

In this file billing address is called as"{{var formattedBillingAddress|raw}}" this line and the shipping address is called as "{{var formattedShippingAddress|raw}}".

In which file i have to edit? How can i do this?
Please help me to achieve this.

Best Answer

$templateVars = array(
        'store' => $this->storeManager->getStore(),
        'message'   => 'We processed your order ID We will contact you soon in mail for the acknowledgement if you not receive mail within 4 hours please get help from support@xxx.com',
        'order' => $order,
        'store'=> $store,
        'productName'=> $productName,
        'payment_html' => $this->getPaymentHtml($order),
        'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
        'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
   );
Related Topic