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?

asked Jan 24, 2018 at 14:18
3
  • really strange ... Commented 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. Commented 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/..../... Commented Jan 25, 2018 at 9:30

1 Answer 1

0

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

answered Jan 26, 2018 at 8:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.