0

I would like to change the text "Grand Total" to just "Total" in my email template.

enter image description here

The thing is though I have to edit {{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}

I am not sure if I found this path correctly, but I edited /vendor/magento/module-sales/view/frontend/template/order/totals.phtml please check the code image below enter image description here

Did I edit the correct file? if not please help me where I can edit this. It's sort of frustrating that I can't really check in preview template.

Thank you so much!

3
  • Yes, you are on righ path, but you must override this same template class, or if you want to save your time try to make edit grand total in same vendor template file and place test order and check your email, after that you can easily override it in your custom module. Thankyou. Mar 2, 2022 at 15:24
  • Thank you for the answer Zahid. I don't understand I must override this same template class. Can you tell me where I can edit the class?
    – Ryung Kim
    Mar 2, 2022 at 15:41
  • Step1: override this class in your module: /vendor/magento/module-sales/view/frontend/template/order/totals.phtml Step2: override this class vendor/magento/module-sales/view/frontend/layout/sales_email_order_shipment_items.xml step3: override this class: vendor/magento/module-sales/view/frontend/email/order_new.html Mar 2, 2022 at 15:48

1 Answer 1

1
Step1: override this class: in your module: /vendor/magento/module-sales/view/frontend/template/order/totals.phtml 

Step2: override this class: vendor/magento/module-sales/view/frontend/layout/sales_email_order_shipment_items.xml

step3: override this class: vendor/magento/module-sales/view/frontend/email/order_new.html

and makes changes according to your module and carefully change names where required.

4
  • I wish I could give you an upvote. Thank you
    – Ryung Kim
    Mar 2, 2022 at 16:10
  • I am just curious. What will happen if I don't override??
    – Ryung Kim
    Mar 2, 2022 at 16:16
  • I cannot make changes in core file, to make changes or customization we always need to override a class. Mar 2, 2022 at 16:20
  • Oh yeah that makes sense lol thank you so much!
    – Ryung Kim
    Mar 2, 2022 at 16:32

Your Answer

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

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