Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default [Fixed 1.6.0] template_filename not selecting in functions_email.php

    In functions_email.php, the function zen_build_html_email_from_template() refers to a $current_page_base. In dubugging, this was always null. I changed line 427 to use $module instead of $current_page_base:
    Code:
        $template_filename = DIR_FS_EMAIL_TEMPLATES . $langfolder . "email_template_" . $module . ".html";

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: template_filename not selecting in functions_email.php

    Quote Originally Posted by carlvt88 View Post
    $current_page_base. In dubugging, this was always null.
    Not sure what exactly you're debugging.

    $current_page_base is not null. In fact it's used 267 times.
    .

    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.

  3. #3
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: template_filename not selecting in functions_email.php

    (sorry if this is a resend)

    In testing, I wasn't seeing the order_status email template used. Status changes always sent the default template.

    This is on my development system, Win7 / xampp 3.0.12 / netbeans 7.2.

    I set a breakpoint in functions_email.php line 427. This is where the template_filename is constructed from, among other things, $current_page_base. When I single stepped to this point, $current_page_base was null, so I used $module instead which evaluated to "order_status" - constructing the correct $template_filename.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: template_filename not selecting in functions_email.php

    Oh. This is on the *admin* side?
    .

    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
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: template_filename not selecting in functions_email.php

    correct

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: template_filename not selecting in functions_email.php

    Aha. Okay, try this change instead. Add the line to the top of the function, as shown:
    Code:
        global $messageStack, $current_page_base;
        if (NULL == $current_page_base) $current_page_base = $module;
    .

    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.

  7. #7
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: template_filename not selecting in functions_email.php

    OK - Thanks!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: template_filename not selecting in functions_email.php

    The fix will be included in v1.6.0: https://github.com/zencart/zencart/c...ef462da0ba56b8
    .

    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. v153 v153 includes/functions/functions_email.php BUG
    By dee_d_lady in forum Bug Reports
    Replies: 1
    Last Post: 3 Sep 2014, 08:05 PM
  2. Replies: 1
    Last Post: 19 Sep 2012, 04:11 AM
  3. Replies: 4
    Last Post: 14 May 2010, 02:46 PM
  4. Replies: 2
    Last Post: 28 Sep 2006, 10:26 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