Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,046
    Plugin Contributions
    29

    Default [Done v1.5.2] function email_collect_extra_info, closing table tag in wrong place

    I see 1.5.2 now supports the use of additional fields in the extra info section (something I use), despite not yet being used by any other vanilla code, as far as I can see.

    PHP Code:
    '<tr><td class="extra-info-bold">' OFFICE_DATE_TIME '</td><td>' date('D M j Y G:i:s T') . '</td></tr>' '</table>';

    foreach(
    $moreinfo as $key => $val) {
    $extra_info['TEXT'] .= $key ': ' $val "\n";
    $extra_info['HTML'] .= '<tr><td class="extra-info-bold">' $key '</td><td>' $val '</td></tr>';
    }
    return 
    $extra_info;  } 
    However the closing table tag should now be moved to encompass the optional fields.

    I suggest:
    PHP Code:
    '<tr><td class="extra-info-bold">' OFFICE_DATE_TIME '</td><td>' date('D M j Y G:i:s T') . '</td></tr>' ;

    foreach(
    $moreinfo as $key => $val) {
    $extra_info['TEXT'] .= $key ': ' $val "\n";
    $extra_info['HTML'] .= '<tr><td class="extra-info-bold">' $key '</td><td>' $val '</td></tr>';
    }
    $extra_info['TEXT'] .= "\n";
    $extra_info['HTML'] .= '</table>';
    return 
    $extra_info;

    For the interest of anyone wishing to use this new functionality, the format of the array to be passed in the email_collect_extra_info function call would be something like this:
    PHP Code:
    $extra_fields = array(
    EMAIL_FORM_HONEYPOT => $honeypot_field,
    EMAIL_FORM_FILL_TIME => $form_fill_time
    ); 
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  2. #2
    Join Date
    Jan 2004
    Posts
    65,292
    Blog Entries
    7
    Plugin Contributions
    227

    Default Re: function email_collect_extra_info, closing table tag in wrong place

    .

    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.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 17 Mar 2013, 10:16 PM
  2. Replies: 2
    Last Post: 10 May 2010, 04:51 AM
  3. Tag Line - Closing The Gap
    By Kite Force in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Jan 2009, 03:06 PM
  4. Replies: 3
    Last Post: 14 Feb 2008, 04:13 PM

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