0

I'm currently using Magento ver. 2.3.4 and I'd like to hide the tax display in the sales order emails. I've added the following to my design template:

httpdocs / app / design / frontend / Infortis / ultimo_child / Magento_Sales / layout  / sales_order_email_items.xml

With the following content:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Email Order Items List" design_abstraction="custom">
    <update handle="sales_email_order_renderers"/>
    <update handle="sales_email_item_price"/>
    <body>
        <referenceBlock name="tax" display="false"/>
    </body>
</page>

However I am still seeing the tax being displayed in the order confirmation email. I've checked numerous other questions on here but none of the answers seem to work for me.

Could anyone please let me know what I'm doing wrong here please?

Thank you.

7
  • Hey, if i understand you only want to exclude the tax display from email, have you tried go to Stores->Config->Sales->Tax->Orders, Invoices, Credit Memos Display Settings, I think there is a option to remove from email template – Rui Silva Dec 15 '20 at 15:14
  • Hi. I'm afraid there isn't an option to do this there's a Display Full Tax Summary, but that is already set to "No". – CJNotts Dec 15 '20 at 15:21
  • Hey, you probably right, then to override try this magento.stackexchange.com/questions/245941/…, in your version probably sales_email_order_items.xml instead of the one they use, or try it in the core file directly to see if it works, if it does do the override and revert to the original the core file – Rui Silva Dec 15 '20 at 15:27
  • I looked more closely, you're overriding the wrong file, try to go to vendor/magento/module-sales/view/frontend/layout/sales_email_order_items.xml and test there and check all xml, sales_order_email_items.xml doesn't exist anymore in 2.3 – Rui Silva Dec 15 '20 at 15:39
  • That seems to have done it. Thank you, can't believe it was that simple, much obliged. If' you'd like to add that as an answer I'll accept it. – CJNotts Dec 15 '20 at 15:44
1

Everything is correct, the sales_order_email_items.xml no longer exists in Magento 2.3, now it's sales_email_order_items.xml

In overrides, remember to always check the original file, path and name, sometimes it changes so older examples and answers are correct but a bit outdated. ;)

4
  • Thank you. That seems to be working correctly now. – CJNotts Dec 15 '20 at 15:51
  • Incidentally, if I wanted to hide the "Tax" line in the invoice email as well, which file would I need to duplicate in order to change that? – CJNotts Dec 16 '20 at 16:21
  • If you check vendor/magento/module-sales/view/frontend/layout there is the email templates order related, checking there by name I would bet in sales_email_order_invoice_items.xml – Rui Silva Dec 17 '20 at 17:13
  • Thank you. Much obliged. – CJNotts Dec 18 '20 at 11:22

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.