Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2006
    Location
    UK
    Posts
    65
    Plugin Contributions
    0

    Default ' in email adress causes problems

    Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error, presumably because the ' throws out the parsing. Any ideas how to work around/rectify?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: ' in email adress causes problems

    What version of Zen Cart are you using?
    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!

  3. #3
    Join Date
    Jun 2006
    Location
    UK
    Posts
    65
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    Sorry, should have put that in the orignal post. The store configuration is:

    Server OS: Linux 2.4.20-021stab028.19.777-enterprise
    Database: MySQL 3.23.58
    HTTP Server: Apache/2.0.51 (Fedora)
    PHP Version: 4.3.10 (Zend: 1.3.0)
    Zen Cart 1.3.0.2
    Database Patch Level: 1.3.0.2

    I'm using a modified version of the pupleshades template.

    Regards

    Peter

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: ' in email adress causes problems

    Have to admit I have never seen an email address with an apostrophe in it ...

    Note: php v4.3.10 is rather outdated and you should see about upgrading to v4.4.2 ...
    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!

  5. #5
    Join Date
    Jun 2006
    Location
    UK
    Posts
    65
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    Quote Originally Posted by Ajeh
    Have to admit I have never seen an email address with an apostrophe in it ...
    We've got many customers in Ireland (think O'Connor, O'Meera...). Most of the email addresses drop the apostrophe but there are a few that don't.

    The PHP version is the one supplied and supported by my hosting company. I'll be upgrading as soon as they have anew supported version.

    Regards

    Peter

  6. #6
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    Quote Originally Posted by pglock
    Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error, presumably because the ' throws out the parsing. Any ideas how to work around/rectify?
    Apostrophe in an email address? I dont think thats allowed in most of the cases but yeah some countries do use it....
    The problem is definitely due to the problem in parsing because of aporstrophe in the email
    See here:
    http://www.regular-expressions.info/email.html

    Well, the solution would be that you would have to change the script wherever email verification is being done and also make sure it gets inserted into mysql properlly and get retreived properly too
    Thanks
    San

  7. #7
    Join Date
    Jun 2006
    Location
    UK
    Posts
    65
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    OK, thnks for the info. It looks like a codefest is required.

    Regards

    Peter

  8. #8
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    Quote Originally Posted by pglock
    OK, thnks for the info. It looks like a codefest is required.

    Regards

    Peter
    Hmm, nothing complex though

    Try this
    http://codegrrl.com/!/faq/view/apostrophe_in_email_all/


    Please make sure that you backup files before you edit any
    Let us know if it corrects the problem
    Thanks !
    San

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: ' in email adress causes problems

    Quote Originally Posted by pglock
    Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error...
    Do the customers receive their "welcome" emails properly?
    Do they receive order-confirmation emails properly?
    .

    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.

  10. #10
    Join Date
    Jun 2006
    Location
    UK
    Posts
    65
    Plugin Contributions
    0

    Default Re: ' in email adress causes problems

    Sorry for the delay in replying, other issues with the new site (mostly DNS, not Zen Cart).

    Yes, customers are recieving emails OK. It is only two customers out of 4000+ that have an apostrophe in their email so it's not a major issue for day to day operation but does affect newsletters.

    I'll look at the phpmail 'stripslash' approach in the next update (August).

    Regards

    Peter

 

 

Similar Threads

  1. v139h Change Order Email Adress
    By kitcorsa in forum Managing Customers and Orders
    Replies: 1
    Last Post: 2 Aug 2013, 06:21 PM
  2. v150 Set default shipping adress when creating a new adress book entry.
    By Fehfeh in forum General Questions
    Replies: 1
    Last Post: 16 Aug 2012, 04:02 AM
  3. I having problems with my checkout shipping adress, my verification page,
    By Nephishizo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Mar 2011, 07:41 AM
  4. customer email adress from checkout_succes page...
    By eentje in forum General Questions
    Replies: 3
    Last Post: 24 Dec 2010, 11:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg