karl.wong Posted October 2, 2014 Share Posted October 2, 2014 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? Thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted October 2, 2014 Share Posted October 2, 2014 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 More sharing options...
karl.wong Posted October 3, 2014 Author Share Posted October 3, 2014 Okay sry i've already opened up a new thread. I'm using ps 1.6.0.5, can't seem to locate the templates. Link to comment Share on other sites More sharing options...
karl.wong Posted October 8, 2014 Author Share Posted October 8, 2014 Still having problems with the email sending...anyone can help? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now