Page 1 of 1

Contact form not displaying successful message

Posted: Mon Aug 01, 2016 10:44 pm
by osubat
Hello,

The standard contact form is functioning, i receive the emails but it does not display the sent successful notification and redirect to the default page, once the form is sent it remains blank.

Does anyone have any idea what is causing this?

Thanks

Re: Contact form not displaying successful message

Posted: Mon Aug 01, 2016 10:46 pm
by straightlight
Which OC version are you using?

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 12:01 am
by osubat
1.5.6.4

Thanks for getting back

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 12:15 am
by straightlight
From your admin - > systems - > error logs -page, do you see any recent event based on the date-time period regarding contact.php file?

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 1:01 am
by osubat
Yes I found this:
2016-08-01 14:32:48 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/site/catalog/language/english/information/contact.php:57)

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 1:33 am
by straightlight
osubat wrote:Yes I found this:
2016-08-01 14:32:48 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/site/catalog/language/english/information/contact.php:57)
The core installation of v1.5.6.4 does not have more than 28 lines on that particular. Would it be possible to post the file's content - catalog/language/english/information/contact.php?

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 4:19 pm
by osubat
Thanks here's what I have:

Code: Select all

<?php

// Heading

$_['heading_title']  = 'Contact Us';



// Text 

$_['text_location']  = 'Our Location';

$_['text_contact']   = 'Contact Form';

$_['text_address']   = 'Address:';

$_['text_email']     = 'E-Mail:';

$_['text_telephone'] = 'Telephone:';

$_['text_fax']       = 'Fax:';

$_['text_message']   = '<p>Your enquiry has been successfully sent to the store owner!</p>';



// Entry Fields

$_['entry_name']     = 'First Name:';

$_['entry_email']    = 'E-Mail Address:';

$_['entry_enquiry']  = 'Enquiry:';

$_['entry_captcha']  = 'Enter the code in the box below:';



// Email

$_['email_subject']  = 'Enquiry %s';



// Errors

$_['error_name']     = 'Name must be between 3 and 32 characters!';

$_['error_email']    = 'E-Mail Address does not appear to be valid!';

$_['error_enquiry']  = 'Enquiry must be between 10 and 3000 characters!';

$_['error_captcha']  = 'Verification code does not match the image!';

?>


Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 7:12 pm
by straightlight
osubat wrote:Thanks here's what I have:

Code: Select all

<?php

// Heading

$_['heading_title']  = 'Contact Us';



// Text 

$_['text_location']  = 'Our Location';

$_['text_contact']   = 'Contact Form';

$_['text_address']   = 'Address:';

$_['text_email']     = 'E-Mail:';

$_['text_telephone'] = 'Telephone:';

$_['text_fax']       = 'Fax:';

$_['text_message']   = '<p>Your enquiry has been successfully sent to the store owner!</p>';



// Entry Fields

$_['entry_name']     = 'First Name:';

$_['entry_email']    = 'E-Mail Address:';

$_['entry_enquiry']  = 'Enquiry:';

$_['entry_captcha']  = 'Enter the code in the box below:';



// Email

$_['email_subject']  = 'Enquiry %s';



// Errors

$_['error_name']     = 'Name must be between 3 and 32 characters!';

$_['error_email']    = 'E-Mail Address does not appear to be valid!';

$_['error_enquiry']  = 'Enquiry must be between 10 and 3000 characters!';

$_['error_captcha']  = 'Verification code does not match the image!';

?>

Right. Remove the ?> at the end of the file. This is no longer needed. Ensure in the mean time there are no extra space before the: <?php tag on the top of the file as well.

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 7:26 pm
by osubat
Fantastic, that's worked, thank you very much, can't believe such a small issue would cause a malfunction.

Re: Contact form not displaying successful message

Posted: Tue Aug 02, 2016 7:27 pm
by straightlight
osubat wrote:Fantastic, that's worked, thank you very much, can't believe such a small issue would cause a malfunction.
Well, this used to be an issue but this has been handled along with the Opencart upgrades. :)

Re: Contact form not displaying successful message

Posted: Tue Jul 17, 2018 4:13 am
by gauravjee
Hello,
I am using Opencart V 3.0.2.0
After submission of Contact us form the success page is blank
Mail is getting sent and also being recieved
Not sure why the message is not coming up. Its similar as you had helped with an older version.
I do not see any error in the error log pertaining to this

Request your help as its embarrassing to have such a contact us page in a live website

thanks in advance

Re: Contact form not displaying successful message

Posted: Tue Jul 17, 2018 5:37 am
by straightlight
In your admin - > extensions - > events page, do you see 33 events listed?