Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Font and format retention after a varible parse


kittmaster

Recommended Posts

I'm trying to solve a problem with font formatting retention. The example is from the contact us page, when the user types in their comment the fonts are taken from the stylesheet. When the http_post_vars takes that info typed into the form, it for some reason converts it back to times roman which isn't the font that is used throughout my site (Verdana).

 

How do I maintain the font integrity? The information is in question is from the $enquiry variable which gets passed back to the html email which the customer sees is different from the font used within the rest of the formatted email from the script.

 

Ideas on what the fix is?

 

here is the code

 

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']);
$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, $enquiry, $name, $email_address);
if(SEND_CONTACT_US_RESPONSE=='true')
	  tep_mail($name, $email_address, CONTACT_US_RESPONSE_EMAIL_SUBJECT, CONTACT_US_RESPONSE_EMAIL_TEXT . EMAIL_FORMAT_FIX . "\n\n".$enquiry, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

I've tried to paste this"

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

before it and within it, but I get parse errors because it doesn't seem to belong there.

 

This is driving me nuts

 

Thanks

 

Chris

Link to comment
Share on other sites

dont bump :-"

are your emails going out in html format?

if not styling will be tricky. if they are either link to your style sheet and add style classes or add style to head of email

 

 

The HTML is set to true in the admin area, for some of the messages, the entire head comes through formatted correctly with the right fonts and background, but the $enquiry text that is captured from the form field continues to remain unformatted when it is captured. The remainder of the email remains properly formatted after the enquiry data is added.

 

This happens to all emails, I'm particular testing it with the contact_us.php to get it right before I venture to any of the other email items.

 

Does that make sense?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...