Jump to content

Error - The following e-mail template is missing: en/test.txt


karl.wong

Recommended Posts

QUESTION 1

 

I have created a list in the back office, and would like to send an email to all the users when i click a button "Validate".

 

However this error came up Error - The following e-mail template is missing: en/test.txt.

 

But I have the files in mails/en/test.txt as well as mails/en/test.html

foreach($result as $row){
                $sql = "SELECT firstname, lastname, email FROM ps_customer WHERE id_customer = $row[id_customer]";
                $result = Db::getInstance()->getRow($sql);
                $email = $result[email];
                $fname = $result[firstname];
                $lname = $result[lastname];
                $fullname = $fname." ".$lname;


                $subject = "You can purchase the product now.";


                $mail_result = Mail::Send(
                Language::getIdByIso('en'),
                'new_order',
                Mail::l($subject),
                '',
                $email,
                $fullname,
                "[email protected]",
                "test.com",
                null,
                null,
                null,
                _PS_MAIL_DIR_,'','',''
                );
            }

QUESTION 2

 

Upon clicking on that in the image below, how can i set the url? I would like it to point to the product page in back office, or disabling it so it cannot be clicked? Is it possible?

 

post-818819-0-58037200-1412236865_thumb.png

 

Thanks in advance :)

Link to comment
Share on other sites

 

 

1 Topic = 1 Subject or 1 Question

- If you have more than one question, open more than one new topic!

- Do not ask your question on a thread that doesn’t deal with the exact same matter. Open a new thread, it’s alright to do so.

 

send() function order of variables:

 

 

Send($id_lang, $template, $subject, $template_vars, $to,

$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null)

i see in your code that you treat $to as a $to_name 

what is your ps version?

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...