contact us form

I have a “contact us” page on my site, www.karoshoes.com, and for some reason, when the customer fills out the form and submits it, I receive the mail from “info@karoshoes.com”, my own e-mail address instead of the customer’s e-mail address. So when I hit reply in my email, it comes back to myself.



What can I change and in which file so that the e-mail is recognized as from the customer, not info@karoshoes.com?



Thank you,



Arsen

Karoshoes.com

CS-Cart V.1.3.3

Why is that strange? It uses your webserver since the form is on your website and you can’t use the customers webserver since you’ll also need their password.



Theres a field where they can input their own email, just use that email without just hitting reply.

this has been fixed in v1.3.4, yes yes yes I know the next question is when is v1.3.4 coming out…approx mid september or later…

Isn’t there any way to fix it now instead of waiting for v1.3.4? Can I change the codes in any way to make it work?

if you just click on the email address within the contact us email a new message will automatically pop-up with the reply email address anyways…

karoshoes, I had the same issue, so this may help you… can’t believe we have to wait for 1.3.4 for those basic things. This should be working in this way already when the cs-cart version come out with the form builder. I’m starting to think that they are forcing us to upgrade everytime?



open and edit “[cscart_dir]/include/customer/forms.php” file.



Replace the following line:

[quote]fn_send_mail($form_data[‘email’], ‘’, ‘forms/form_subject.tpl’, ‘forms/form_body.tpl’);[/quote]

with this one:

ill try that too, thanks for the post

I tried…but it did not work. It still says my own company email address in the “from” field. I appreciate the help though. I guess I have to wait for the new version to come out, or if x-cart programmers can just tell us that one line of coding so we can change the glitch.

really strange… :confused:

I copied and pasted the entire forms.php file into a text file and attached here, maybe you could try it? I have this little modification working like a charme



hope it helps.

forms.txt

I copied and pasted your entire attachment, but still no good. Could it be something in another file? An error in another file?

karoshoes,

I tried creating a new form and I was impressed that didn’t work… :confused:



Here the solution:



the code above works correctly if the field name is set exactly like in the “$elements” code.



example:

fn_send_mail($form_data['email'], fn_stripslashes($elements['Email']), 'forms/form_subject.tpl', 'forms/form_body.tpl');

The field name for the email address MUST be Email and nothing else (and case sensitive). If you set the field name to eMail it won’t work.



In case you want to set the field name to Email address, the “$elements” code must be:

fn_send_mail($form_data['email'], fn_stripslashes($elements['Email address']), 'forms/form_subject.tpl', 'forms/form_body.tpl');



I hope it’s clear :smiley:

so, if you use the first code example ($elements[‘Email’]), the field name must be set exactly as the attached screenshot.

Picture 1.png

Hi karoshoes



Are your versions 1.3.2



The code from 1.3.3 sp2 is this:



$smarty_mail->assign('form_title', $form_title);
$smarty_mail->assign('elements', fn_stripslashes($elements));

$from = $settings['Company']['company_support_department'];
//$from = $elements[$customer_email];
fn_send_mail($form_data['email'], $from, 'forms/form_subject.tpl', 'forms/form_body.tpl', $attachments, $settings['Appearance']['admin_default_language']);

$suffix = "&$mode_name=sent";
}

fn_redirect("$index_script?$target_name=forms&name=$name$suffix");
}

i was recently upgraded by cs-cart to 1.3.3.



I copied and pasted what you have posted here and it gave me an error message on line 66 it said. I am sure that I copied and posted correctly replacing the current codes. I guess I just have to deal with it. :confused:

karoshoes did you try with my last post? it will surely work

[quote name=‘karoshoes’]if x-cart programmers can just tell us that one line of coding so we can change the glitch.[/QUOTE]

Please don’t insult CS like this, X-Crap is enough to make anyone vomit…

sorry about that…i meant to say cs-cart… i moved to cs-cart because x-cart was too messy in the first place. I appreciate the work cs-cart engineers have done for my site and the quality of the cart. I give you guys 10 out of 10! :wink:

I know…just playing with ya :slight_smile:

Did anyone try the codes posted in this thread and did it work? Please let me know if you don’t mind. Thank you.

Hi karoshoes



If as you say cs-cart upgraded you to 1.3.3sp2 your code should look just as the code above, it should not be any different.

You said this was fixed in 1.3.4, I upgraded to 1.3.4sp2 and the e-mails still come from the wrong address.