-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Payment Failed Emails cannot be styled with css by including the default email header #38847
Comments
Hi @gwharton. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Delta. Thank you for working on this issue.
|
you should add styles via less file ? Add via email header can missed in some case depends on devices/app |
Email styles are completely missing from the admin theme, so it's not just a case of adding a style to admin themes email less files. You would need to copy over the email.less files from your frontend theme Into admin theme and maintain them both for style consistency. This I suspect wouldn't be a straight forward process due to the differences between the admin and frontend theme dependencies. |
Hi @gwharton , Thank you for your reporting and collaboration. We are still working on this issue and will update you soon. Thanks, |
so you want styles preview in admin email same as output in frontend ?@gwharton |
It's limitation of core base. I think it's need some extra customise when it's difference store/area code |
Hi @engcom-November. Thank you for working on this issue.
|
Hello @gwharton, We are able to reproduce this on 2.4.7-p1 instance.
@gwharton can you try with the workaround mentioned here, and let us know if this fixes your issue. Thank you. |
Hello @gwharton, As there is no activity on this issue for a long time, we believe the issue has been resolved, hence closing this issue. Thank you. |
@engcom-November: you reproduced the bug but closed it anyways? That's not a good way of doing things. |
I guess not so much a bug, but design feature. email styles are just not present in the admin theme, so any attempt to add any sort of styling to any emails sent out under the ADMIN scope are doomed to be dull. I tried adding the email styles less files to my admin theme, but soon lost the will to live due to the different dependency and inheritance oddities between the frontend and backend themes. |
Hello @gwharton, The result we got is different from what is mentioned in the actual result, instead of the styles being empty we are getting the header template is missing. This is the template used:
Can you let us know if we are missing something here. |
Preconditions and environment
2.4.7-p1
Steps to reproduce
Deploy vanilla 2.4.7-p1
Configure payment provider in test mode, such that payment failed emails can be triggered
Configure the payment failed emails to generate and specify a recipient email address
Modify the standard payment failed email template to include the standard header and footer includes.
Trigger a failed payment
Expected result
The email received has the standard email headers and footers and is styled via css.
Actual result
The email contains the following error.
CSS inlining error: Compilation from source: LESS file is empty: adminhtml////css/email-inline.less
This is correct, email style sheets are not generated for the admin theme.
Either the emails should be sent under the scope of the store that generated the failed payment, or email styles should be included in the admin theme?
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: