Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    247
    Plugin Contributions
    0

    Default payment provider name html entities not processed in text email messages

    ZC 1.5.6c, One Page Checkout 2.3.1, PHP 7.3.15.

    Last night I had to add some details to the payment provider names on the payment checkout page, in order to specify limitations on which cards could be handled. HTML elements/tags like span and br work fine, but I found that if I write an apostrophe (') as an HTML entity then this appears verbatim in the email message to the customer for the order, although the apostrophe is correctly shown on the web page.

    I assume not all strings are intended to include HTML code, but on the other hand, it is not clear if these should be written directly or with HTML entities.

    The relevant strings I have used are:
    MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT in
    includes/languages/LANGUAGE/modules/payment/paypalwpp.php

    and

    MODULE_PAYMENT_SQUARE_TEXT_CATALOG_TITLE in
    includes/languages/LANGUAGE/modules/payment/square.php

    As this only affects the text email (I did not test with HTML mail), I presume it is a filtering bug somewhere, but I have tried to track it down yet.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    9,660
    Plugin Contributions
    73

    Default Re: payment provider name html entities not processed in text email messages

    Even though the name of the configuration setting isn't intuitive, you can identify those HTML-code-to-character conversions via the E-Mail Options::Convert currencies for TEXT emails setting.

  3. #3
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    247
    Plugin Contributions
    0

    Default Re: payment provider name html entities not processed in text email messages

    Hi lat9,
    Wow, interesting. thanks! While not a currency, I added ":','" to the end of the list for testing.
    Obviously not an idea solution long-term. I think I will play with adding text explanations to each payment provider (in a separate line from the name string), which will not be affected by email issues.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  4. #4
    Join Date
    Jan 2004
    Posts
    65,414
    Blog Entries
    7
    Plugin Contributions
    232

    Default Re: payment provider name html entities not processed in text email messages

    One way to add extra text (which I'm exploring adding in v1.2 of the module) is this:

    1. Add another language define to the module's language file:
    Code:
    define('MODULE_PAYMENT_SQUARE_TEXT_NOTICES_TO_CUSTOMER', '(Only Visa/MC accepted)'); // customize to suit
    2. Edit the array returned by the module's "selection()" function:
    (Add the code shown in red here)
    Code:
            $selection = array(
                'id' => $this->code,
                'module' => $this->title,
                'fields' => array(
                    array(
                        'field' => '<div>' . MODULE_PAYMENT_SQUARE_TEXT_NOTICES_TO_CUSTOMER . '</div>',
                    ),
                    array(
                        'title' => MODULE_PAYMENT_SQUARE_TEXT_CREDIT_CARD_NUMBER,
    .

    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.

  5. #5
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    247
    Plugin Contributions
    0

    Default Re: payment provider name html entities not processed in text email messages

    Thanks very much! Took a bit of time to try this, worked perfectly.
    Also tried with Paypal, editing similar parts of the corresponding code to display, not quite a clean, but acceptable for me at this stage.
    Code:
        return array('id' => $this->code,
             'module' => '<img src="' . MODULE_PAYMENT_PAYPALEC_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_TEXT_BUTTON_ALTTEXT . '" /><br /   >' .     MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . ' <br /> ' . MODULE_PAYMENT_PAYPALWPP_TEXT_NOTICES_TO_CUSTOMER);
         /*'module' => '<img src="' . MODULE_PAYMENT_PAYPALEC_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_TEXT_BUTTON_ALTTEXT . '" /><span style="font- size:11px; font-family: Arial, Verdana;"> ' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '</span>');*/

 

 

Similar Threads

  1. Problem with orders processed before payment processed
    By momoftwo in forum General Questions
    Replies: 1
    Last Post: 8 Mar 2010, 10:39 AM
  2. Replies: 7
    Last Post: 23 Feb 2010, 01:21 AM
  3. Tell A Friend Email in Text Not HTML
    By mrrcomp in forum General Questions
    Replies: 3
    Last Post: 4 May 2007, 07:16 AM
  4. Replies: 3
    Last Post: 28 Mar 2007, 02:39 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR