Originally Posted by
VDecalS
I'm using Zen cart 1.5.5f with no mods whatsoever.
Server OS: Linux 2.6.32-896.16.1.lve1.4.51.el6.x86_64
HTTP Server: Apache
PHP Version: 7.0.32 (Zend: 3.0.0)
My contact page has a required Subject line but the emails I receive display the default "Website Inquiry from My Site" Subject.
How do I get it to display the customer entered Subject?
Another user fixed this by upgrading to the latest Westminster template:
Is there a way to do this with a vanilla install?
Thank you!
Assuming you already added the input field to your form...
clip from mine as a sample..
Code:
echo '<label for="subject">Subject:</label>';
echo zen_draw_input_field('subject', $subject, ' id="subject" title="Enter Subject (no special characters)" required="required" aria-required="true" ');
Edit includes/modules/pages/contact_us/header_php.php
Around where the $name and $email_address is add another line to receive the posted subject.
Code:
$subject = zen_db_prepare_input(zen_sanitize_string($_POST['subject']));
Then modify the send line from:
Code:
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
To:
Code:
zen_mail($send_to_name, $send_to_email, $subject, $text_message, $name, $email_address, $html_msg,'contact_us');
Bookmarks