0

I need to style the items table in the order email.

So I have copied

/vendor/magento/module-sales/view/frontend/templates/email/

to

/app/design/frontend/[Vendor]/[Theme]/Magento_Sales/templates/email/

Added some content, ran my script that fixes most of the "issues"

rm -R ./pub/static/*
./php bin/magento cache:clean
./php bin/magento cache:flush
./php bin/magento setup:static-content:deploy --force
./php bin/magento setup:static-content:deploy sk_SK --force
./php bin/magento setup:di:compile
./php bin/magento indexer:reindex
./php bin/magento cache:clean
chown zonemediadev.sk:html ./ -R

note: ./php is shortcut to php7 because the server by default has php5 on cli.

I have re-sent the order email from admin, then manually triggered cron. Then I have received the email without the added content.

If I add content in the /vendor/....../templates/email/items.phtml then it works fine.

Also I am receiving the same email multiple times (from 2 times up to 11 times) Why?

Any suggestions why the override does not work?

3
  • really strange ...
    – Amit Bera
    Jan 24, 2018 at 21:00
  • You can override email templates from Marketing -> Communications (Email Templates) and then by clicking on Add New Template button. Jan 25, 2018 at 7:46
  • @MohitKumarArora Already did that, that overrides header, footer, body text and the layout, which works. But to customize the html of the table of product in email body it's required to change the Magento_Sales/templates/email/items.phtml and magento does not detect the override, since its still loading from /vendor/magento/..../... Jan 25, 2018 at 9:30

1 Answer 1

0

Well, on the next day it started working. Probably some buggy background cache.

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.