Guest Posted July 7, 2009 Posted July 7, 2009 Hi I really hope someone can help me. I don't have any php background. I have managed to install oscommerce and everything, but I'm battling with the following. When a client types in keywords and clicks the search button, it takes them to the advanced_search_result.php, the problem is if there isn't any match then it says the following - There is no product that matches the search criteria - I have managed to edit that an changed it to There is no product that matches the search criteria. If the book(s) is not listed here, it does not necessarily mean we do not have it or cannot find it for you. Simply send a mail to [email protected] and we will try our best to assist you on finding the book(s). which works fine, but I would like the email to include the "search criteria" the client typed in the search field. so say for instance, the client searched for cars then when they click on my email address it must say "cars" in the subject line. If anyone can help me with this, I'll really appreciate it. Have a nice day.
spooks Posted July 7, 2009 Posted July 7, 2009 Fairly easy, plus I had a sparwe moment so I`ve written the code for you!! the best option is to use an addition to the contact form. In includes/modules/product_listing.php find(149): $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); add after: if (basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) { echo '<tr><td align="center">' . tep_draw_form(contact,tep_href_link(FILENAME_CONTACT_US,'subject=' . $_GET['keywords']));?><input type="submit" value="<?php echo 'Contact us about ' . $_GET['keywords'];?>" /></form></td> </tr><?php } then in contact_us.php find: $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); add after: $subject = tep_db_prepare_input($HTTP_POST_VARS['subject']); find: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); replace with: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $enquiry, $name, $email_address); find: <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> add after: <tr> <td class="main"><?php echo 'Subject' ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('subject',$_GET['subject']); ?></td> </tr> Hope that sort it for you :) Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
Guest Posted July 7, 2009 Posted July 7, 2009 Thank you! I really really appreciate your help. Have a leka day! Deon
spooks Posted July 7, 2009 Posted July 7, 2009 Thank you! I really really appreciate your help. Have a leka day! Deon Your welcome, though I have to ask, what does leka mean? Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.