Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default popupWindow in Javascript conflicts with Numinix CSS/JS Loader mod

    I have opened every file I have modified. I dont understand why this javascript popupWindow() shows up as undefined.
    In my template this script is undefined, but if I change to default template it works fine- Same exact line. Anyone have an idea on how to correct this?


    Code:
                       
    <a href="javascript:popupWindow('https://d2eclay.com/index.php?main_page=popup_image&amp;pID=12')">
    <img src="bmz_cache/7/762c38d82ba691cbe03e33f3eff72fd3.image.150x114.jpg" alt="Flinstone" title=" Flinstone " width="150" height="114">
    <br><span class="imgLink">larger image</span></a>
    https://d2eclay.com/Catalog/Pipes/Minis/Flinstone

  2. #2
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    The javascript is not loading with the popupWindow page for my template. I checked the default template and get this in header

    Code:
    <script>window.jQuery || document.write('<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>');</script>
      <script>window.jQuery || document.write('<script src="includes/templates/template_default/jscript/jquery.min.js"><\/script>');</script>
    Where can I get popup page load these scripts? This is for the larger image popup in product information page.
    Thanks.

  3. #3
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    If I disable javascript in browser the new window opens, I just cannot figure out where or when the javascript is supposed to load when the popup window appears. I always thought the javascript loaded with the main index.php. Im at a loss on where the javascript fails to load in header.

  4. #4
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    update-
    I found where these 2 scripts are called, they are hard coded in template_default/common/html_header.php. My template uses a CSS/JS Loader custom html_header.php. I tried adding the 2 script calls to the custom html_header but they still show up as undefined and I am not a jscript coder. I am trying to get a response from numinix on how to get these 2 scripts to load in custom header. That is where it stands now. If I get it solved I will post the solution.

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

    Default Re: popupWindow in Javascript

    Have you tried placing them in your templates "jscript" folder

    One just needs to insure that they are renamed/prefixed with "jscript_" so one gets something similar to this

    jscript_xxxxxxx.js
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    Quote Originally Posted by kobra View Post
    Have you tried placing them in your templates "jscript" folder

    One just needs to insure that they are renamed/prefixed with "jscript_" so one gets something similar to this

    jscript_xxxxxxx.js
    What do I place in my jscript folder? These 2 calls are hard coded into html_header.php. Create a psuedo php file with these 2 functions in it? CSS/JS Loader is a module that is supposed to speed up loading pages required by numinix FEC, but it does away with the standard zen cart js loader. I am assuming that they are not in a library that allows CSS/JS Loader to initiate them. I dont know javascript at all. Im not understanding where popupWindow() is even defined or if it is a standard javascript class library. Thanks for responding.

  7. #7
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    Ok. Numinix recommended that I create an autoloader for jQuery, and that they also have a service for creating autoloaders(pay). So great they introduce a bug in my zen cart then offer to fix it for a fee, not cool.

    So my question is can someone show me how to create an autoloader for jQuery? Thanks.

  8. #8
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,547
    Plugin Contributions
    81

    Default Re: popupWindow in Javascript

    After reading this thread I believe you have confused your template's jQuery loader to the built-in Zen Cart popupWindow function. You will find that function in includes/modules/product_info/jscript_main.php. This file will load on the product_info page automatically in default Zen Cart or when using CSS JS Loader.

  9. #9
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: popupWindow in Javascript

    I dont know that the jQuery is what is causing the problem with the image not opening in a new window.
    When I view source of the default_template the only thing that is different in view source of my custom template is the 2 scripts mentioned above.
    In the html_header.php of the default template these 2 lines appear, I dont know, I give up.

    /** CDN for jQuery core **/
    ?>
    <script>window.jQuery || document.write('<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>');</script>
    <script>window.jQuery || document.write('<script src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"><\/script>');</script>

 

 

Similar Threads

  1. css javascript loader addon problems
    By tony_sar in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 25 Aug 2014, 11:05 AM
  2. CSS JS Loader from Numinix, trying to use Fast & Easy Checkout
    By tcarden in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 12 Feb 2013, 05:27 PM
  3. v150 Please help... File merge with numinix CSS/JS loader
    By Miff in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 18 Feb 2012, 05:11 PM
  4. CJ Loader (CSS/Javascript Loader) plugin function is not loaded by zen cart?
    By tripflex in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jul 2011, 03:55 PM
  5. Replies: 3
    Last Post: 6 Feb 2010, 11:27 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