Jump to content

ps_emailalerts override not working


Recommended Posts

Hey guys I got a problem!

I want to override ps_emailalerts.php of the module with the same name.
The goal is to add a new variable for the mailtemplate of the new-order-mails.

As soon as I activate the override no new-order-mail is sent anymore.
I already left the code, of the method I wanted to change, the same as in the original method. So the only thing is that the override itself happens.

You can find my module which overrides ps_emailalerts in the attachments.

Please someone help me!

Thanks in advance for any suggestions!!
 

ReformFanshopOverrides.zip

Link to comment
Share on other sites

  • 2 years later...

if your code is actually executed check for the value of $dir_mail

the code 

if (file_exists(dirname(__FILE__).'/mails/'.$mail_iso.'/new_order.txt')

checks in the folder of the file and you don't have the files there. the files are in the actual module

if (file_exists(_PS_MODULE_DIR_ . 'ps_emailalerts/mails/' . $mail_iso . '/return_slip.txt')

for easy debug use something like 

error_log(yourmessage."\n", 3, pathtolog"/my-errors.log");

to send arrays or objects json_encode is your friend

Edited by imarinescu
add more info (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...