Zen Cart Logo
Forums / General Questions / Contact Us Form - all the text 'runs together' from customer

Contact Us Form - all the text 'runs together' from customer

Locked

Views: 1,182

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
18 Sep 2010, 9:54 PM
#1
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Contact Us Form - all the text 'runs together' from customer

Hi gang,

When customers use our 'Contact Us' form and write text to us with paragraphs, all the lines run continuously after each other when we get the email.

This is a problem when they are trying to send us lyrics with many stanzas that show up all bunched together.

Is there a way this can be coded to fix this so their text shows up to us as originally entered by the customer?

thanks,

Jeff Michaels,
pres of Musical Creations Ltd.

18 Sep 2010, 10:51 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Contact Us Form - all the text 'runs together' from customer

What version Zen Cart are you using?

I cannot reproduce this problem on the Contact Us in v1.3.9 ... :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Sep 2010, 11:33 PM
#3
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Contact Us Form - all the text 'runs together' from customer

This is on my oldest website that uses 1.3.7.1. This is the most used of our 4 websites and the most difficult to upgrade due to tons of customizations. Maybe 'someday'! Can u locate this problem fix in this older code?

Jeff Michaels,
pres of Musical Creations Ltd.

19 Sep 2010, 12:26 AM
#4
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Contact Us Form - all the text 'runs together' from customer

My 1.3.9f contact us displays this: (email is not html formatted either


this
is
a
test.

does
it
work?


My 1.3.7.1 contact us displays this: (email IS html formatted)
(both sites have HTML defined in the configuration/email settings

this is a test. does it work?

Any ideas what file contains the code to fix this?

thanks,

Jeff Michaels,
pres of Musical Creations Ltd.

19 Sep 2010, 1:09 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact Us Form - all the text 'runs together' from customer

The lack of line spacing isn't your issue as much as why your contact-us emails are being sent as HTML, since it was never designed to treat contact-us as HTML. HTML emails ignore line-breaks ... which is why you're not seeing the line breaks.

In what ways are these two files different in your site vs a clean set of v1.3.7.1 files?

  • /includes/modules/pages/contact_us/header_php.php
  • /includes/functions/functions_email.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Sep 2010, 1:27 AM
#6
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Contact Us Form - all the text 'runs together' from customer

My updated functions_email.php has these pieces of extra code that are not in the original 1.3.7.1 version

if ($module == 'resend') {
$email_html=''; // just blank out the html portion if resend from admin
while (strstr($email_text, ' ')) $email_text = str_replace(' ', ' ', $email_text);
}

AND

//following lines are inserted to take disclaimed, span. extra info and copyright off the bottom of the admin HTML emails
if ($module == 'checkout_extra') {
$block['EMAIL_FOOTER_COPYRIGHT'] = '';
$block['EMAIL_DISCLAIMER'] = '';
$block['EMAIL_SPAM_DISCLAIMER'] = '';
$block['EXTRA_INFO'] = '';
}

AND (checkout_extra is added in 2 places below)

// set the reply-to address. If none set yet, then use Store's default email name/address.
// If sending from contact-us or tell-a-friend page, use the supplied info
$email_reply_to_address = ($email_reply_to_address) ? $email_reply_to_address : (in_array($module, array('contact_us', 'tell_a_friend', 'checkout_extra')) ? $from_email_address : EMAIL_FROM);
$email_reply_to_name = ($email_reply_to_name) ? $email_reply_to_name : (in_array($module, array('contact_us', 'tell_a_friend', 'checkout_extra')) ? $from_email_name : STORE_NAME);
$mail->AddReplyTo($email_reply_to_address, $email_reply_to_name);

Jeff Michaels,
pres of Musical Creations Ltd.

19 Sep 2010, 1:30 AM
#7
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Contact Us Form - all the text 'runs together' from customer

/includes/modules/pages/contact_us/header_php.php

is not modified

Jeff Michaels,
pres of Musical Creations Ltd.

19 Sep 2010, 10:46 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact Us Form - all the text 'runs together' from customer

Then your contact-us email address must have an account in your store and has its email-preferences set to HTML. Change that to TEXT, and your contact-us emails should come in as text-only, and should then retain the line-breaks.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Sep 2010, 11:58 AM
#9
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: Contact Us Form - all the text 'runs together' from customer

SUCCESS!!!
:clap:

OMG - I would have never figured that one out.

Yes I did have an account on that website with the same email address as the contact-us form.
I tested all sorts of settings with keeping it in HTML, changing to TEXT and then able to finally erase it.
With both TEXT and erasing that customer account, the Contact-Us sent the email to me (at that same email address) correctly in TEXT format and all the line breaks remained.

This was all in 1.3.7.1

Now, I don't have this issue with my other websites, but does this issue still remain in newer versions of ZenCart? (so I know)

Once again, Dr Byte - you are the guru and the best. This problem has been here since late 2006 and now I can finally get contact-us emails sent to me that are formatted as intended. Forever grateful.

jeff

Jeff Michaels,
pres of Musical Creations Ltd.

19 Sep 2010, 12:10 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact Us Form - all the text 'runs together' from customer

The same functionality exists in later versions.

Glad it's sorted for you ;)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.