Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2008
    Posts
    63
    Plugin Contributions
    0

    Default popup print invoice - no content

    Hello,

    Well, I've discovered that my popup print invoice add-on is no longer working properly.
    The popup window will appear, but there is no content.
    When viewing the source, it seems that the head section never finishes and the body never begins.
    The source ends abruptly after this:
    Code:
    <script language="javascript" type="text/javascript"><!--
    var i=0;
    function resize() {
      if (navigator.appName == 'Netscape') i=10;
      if (document.documentElement && document.documentElement.clientWidth) {
        frameWidth = document.documentElement.clientWidth;
        frameHeight = document.documentElement.clientHeight;
        window.resizeTo(frameWidth,frameHeight-i);
      }
      else if (document.body) {
         window.resizeTo(document.body.clientWidth, document.body.clientHeight-i);
      }
      self.focus();
    }
    //--></script>
    It was working just fine for a very long time.
    I don't know what I've done to break it. And I don't really know how long it's been broken. I just don't know where to look next. Don't know what might be interfering with it.

    The behavior is the same from the checkout success screen as well as the order history screen.

    Thanks to anyone willing to help out.
    Jason A.

  2. #2
    Join Date
    Jul 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: popup print invoice - no content

    Ok, I've found the problem, but I don't really have a solution yet.
    The problem was my insertion of some Google Analytics code.

    In this directory: includes\templates\my_template\common\
    For the file html_header.php

    I had inserted this:
    Code:
    <?php
    /* Begin Simple Google Analytics */
      if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator')) ) {
    	//Skip outputting the tracking code as this is a pop-up window
      } else { // Print tracking code to page
    	if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
    	require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    	}
      } // end if for page determination
    /* End Simple Google Analytics */
    ?>
    
    
    <META name="y_key" value="xxxxxxxxxxxxxxxx" />
    <meta name="msvalidate.01" content="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    When I took out this piece of code, the popup print invoice worked just fine again.
    Could anyone suggest a better way to put the Google Analytics code into my website?

    Thanks so much.
    Jason

  3. #3
    Join Date
    Jul 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: popup print invoice - no content

    Well, found my solution.
    Of course, I feel like a little silly that I didn't figure it out sooner.

    This post for Simple Google Analytics helped:
    http://www.zen-cart.com/forum/showpo...postcount=1462

    Yes, indeed, it interferes with pop-ups.
    So they put in some exceptions to the code so that it wouldn't mess up the popup windows:
    Code:
    if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator')) ) {
    Of course, the print invoice addon isn't installed on everyone's site.
    So, I just needed to add it into the exceptions:
    Code:
    if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator,popup_print_invoice')) ) {
    That was it.
    Pretty easy. Too bad it took me all day.
    Cheers.
    Jason

  4. #4
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: popup print invoice - no content

    Thanks patternman, this got me pointed in the right direction.

    However, I still have the problem. I am using ZC1.3.9 and Simple Google Analytics 1.2.5

    For Simple Google Analytics 1.2.5 - the code patternman mentions is found in /includes/templates/YOUR_TEMPLATE/jscript/jscript_google_analytics.php and already takes into account 'popup_print_invoice'


    Quote Originally Posted by patternman View Post
    Well, found my solution.
    Of course, I feel like a little silly that I didn't figure it out sooner.

    This post for Simple Google Analytics helped:
    http://www.zen-cart.com/forum/showpo...postcount=1462

    Yes, indeed, it interferes with pop-ups.
    So they put in some exceptions to the code so that it wouldn't mess up the popup windows:
    Code:
    if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator')) ) {
    Of course, the print invoice addon isn't installed on everyone's site.
    So, I just needed to add it into the exceptions:
    Code:
    if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator,popup_print_invoice')) ) {
    That was it.
    Pretty easy. Too bad it took me all day.
    Cheers.
    Jason

    Has anyone else experienced this problem with the above combination and able to help me out?
    ZC 1.5.5
    Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

  5. #5
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: popup print invoice - no content

    UPDATE: This installs and works nicely with ZC1.3.9H and Simple Google Analytics.

    I still forget from time to time about the log files which truly help to pinpoint problems. In my case, I upload a php file to the wrong folder. I hope this helps as a reminder to others some of the tools out there for self diagnostics.

    Thanks anyway.
    ZC 1.5.5
    Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

  6. #6
    Join Date
    Jul 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: popup print invoice - no content

    UPDATE: This installs and works nicely with ZC1.3.9H and Simple Google Analytics.

    I still forget from time to time about the log files which truly help to pinpoint problems. In my case, I upload a php file to the wrong folder. I hope this helps as a reminder to others some of the tools out there for self diagnostics.
    Glad to hear you got it sorted.
    Cheers.
    Jason

 

 

Similar Threads

  1. v150 Print Popup Invoice for v1.5?
    By futurist71 in forum Upgrading to 1.5.x
    Replies: 19
    Last Post: 1 Mar 2019, 10:35 PM
  2. Client Invoice - problems customizing the popup-print-invoice addon
    By LloydR in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 12 Jan 2011, 10:41 AM
  3. Print Invoice Popup
    By shanesoine in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 24 Nov 2010, 11:52 AM
  4. Popup Print Invoice help
    By eps492003 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 May 2010, 09:50 PM
  5. Popup Print Invoice Version 1.1
    By Decostyle in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 15 Feb 2009, 08:28 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