johnytapia Posted December 8, 2011 Share Posted December 8, 2011 Hi, I would like to user (not necessarily registered in the store) by sending a contact form from the store to receive copies of submitted form to given in the form email. (variable $ from) I greet and thank you in advance for your help. sorry for my english Presta 1.3.6.0 Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 8, 2011 Share Posted December 8, 2011 Hello! In contact_form.php duplicate the Mail::Send function and change the parameters. Link to comment Share on other sites More sharing options...
johnytapia Posted December 9, 2011 Author Share Posted December 9, 2011 Hi, I tried to do it but I do not know too much php and unfortunately does not work. I could count on someone's help on this subject? I greet and thank Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 9, 2011 Share Posted December 9, 2011 Hello! Try changing this line : if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $from, '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) to this: if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $from, '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)) AND Mail::Send(intval($cookie->id_lang), 'contact', 'Copy of your message', array('{email}' => $from, '{message}' => stripslashes($message)), $from, '', $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) Link to comment Share on other sites More sharing options...
johnytapia Posted January 5, 2012 Author Share Posted January 5, 2012 Your solution works but my code looks a little different, and form fields are not populated with data. Can I ask you to adapt the code below according to your rules? I greet and thank My code: if ( Mail :: Send ( intval ( $cookie -> id_lang ), 'contact' , 'Formularz kontaktowy' , array( '{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ), '{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ), '{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ), $contact -> email )) Link to comment Share on other sites More sharing options...
johnytapia Posted January 5, 2012 Author Share Posted January 5, 2012 Many thanks to CartExpert.net for solution. if someone needed: if (Mail::Send(intval($cookie->id_lang), 'contact', 'Formularz kontaktowy', array('{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ), '{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ), '{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $email)) AND Mail::Send(intval($cookie->id_lang), 'contact', 'Kopia formularza kontaktowego', array('{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ), '{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ), '{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ), $from, '', $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $email))) 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