Page 15 of 17 FirstFirst ... 51314151617 LastLast
Results 141 to 150 of 170
  1. #141
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    315
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by carlwhat View Post
    danielle you have removed the code for loading of the jquery library. that's why you can't get it to work. the previous comments should give you where to look to get it to load.

    i like the FEC plugin, but from what i remember that one will require a bit of work as well to get it working and styled the way you want it.

    if you are still having problems let me know and i provide some more help when i'm in front of my computer.
    I agree this plugin should work out of the box with the responsive_classic template.

    OK I'm being a whiner here,
    I have used this css js loader plugin in the past with the default classic template and all went well.
    Trying to get it to work with the responsive_classic template has soaked up several hours without success.
    (Tried numinix and ZC site plugin version) (Blank screen when opening the home page) Works with classic template
    The documentation is not complete for us hackers that are not proficient in coding.
    The instruction in css js loader elude to the sequence of loading CSS & JS scripts and moving then to another sitewide file. but give no examples of what code to manipulate in the html_header.php file.

    When you refer to not loading the jquery library what code or lines of code are you referring to?
    I have modified FEC in the past and would prefer to use it.

    I did load the OPC plugin but will have to re-customize it. (Trying to figure out how to make the PO number optional.. see post on OPC) https://www.zen-cart.com/search.php?searchid=1775242

    Any additional advice/guidance would be appreciated.

    Thanks, Lucien

  2. #142
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by linuxguy2 View Post
    I agree this plugin should work out of the box with the responsive_classic template.

    OK I'm being a whiner here,
    I have used this css js loader plugin in the past with the default classic template and all went well.
    Trying to get it to work with the responsive_classic template has soaked up several hours without success.
    (Tried numinix and ZC site plugin version) (Blank screen when opening the home page) Works with classic template
    The documentation is not complete for us hackers that are not proficient in coding.
    The instruction in css js loader elude to the sequence of loading CSS & JS scripts and moving then to another sitewide file. but give no examples of what code to manipulate in the html_header.php file.

    When you refer to not loading the jquery library what code or lines of code are you referring to?
    I have modified FEC in the past and would prefer to use it.

    I did load the OPC plugin but will have to re-customize it. (Trying to figure out how to make the PO number optional.. see post on OPC) https://www.zen-cart.com/search.php?searchid=1775242

    Any additional advice/guidance would be appreciated.

    Thanks, Lucien
    Post the contents of the latest error log, any time there is a blank page the error is in the logs. I am feeling the common/html_header is not merged correctly.

  3. #143
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,842
    Plugin Contributions
    11

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by lankeeyankee View Post
    Post the contents of the latest error log, any time there is a blank page the error is in the logs. I am feeling the common/html_header is not merged correctly.
    if there is a blank screen, then yes post the contents of any log files...

    my reference was to jquery and it not loading correctly. for troubleshooting/debugging that, we would need the url of the site, as those errors would be reported on the browser console.

    unfortunately i can not give any line numbers as i have so modified my code as to make line numbers only relevant for my own debugging.

    that said, jquery and associated jquery add-ons do require them to be loaded in the correct order. i admit that it does get very confusing, and i have spent numerous hours myself doing the debugging.

    good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #144
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    315
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by carlwhat View Post
    if there is a blank screen, then yes post the contents of any log files...

    my reference was to jquery and it not loading correctly. for troubleshooting/debugging that, we would need the url of the site, as those errors would be reported on the browser console.

    unfortunately i can not give any line numbers as i have so modified my code as to make line numbers only relevant for my own debugging.

    that said, jquery and associated jquery add-ons do require them to be loaded in the correct order. i admit that it does get very confusing, and i have spent numerous hours myself doing the debugging.

    good luck!
    Nothing in the Logs & nothing in the console?
    Here's the URL
    pcsnnets.com/fec18


    And of course when I replace the original html_header/php & tpl_main_page.php it works.
    So I'm thinking I can leave css_js_loader installed. Run those two original files and load FEC which will probably work fine without minify.

    Merged files
    ********************
    html_header.php
    *********************
    <?php
    /**
    * Common Template
    *
    * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2017 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: rbarbour zcadditions.com Fri Feb 12 17:13:56 2016 -0500 New in v1.5.5 $
    */

    $zco_notifier->notify('NOTIFY_HTML_HEAD_START', $current_page_base, $template_dir);

    // Prevent clickjacking risks by setting X-Frame-Options:SAMEORIGIN
    header('X-Frame-Options:SAMEORIGIN');

    /**
    * load the module for generating page meta-tags
    */
    require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
    /**
    * output main page HEAD tag and related headers/meta-tags, etc
    */
    ?>
    <?php

    // ZCAdditions.com, ZCA Responsive Template Default (BOF-addition 1 of 2)
    if (!class_exists('Mobile_Detect')) {
    include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
    }
    $detect = new Mobile_Detect;
    $isMobile = $detect->isMobile();
    $isTablet = $detect->isTablet();
    if (!isset($layoutType)) $layoutType = ($isMobile ? ($isTablet ? 'tablet' : 'mobile') : 'default');
    // ZCAdditions.com, ZCA Responsive Template Default (BOF-addition 1 of 2)

    $paginateAsUL = true;

    ?>
    <!DOCTYPE html>
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta charset="<?php echo CHARSET; ?>">
    <title><?php echo META_TAG_TITLE; ?></title>
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
    <meta name="author" content="<?php echo STORE_NAME ?>" />
    <meta name="generator" content="shopping cart program by Zen Cart&reg;, http://www.zen-cart.com eCommerce" />
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php } ?>

    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes"/>

    <?php if (defined('FAVICON')) { ?>
    <link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
    <link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
    <?php } //endif FAVICON ?>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
    <?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
    <link rel="canonical" href="<?php echo $canonicalLink; ?>" />
    <?php } ?>
    <?php
    // BOF hreflang for multilingual sites
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    $lng = new language;
    }
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
    while (list($key, $value) = each($lng->catalog_languages)) {
    echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type, false) : $canonicalLink . (strpos($canonicalLink, '?') ? '&amp;' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n";
    }
    }
    // EOF hreflang for multilingual sites
    ?>

    <!-- Begin css js loader code change -->

    <?php
    /**
    * load the loader files
    */
    $RC_loader_files = array();
    if($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())){
    $RI_CJLoader->autoloadLoaders();
    $RI_CJLoader->loadCssJsFiles();
    $RC_loader_files = $RI_CJLoader->header();

    if (!empty($RC_loader_files['meta']))
    foreach($RC_loader_files['meta'] as $file) {
    include($file['src']);
    echo "\n";
    }

    if (!empty($RC_loader_files['css']))
    foreach($RC_loader_files['css'] as $file){
    if (!$file['defer']) {
    if($file['include']) {
    include($file['src']);
    } else if (!$RI_CJLoader->get('minify_css') || $file['external']) {
    //$link = $file['src'];
    echo '<link rel="stylesheet" type="text/css" href="'.$file['src'] .'" />'."\n";
    } else {
    //$link = 'min/?f='.$file['src'].'&amp;'.$RI_CJLoader->get('minify_time');
    echo '<link rel="stylesheet" type="text/css" href="min/?f='.$file['src'].'&amp;'.$RI_CJLoader->get('minify_time').'" />'."\n";
    }
    }
    }
    }
    //DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    ?>

    <!-- End css js loader code change -->

    <?php // ZCAdditions.com, ZCA Responsive Template Default (BOF-addition 2 of 2)
    $responsive_mobile = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_mobile.css' . '" /><link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'jquery.mmenu.all.css' . '" />';
    $responsive_tablet = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_tablet.css' . '" /><link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'jquery.mmenu.all.css' . '" />';
    $responsive_default = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_default.css' . '" />';

    if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional')) ) {
    echo '';
    } else {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive.css' . '" />';
    if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
    echo $responsive_mobile;
    } else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
    echo $responsive_tablet;
    } else if ( $_SESSION['layoutType'] == 'full' ) {
    echo '';
    } else {
    echo $responsive_default;
    }
    }
    ?>
    <script type="text/javascript">document.documentElement.className = 'no-fouc';</script>
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
    <?php // ZCAdditions.com, ZCA Responsive Template Default (EOF-addition 2 of 2) ?>
    <?php
    $zco_notifier->notify('NOTIFY_HTML_HEAD_END', $current_page_base);
    ?>
    </head>

    <?php // NOTE: Blank line following is intended: ?>

    ********************************
    tpl_main_page.php
    *************
    <?php
    /**
    * Common Template - tpl_main_page.php
    *
    * Governs the overall layout of an entire page<br />
    * Normally consisting of a header, left side column. center column. right side column and footer<br />
    * For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
    * example: to override the privacy page<br />
    * - make a directory /templates/my_template/privacy<br />
    * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
    * <br />
    * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
    * to turn off the header and/or footer uncomment the lines below<br />
    * Note: header can be disabled in the tpl_header.php<br />
    * Note: footer can be disabled in the tpl_footer.php<br />
    * <br />
    * $flag_disable_header = true;<br />
    * $flag_disable_left = true;<br />
    * $flag_disable_right = true;<br />
    * $flag_disable_footer = true;<br />
    * <br />
    * // example to not display right column on main page when Always Show Categories is OFF<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    * <br />
    * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2016 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: rbarbour zcadditions.com Fri Jan 8 14:09:45 2016 -0500 New in v1.5.5 $
    */

    /** bof DESIGNER TESTING ONLY: */
    // $messageStack->add('header', 'this is a sample error message', 'error');
    // $messageStack->add('header', 'this is a sample caution message', 'caution');
    // $messageStack->add('header', 'this is a sample success message', 'success');
    // $messageStack->add('main', 'this is a sample error message', 'error');
    // $messageStack->add('main', 'this is a sample caution message', 'caution');
    // $messageStack->add('main', 'this is a sample success message', 'success');
    /** eof DESIGNER TESTING ONLY */



    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }

    // ZCAdditions.com, Responsive Template Default (BOF-addition 1 of 1)
    if ($flag_disable_right or COLUMN_RIGHT_STATUS == '0') {
    $box_width_right = preg_replace('/[^0-9]/', '', '0');
    $box_width_right_new = '';
    } else {
    $box_width_right = COLUMN_WIDTH_RIGHT;
    $box_width_right = preg_replace('/[^0-9]/', '', $box_width_right);
    $box_width_right_new = 'col' . $box_width_right;
    }

    if ($flag_disable_left or COLUMN_LEFT_STATUS == '0') {
    $box_width_left = preg_replace('/[^0-9]/', '', '0');
    $box_width_left_new = '';
    } else {
    $box_width_left = COLUMN_WIDTH_LEFT;
    $box_width_left = preg_replace('/[^0-9]/', '', $box_width_left);
    $box_width_left_new = 'col' . $box_width_left;
    }

    $side_columns_total = $box_width_left + $box_width_right;
    $center_column = '970'; // This value should not be altered
    $center_column_width = $center_column - $side_columns_total;
    // ZCAdditions.com, Responsive Template Default (EOF-addition 1 of 1)


    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>
    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

    <?php
    if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
    echo '<div id="page">';
    } else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
    echo '<div id="page">';
    } else {
    //
    }
    ?>

    <?php
    if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>

    <div id="mainWrapper">
    <?php
    /**
    * prepares and displays header output
    *
    */
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_header = true;
    }
    require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>

    <div id="contentMainWrapper">

    <?php
    if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
    // global disable of column_left
    $flag_disable_left = true;
    }
    if (!isset($flag_disable_left) || !$flag_disable_left) {
    ?>
    <div class="<?php echo $box_width_left_new; ?>">
    <?php
    /**
    * prepares and displays left column sideboxes
    *
    */
    require(DIR_WS_MODULES . zen_get_module_directory('column_left.php'));
    ?>
    </div>

    <?php
    }
    ?>

    <div class="<?php echo 'col' . $center_column_width; ?>">

    <!-- bof breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->

    <?php
    if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>

    <!-- bof upload alerts -->
    <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
    <!-- eof upload alerts -->

    <?php
    /**
    * prepares and displays center column
    *
    */
    require($body_code);
    ?>

    <?php
    if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    </div>


    <?php
    //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
    if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
    // global disable of column_right
    $flag_disable_right = true;
    }
    if (!isset($flag_disable_right) || !$flag_disable_right) {
    ?>
    <div class="<?php echo $box_width_right_new; ?>">
    <?php
    /**
    * prepares and displays right column sideboxes
    *
    */
    require(DIR_WS_MODULES . zen_get_module_directory('column_right.php'));
    ?>
    </div>

    <?php
    }
    ?>

    </div>

    <?php
    /**
    * prepares and displays footer output
    *
    */
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
    }
    require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
    ?>

    </div>
    <!--bof- parse time display -->
    <?php
    if (DISPLAY_PAGE_PARSE_TIME == 'true') {
    ?>
    <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
    <?php
    }
    ?>
    <!--eof- parse time display -->
    <!--bof- banner #6 display -->
    <?php
    if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    <!--eof- banner #6 display -->




    <?php
    if ($detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
    echo '</div>';
    } else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
    echo '</div>';
    } else {
    //
    }
    ?>


    <?php if ($detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
    require($template->get_template_dir('tpl_modules_mobile_menu.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_mobile_menu.php');
    } else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
    require($template->get_template_dir('tpl_modules_mobile_menu.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_mobile_menu.php');
    } else if ( $_SESSION['layoutType'] == 'full' ) {
    //
    } else {
    //
    }
    ?>

    <?php /* add any end-of-page code via an observer class */
    $zco_notifier->notify('NOTIFY_FOOTER_END', $current_page);
    ?>


    <?php

    <!-- Begin css js loader code change -->

    /**
    * load the loader JS files
    */
    if(!empty($RC_loader_files)){
    foreach($RC_loader_files['css'] as $file){
    if ($file['defer']) {
    if($file['include']) {
    include($file['src']);
    } else if (!$RI_CJLoader->get('minify_css') || $file['external']) {
    //$link = $file['src'];
    echo ''."\n";
    } else {
    //$link = 'min/?f='.$file['src'].'&'.$RI_CJLoader->get('minify_time');
    echo ''."\n";
    }
    }
    }

    foreach($RC_loader_files['jscript'] as $file)
    if($file['include']) {
    include($file['src']);
    } else if(!$RI_CJLoader->get('minify_js') || $file['external']) {
    echo '<script type="text/javascript" src="'.$file['src'].'"></script>'."\n";
    } else {
    echo '<script type="text/javascript" src="min/?f='.$file['src'].'&'.$RI_CJLoader->get('minify_time').'"></script>'."\n";
    }
    }
    //DEBUG: echo '';
    ?>

    <!-- End of css js loader code change -->
    </body>

  5. #145
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    315
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    CORRECTION: Something in Console but no logs!

  6. #146
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,842
    Plugin Contributions
    11

    Default Re: CSS JS Loader [Support Thread]

    linuxguy,
    with that username, i expect more!

    please use bbcode tags especially when posting code. it makes it easier to read. there is a link at the bottom for bb code tags.

    glad you found the console error. now i will not post it...

    the console error is definitely your problem. normally i would not think so, but i'm 100% on this one.

    go to your site, open the developer tools, then f1 for settings, then disable javascript, and reload the page. site comes up.

    pretty basic problem, you do NOT have the jquery library loaded. you can either use a CDN for loading the jquery library, or download a copy of it, and put it here:

    fec18/includes/templates/responsive_classic/jscript

    but in looking at the source, are you sure you have the same copy of:

    https://github.com/zencart/zencart/b...tml_header.php

    ok, looking at the code you posted above, you need:

    lines 137 and 138 look to load the jquery library.

    add those BEFORE the loader code and see what happens.

    i would start there.

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #147
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: CSS JS Loader [Support Thread]

    I think the problem is that in the latest versions of the loader Numinix moved the javascript loading to the bottom of the page. This to make search engines happy, but without proper documentation and support, this is a recipe for disaster. You can not load any script at the bottom of the page without knowing where it is needed on the page, resulting in jquery errors and non working scripts.
    Better download an older version, 4.05 if i remember correctly. This was one of the last with the Javascript loading in the head of your page.

  8. #148
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    315
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by Design75 View Post
    I think the problem is that in the latest versions of the loader Numinix moved the javascript loading to the bottom of the page. This to make search engines happy, but without proper documentation and support, this is a recipe for disaster. You can not load any script at the bottom of the page without knowing where it is needed on the page, resulting in jquery errors and non working scripts.
    Better download an older version, 4.05 if i remember correctly. This was one of the last with the Javascript loading in the head of your page.
    Hi carlwhat,
    Good one! Completed linux certification many years ago... Just can't code much

    Back to the issue: Seems awkward that fec & css_js_loader were both downloaded from numinix and they don't work out of the box with responsive_classic. With all their contributions to the Zen Cart project I'm sure they have their reasons.
    I have loaded various versions of css_js_loader from Zen Cart Plugins and other sources with the same results.
    And Yes, I have all the files/scripts installed in the correct folders.
    I'd like to see this through but I can't spend anymore time at the present. I may revisit it in the future.
    There are other options I can use like OPC or a template that contains the options that I need.

    Hi Design75
    THANK YOU for your advice,
    I guess I'm being dense but exactly which jquery library?

    "lines 137 and 138 look to load the jquery library"

    IMHO, numinix should take a look at this.

    Thanks

  9. #149
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,842
    Plugin Contributions
    11

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by linuxguy2 View Post
    Hi carlwhat,
    Good one! Completed linux certification many years ago... Just can't code much

    Back to the issue: Seems awkward that fec & css_js_loader were both downloaded from numinix and they don't work out of the box with responsive_classic. With all their contributions to the Zen Cart project I'm sure they have their reasons.
    I have loaded various versions of css_js_loader from Zen Cart Plugins and other sources with the same results.
    And Yes, I have all the files/scripts installed in the correct folders.
    I'd like to see this through but I can't spend anymore time at the present. I may revisit it in the future.
    There are other options I can use like OPC or a template that contains the options that I need.

    Hi Design75
    THANK YOU for your advice,
    I guess I'm being dense but exactly which jquery library?

    "lines 137 and 138 look to load the jquery library"

    IMHO, numinix should take a look at this.

    Thanks
    linuxguy, you should learn about javascript and jquery. this plugin requires merging of core ZC files which you have not done correctly. each library makes use the base jquery library which you have not loaded. asking numinix to look at what is a very basic problem (granted in a complex arena) would do little IMO to minimize problems.

    modern websites that do a lot of processing on the client side, and IMO, improve the user experience, require work and learning. some of your comments indicate to me that you need to put a little more work in.

    the base ZC install loads jquery in the:

    /includes/templates/responsive_classic/common/html_header.php

    script. you are missing that. you have removed those lines in doing the merge with this loader. i'm sure the documentation on this merge does not say to remove jquery.

    in your html_header.php file that you posted above, find the relevant code and try adding the lines dealing with CDN for jQuery core so that this section looks like below:

    Code:
    // EOF hreflang for multilingual sites
    ?>
    
    <?php
    /** CDN for jQuery core **/
    ?>
    
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="//code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"%3E%3C/script%3E'));</script>
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
    
    
    <!-- Begin css js loader code change -->
    
    <?php
    /**
    * load the loader files
    */
    $RC_loader_files = array();
    if($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())){
    $RI_CJLoader->autoloadLoaders();
    $RI_CJLoader->loadCssJsFiles();
    $RC_loader_files = $RI_CJLoader->header();
    
    if (!empty($RC_loader_files['meta']))
    foreach($RC_loader_files['meta'] as $file) {
    include($file['src']);
    echo "\n";
    }
    good luck.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #150
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    315
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by carlwhat View Post
    linuxguy, you should learn about javascript and jquery. this plugin requires merging of core ZC files which you have not done correctly. each library makes use the base jquery library which you have not loaded. asking numinix to look at what is a very basic problem (granted in a complex arena) would do little IMO to minimize problems.

    modern websites that do a lot of processing on the client side, and IMO, improve the user experience, require work and learning. some of your comments indicate to me that you need to put a little more work in.

    the base ZC install loads jquery in the:

    /includes/templates/responsive_classic/common/html_header.php

    script. you are missing that. you have removed those lines in doing the merge with this loader. i'm sure the documentation on this merge does not say to remove jquery.

    in your html_header.php file that you posted above, find the relevant code and try adding the lines dealing with CDN for jQuery core so that this section looks like below:

    Code:
    // EOF hreflang for multilingual sites
    ?>
    
    <?php
    /** CDN for jQuery core **/
    ?>
    
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="//code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"%3E%3C/script%3E'));</script>
    <script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
    
    
    <!-- Begin css js loader code change -->
    
    <?php
    /**
    * load the loader files
    */
    $RC_loader_files = array();
    if($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())){
    $RI_CJLoader->autoloadLoaders();
    $RI_CJLoader->loadCssJsFiles();
    $RC_loader_files = $RI_CJLoader->header();
    
    if (!empty($RC_loader_files['meta']))
    foreach($RC_loader_files['meta'] as $file) {
    include($file['src']);
    echo "\n";
    }
    good luck.
    After VERY closely reviewing the html_header.php file I found the code in the responsive_classic template to be replaced is slightly different from the documentation. The docs instruct one to replace block of code "A" with block of code "B". It's incorrect for the responsive_classic template (and possibly others) because it deletes the jquery script.

    Followed your instructions and added these lines of code back in.
    Code:
    <script type="text/javascript">window.jQuery || document.write .........
    <script type="text/javascript">window.jQuery || document.write .........
    Needs further testing but it seems to be working now.

    Yeah, it would be nice if I could take the time to master "javascript and jquery".

    Thank You VERY much for your assistance.

 

 
Page 15 of 17 FirstFirst ... 51314151617 LastLast

Similar Threads

  1. v150 CSS Buttons for Admin [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 24 Dec 2015, 09:13 PM
  2. v151 CSS/JS Loader installation question
    By McLovin in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 12 Feb 2014, 06:28 PM
  3. css/js loader !!
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Nov 2011, 01:19 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. [support thread] Javascript loader
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 7 Nov 2009, 12:11 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