Skip to content
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

Cannot override customer or admin email templates #258

Closed
wallacio opened this issue Mar 8, 2022 · 6 comments
Closed

Cannot override customer or admin email templates #258

wallacio opened this issue Mar 8, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@wallacio
Copy link

wallacio commented Mar 8, 2022

Description

I cannot seem to override the email notification templates. I've copied and modified the twig templates from vendor and placed in templates/_emails directory. I have then selected the appropriate template in Settings -> Customer Notifications.

template location

stripe setting

Showing auto-complete, to prove that it's there:

stripe auto

I've tried various things, such as setting an environment variable instead etc but nothing seems to work. Every time, the template from the vendor directory is used.

Debugging is getting me nowhere but curiously, I cannot see anything in the logs from src/services/Emails::sendEmail, where it's supposed to be reporting success/fail. (Dev mode is on). Is this Service even used for notification emails?

Craft::info($type.' email sent successfully', __METHOD__);

Additional info

  • Craft version: 3.7.36
  • PHP version: 7.4
  • Database driver & version: MariaDB 10.5
  • Plugin version: 3.4.1
  • Is SCA and Stripe Checkout enabled?: Yes
@wallacio
Copy link
Author

wallacio commented Mar 8, 2022

Ok, so a ton of debugging and I see this happening in the logs:

2022-03-08 20:31:46 [-][-][-][error][AJWINFO] Template Override found
2022-03-08 20:31:46 [-][-][-][error][AJWINFO] Template Override found: _emails/customer.twig
2022-03-08 20:31:46 [-][-][-][error][AJWINFO] Template Override path: /home/vagrant/code/aada/templates/_emails/customer.twig
2022-03-08 20:31:46 [-][-][-][error][AJWINFO] No template found at /home/vagrant/code/aada/templates/_emails/customer.twig.html
2022-03-08 20:31:46 [-][-][-][error][AJWINFO] No template found at /home/vagrant/code/aada/templates/_emails/customer.twig.twig
2022-03-08 20:31:46 [-][-][-][error][AJWINFO] Template Override is null

templates/_emails/customer.twig.twig
Why is it trying to look for an extension of .twig or .html on a file which already has it??

@andrelopez
Copy link
Member

Hi @wallacio do you try removing the .twig extension? Let me know if that works

@wallacio
Copy link
Author

wallacio commented Mar 8, 2022

Yes, it works. But it's taken me 2 hours to track this down!!! Why autofill something that's invalid??

@andrelopez andrelopez self-assigned this Mar 8, 2022
@andrelopez andrelopez added the bug Something isn't working label Mar 8, 2022
@andrelopez
Copy link
Member

Thanks for confirming and reporting and sorry about the troubles, I just marked this as a bug and will be addressed on next release.

@andrelopez
Copy link
Member

We just release Stripe Payments 4.0.1 with a fix to this issue thanks for reporting

@mark-chief
Copy link

Hello @andrelopez.

I am experiencing this issue with plugin version 4.1.1 and craft 3.7.36.

I have tried with and without the .twig extension. (possibly only started when i installed Enrupal Snapshot too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants