Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2015
    Location
    Surrey, UK
    Posts
    4
    Plugin Contributions
    0

    Default Problem with display of Order Confirmation emails

    Hiya,

    Any help would be greatly appreciated.

    The styling is out on some Order Confirmation emails and random code is being inserted.

    I have recently moved cart to a vps and had to amend files to get it going with higher php.

    Thank you

    Any ideas Dr Byte?

    Zen Cart 1.3.7

    Name:  zen.jpg
Views: 173
Size:  6.6 KB

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Problem with display of Order Confirmation emails

    Zen Cart 1.3.7 really!!!!

    It is time to upgrade from code that is vulnerable and 8 years old
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2015
    Location
    Surrey, UK
    Posts
    4
    Plugin Contributions
    0

    Default Re: Problem with display of Order Confirmation emails

    I have so many addons otherwise I would, cart is only for customers with accounts, so no card transactions etc. But the notification emails are looking messy since php upgrade.

    Zen Cart 1.3.7
    PHP Version 5.4.45
    MySQL 5.0.95

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,911
    Plugin Contributions
    13

    Default Re: Problem with display of Order Confirmation emails

    it hardly looks random....

    can i safely assume that this is an html email?

    you have some html tags that are appearing as text. i would guess that you have a quoting problem going on...
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Oct 2015
    Location
    Surrey, UK
    Posts
    4
    Plugin Contributions
    0

    Default Re: Problem with display of Order Confirmation emails

    Yeah, not random, from order.php, randomly displayed, and not in all emails, some are displayed correctly.
    Quoting problem?
    Thanks

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,911
    Plugin Contributions
    13

    Default Re: Problem with display of Order Confirmation emails

    djbeatnik,
    sorry if i was not being clear... looking at the order class i have something like this:
    Code:
     $this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
                                $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
                                ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
                                $this->products_ordered_attributes . "\n";
          $this->products_ordered_html .=
    	'<tr>' .
    	'<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' .
    	'<td class="product-details" valign="top">' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') .
    	'<nobr><small><em> '. $this->products_ordered_attributes .'</em></small></nobr></td>' .
    i'm not sure if this is from 3.7 or not, but it looks close....

    it looks like you may have a quote (either ' or ") in a product description (or some other field), which is then screwing up the variable: $this->products_ordered_html

    i hope that makes sense and is helpful to you.

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Oct 2015
    Location
    Surrey, UK
    Posts
    4
    Plugin Contributions
    0

    Default Re: Problem with display of Order Confirmation emails

    Thanks, there are some single and double quotes in some of the descriptions, any idea on how to fix this without removing them?
    Thanks again.

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,911
    Plugin Contributions
    13

    Default Re: Problem with display of Order Confirmation emails

    djb,
    i just want to summarize before we go:
    • you are having some "random" html code in order confirmation emails.
    • these emails are html emails.
    • some item descriptions contain single quotes and double quotes.
    • we think that the email problem is related to these quotes in the item descriptions.


    the only reason why i reiterate this information, is that i'm still not 100% that is your problem it is entirely possible that the quotes are your problem and you are more sure than i am. i would hate to address something that is not, in fact, the source of your issue... and really it looks like the field $this->products_ordered_attributes is actually the problem field. but lets give it a whirl!

    i would replace the following:

    Code:
     $this->products_ordered_html .=
    	'<tr>' .
    	'<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' .
    	'<td class="product-details" valign="top">' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') .
    	'<nobr><small><em> '. $this->products_ordered_attributes .'</em></small></nobr></td>' .
    with
    Code:
     $this->products_ordered_html = htmlspecialcharacters($this->products_ordered_html) .
    	'<tr>' .
    	'<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' .
    	'<td class="product-details" valign="top">' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') .
    	'<nobr><small><em> '. $this->products_ordered_attributes .'</em></small></nobr></td>' .
    you can read about the php function here:

    http://php.net/manual/en/function.htmlspecialchars.php

    the key is executing that function at the right place.

    i hope that helps! good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #9
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Problem with display of Order Confirmation emails

    we think that the email problem is related to these quotes in the item descriptions.
    Or one can use escape characters for special characters in their html mark up
    for double quotes it would be
    Code:
    " or  &quot;
    Others can be seen here
    https://en.wikipedia.org/wiki/List_o...ity_references
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Issue with order confirmation emails
    By carlman in forum Customization from the Admin
    Replies: 6
    Last Post: 1 Nov 2015, 01:24 AM
  2. v154 Order confirmation emails and Contact Us emails not being received
    By jcrewe in forum General Questions
    Replies: 5
    Last Post: 22 Mar 2015, 06:36 PM
  3. v151 Attribute display problem on Checkout Confirmation page (and possible emails too)
    By jeffmic in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 26 Jan 2013, 10:05 AM
  4. Problem with confirmation emails in Japanese
    By gingabox in forum General Questions
    Replies: 1
    Last Post: 30 Apr 2011, 07:05 AM
  5. Replies: 8
    Last Post: 16 Jan 2010, 09:07 PM

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