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?

  • really strange ... – Amit Bera Jan 24 '18 at 21:00
  • You can override email templates from Marketing -> Communications (Email Templates) and then by clicking on Add New Template button. – Mohit Kumar Arora Jan 25 '18 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/..../... – Erik Kubica Jan 25 '18 at 9:30
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, privacy policy and cookie policy

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