virtualadz Posted June 19, 2006 Author Share Posted June 19, 2006 wooo, after a long time was able to figure it out. now i get the conent printed on the email which i recieve. but this raises another question : the print format in the email i recieve is:the Title hereMessage Contentnow what i want to do is make the email appear like thisTtitle: the title here.enquiry: message content.so i now which field contains what, but i dont seem to find where to go editing. i am trying and hope to do it, in the mean while any one help offering any help, thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2006 Share Posted June 19, 2006 It's hard to say with all the osCommerce functions. If the tep_mail function is used to send mail, then you will probably need to edit that function. You might be able to just edit the things you give to the function, but you wouldn't know without looking at the tep_mail function. Link to comment Share on other sites More sharing options...
virtualadz Posted June 19, 2006 Author Share Posted June 19, 2006 i think so that THERE is absolutely no need to edit the tep_mail function. this is the top part of the page $category = tep_db_prepare_input($HTTP_POST_VARS['category']); $pricefrom = tep_db_prepare_input($HTTP_POST_VARS['pricefrom']); $priceto = tep_db_prepare_input($HTTP_POST_VARS['priceto']); $quantity = tep_db_prepare_input($HTTP_POST_VARS['quantity']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $category . "\n\n" . $pricefrom . "\n" . $priceto . "\n\n" . $quantity . "\n\n" . $enquiry, $name, $email_address); i am asking that can i define a constant after the in th tep_mail funcion. like adding TITLE_TEXT before $category and such variables. what do you think?? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2006 Share Posted June 19, 2006 If you want to add another paramter to the tep_mail function, you will need to edit the function itself. Also, it's recommded to put any new parameters on the end, not in the middle. If you don't want to edit the function, then just include whatever text you want in the category or whatever else you want to edit. Link to comment Share on other sites More sharing options...
virtualadz Posted June 19, 2006 Author Share Posted June 19, 2006 wooo, got it figured all right. but then here comes another question this is the one i will not be able to do. i have a drop down menu, with 2 options, now how do i make it appear in my email. thanks for any help in advance.below are the detailsthe drop down code is something like this <select name="quanwei"><?php echo '<option value="' . REASON_TON . '">' . REASON_TON . '</option>'; ?><?php echo '<option value="' . REASON_CON . '">' . REASON_CON . '</option>'; ?></select> and here is the place to print all the fields: if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { Â Â $name = tep_db_prepare_input($HTTP_POST_VARS['name']); Â Â $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); Â Â $category = tep_db_prepare_input($HTTP_POST_VARS['category']); Â Â $pricefrom = tep_db_prepare_input($HTTP_POST_VARS['pricefrom']); Â Â $priceto = tep_db_prepare_input($HTTP_POST_VARS['priceto']); Â Â $quantity = tep_db_prepare_input($HTTP_POST_VARS['quantity']); Â Â $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); Â Â if (tep_validate_email($email_address)) { Â Â Â tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, ENTRY_CATEGORY . "" . $category . "\n\n" . $pricefrom . "\n" . $priceto . "\n\n" . $quantity . "\n\n" . $enquiry, $name, $email_address); the variable name is quanwei so can i place it directly above in the tep_mail function and the tep_db_preprare_input, and will it know which option the customer has selected an present the result in the email accordingly.thanks, thanks for any help Link to comment Share on other sites More sharing options...
virtualadz Posted June 19, 2006 Author Share Posted June 19, 2006 figured that too , but then a question once again how do i add space in this code i.e.  i added it but  is itslef printed in the email. i want to add space in between some leters that appear in my email. does this require any special character. if (tep_validate_email($email_address)) {    tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, ENTRY_CATEGORY . $category . "\n\n" . ENTRY_PRICE . "\n" . ENTRY_PRICEF . $pricefrom . "\n" . ENTRY_PRICET . $priceto . "\n\n" . ENTRY_QUANTITY . $quantity . $quanwei . "\n\n" . ENTRY_ENQUIRY . $enquiry, $name, $email_address); -----------------------------------coming back to my earlier post's regarding printing the error , i dont think it's a good option, i have seven fields that means some print messages. is there any other better way, to make all fields reqd. under one code, or use js. thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2006 Share Posted June 19, 2006 To add space in a text email, you just hit the space bar. You can also use the character code for a space (chr(32)) but it does the same thing as the space bar.For validation, you will want to have PHP check the fields. How you do it is up to you, but if you don't then people will be able to get around whatever else you do if they really want to. Link to comment Share on other sites More sharing options...
virtualadz Posted June 19, 2006 Author Share Posted June 19, 2006 just hit space, so here if i want to add a space after $quantity, should i hit space??tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, ENTRY_CATEGORY . $category . "\n\n" . ENTRY_PRICE . "\n" . ENTRY_PRICEF . $pricefrom . "\n" . ENTRY_PRICET . $priceto . "\n\n" . ENTRY_QUANTITY . $quantity . $quanwei . "\n\n" . ENTRY_ENQUIRY . $enquiry, $name, $email_address);but dont you think printing 7 messages will look horrible, i had stopped trying it bcoz it showed some errors with email field. ?? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2006 Share Posted June 19, 2006 $quantity . " " . $quanweiYou can print whatever you want, if you want to print 7 messages then do that, if not then don't. Link to comment Share on other sites More sharing options...
virtualadz Posted June 20, 2006 Author Share Posted June 20, 2006 i am i 2 minds , need to have reqd. fields and dont want to print 7 big messages. anyway i will come back later when i decide. thanks 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