Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Javascript loading twice for google trust store

    Wait. This has nothing to do with Trusted Stores.

    Your site is loading ALL your CSS and JS stuff twice.

    And I think that's because you're using the CSS/JS-Loader plugin (which I've always hated because, well, it's a mess).
    You'll need to sort out why the plugin is firing *and* the default loading of css and js is also firing.

    Getting rid of all that duplication will make your site faster :)
    .

    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.

  2. #2
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Javascript loading twice for google trust store

    Quote Originally Posted by DrByte View Post
    Wait. This has nothing to do with Trusted Stores.

    Your site is loading ALL your CSS and JS stuff twice.

    And I think that's because you're using the CSS/JS-Loader plugin (which I've always hated because, well, it's a mess).
    You'll need to sort out why the plugin is firing *and* the default loading of css and js is also firing.

    Getting rid of all that duplication will make your site faster :)
    oh boy. So any suggestions on where to start?
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Javascript loading twice for google trust store

    Probably your html_header.php and/or tpl_main_page.php .... but it's been so long since I used that CSS/JS-Loader plugin that I don't remember all the ways it mangles things.
    .

    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.

  4. #4
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Javascript loading twice for google trust store

    Quote Originally Posted by DrByte View Post
    Probably your html_header.php and/or tpl_main_page.php .... but it's been so long since I used that CSS/JS-Loader plugin that I don't remember all the ways it mangles things.
    my current html.header.php file looks like this

    <?php
    /**
    * Common Template
    *
    * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte Jul 5 2014 Modified in v1.5.4 $
    * Altered by rbarbour (ZCAdditions.com), Responsive DIY Template Default for 1.5.x (65)
    * Modified by Anne (Picaflor-Azul.com) Westminster New v1.3
    */
    /**
    * 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
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

    if (!class_exists('Mobile_Detect')) {
    include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
    $detect = new Mobile_Detect;
    }

    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
    <head>
    <title><?php echo META_TAG_TITLE; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen Cart&reg; Team. Responsive zen cart design by Picaflor Azul. " />
    <meta name="generator" content="shopping cart program by Zen Cart&reg;, http://www.zen-cart.com eCommerce" />

    <?php // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />

    <?php // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <?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 } ?>
    <?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 } ?>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <?php
    /**
    * load the loader files
    */

    if($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())){
    $RI_CJLoader->autoloadLoaders();
    $RI_CJLoader->loadCssJsFiles();
    $files = $RI_CJLoader->header();

    foreach($files['css'] as $file)
    if($file['include']) {
    include($file['src']);
    } else if (!$RI_CJLoader->get('minify_css') || $file['external']) {
    echo '<link rel="stylesheet" type="text/css" href="'.$file['src'].'" />'."\n";
    } else {
    echo '<link rel="stylesheet" type="text/css" href="min/?f='.$file['src'].'&amp;'.$RI_CJLoader->get('minify_time').'" />'."\n";
    }

    foreach($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'].'&amp;'.$RI_CJLoader->get('minify_time').'"></script>'."\n";
    }
    }

    /**
    * load all template-specific stylesheets, named like "style*.css", alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
    while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
    }
    /**
    * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
    */
    $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
    $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
    $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
    if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id;
    $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet',
    '/' . $tmp_pagename,
    '/' . $_SESSION['language'] . '_' . $tmp_pagename,
    '/c_' . $cPath,
    '/' . $_SESSION['language'] . '_c_' . $cPath,
    '/m_' . $manufacturers_id,
    '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id,
    '/p_' . $tmp_products_id,
    '/' . $_SESSION['language'] . '_p_' . $tmp_products_id
    );
    while(list ($key, $value) = each($sheets_array)) {
    //echo "<!--looking for: $value-->\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
    }

    /**
    * custom category handling for a parent and all its children ... works for any c_XX_XX_children.css where XX_XX is any parent category
    */
    $tmp_cats = explode('_', $cPath);
    $value = '';
    foreach($tmp_cats as $val) {
    $value .= $val;
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/c_' . $value . '_children.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . $_SESSION['language'] . '_c_' . $value . '_children.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
    $value .= '_';
    }

    /**
    * load printer-friendly stylesheets -- named like "print*.css", alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');
    sort($directory_array);
    while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
    }

    /**
    * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
    while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
    }

    /** CDN for jQuery core **/
    ?>

    <?php
    /**
    * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
    */
    $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
    while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
    }

    /**
    * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
    while(list ($key, $value) = each($directory_array)) {
    /**
    * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
    * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
    */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
    }
    /**
    * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
    */
    $directory_array = $template->get_template_part($page_directory, '/^jscript_/');
    while(list ($key, $value) = each($directory_array)) {
    /**
    * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
    * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
    */
    require($page_directory . '/' . $value); echo "\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') . ' -->';


    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

    if (COLUMN_WIDTH == '0' || (in_array($current_page_base,explode(",",'popup_image,popup_image_additional')) )) {

    echo '';

    } else {
    $responsive_mobile = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_mobile.css' . '" />';
    require($template->get_template_dir('responsive_mobile.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/responsive_mobile.php');

    $responsive_tablet = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_tablet.css' . '" />';
    require($template->get_template_dir('responsive_tablet.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/responsive_tablet.php');

    $responsive_default = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . 'responsive_default.css' . '" />';

    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() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {

    echo $responsive_mobile;


    } else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){

    echo $responsive_tablet;


    } else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){

    echo '';

    } else {

    echo $responsive_default;

    }
    }

    if($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isNonResponsive' or $detect->isTablet() && $_SESSION['display_mode']=='isNonResponsive' or $_SESSION['display_mode']=='isNonResponsive'){
    $fluidisFixed = 'fluidIsFixed';
    } else {
    $fluidisFixed = '';
    }
    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
    ?>

    <script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/css_browser_selector.js' ?>" type="text/javascript"></script>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />


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



    I noticed that there are 2 lines that are the same

    * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
    */
    $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
    while(list ($key, $value) = each($directory_array)) {
    /**

    But im not sure if im on the right track and how to fix that.
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

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

    Default Re: Javascript loading twice for google trust store

    You didn't merge the file correct. try the code below
    PHP Code:
    <?php
    /**
     * Common Template
     *
     * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte Jul 5 2014 Modified in v1.5.4 $
     * Altered by rbarbour (ZCAdditions.com), Responsive DIY Template Default for 1.5.x (65)
     * Modified by Anne (Picaflor-Azul.com) Westminster New v1.3
     */
    /**
     * 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
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

    if (!class_exists('Mobile_Detect')) {
      include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php');
      
    $detect = new Mobile_Detect;
    }

    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS?>>
    <head>
    <title><?php echo META_TAG_TITLE?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen Cart&reg; Team. Responsive zen cart design by Picaflor Azul. " />
    <meta name="generator" content="shopping cart program by Zen Cart&reg;, http://www.zen-cart.com eCommerce" />

    <?php // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />

    <?php // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <?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 ?>
    <?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 ?>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <?php
        
    /**
         * load the loader files
         */
        
    if ($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())) {
          
    $RI_CJLoader->autoloadLoaders();
          
    $RI_CJLoader->loadCssJsFiles();
          
    $files $RI_CJLoader->header();

          foreach (
    $files['css'] as $file) {
            if (
    $file['include']) {
              include(
    $file['src']);
            } else if (!
    $RI_CJLoader->get('minify_css') || $file['external']) {
              echo 
    '<link rel="stylesheet" type="text/css" href="' $file['src'] . '" />' "\n";
            } else {
              echo 
    '<link rel="stylesheet" type="text/css" href="min/?f=' $file['src'] . '&amp;' $RI_CJLoader->get('minify_time') . '" />' "\n";
            }
          }

          foreach (
    $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'] . '&amp;' $RI_CJLoader->get('minify_time') . '"></script>' "\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') . ' -->';
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

        
    if (COLUMN_WIDTH == '0' || (in_array($current_page_baseexplode(","'popup_image,popup_image_additional')) )) {

          echo 
    '';
        } else {
          
    $responsive_mobile '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_mobile.css' '" />';
          require(
    $template->get_template_dir('responsive_mobile.php'DIR_WS_TEMPLATE$current_page_base'common') . '/responsive_mobile.php');
          
    $responsive_tablet '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_tablet.css' '" />';
          require(
    $template->get_template_dir('responsive_tablet.php'DIR_WS_TEMPLATE$current_page_base'common') . '/responsive_tablet.php');
          
    $responsive_default '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_default.css' '" />';
          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() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $_SESSION['display_mode'] == 'isMobile') {
            echo 
    $responsive_mobile;
          } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode'] == 'isTablet' or $detect->isTablet() && $_SESSION['display_mode'] == 'isTablet' or $_SESSION['display_mode'] == 'isTablet') {
            echo 
    $responsive_tablet;
          } else if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $_SESSION['display_mode'] == 'isNonResponsive') {
            echo 
    '';
          } else {
            echo 
    $responsive_default;
          }
        }

        if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $_SESSION['display_mode'] == 'isNonResponsive') {
          
    $fluidisFixed 'fluidIsFixed';
        } else {
          
    $fluidisFixed '';
        }
    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
        
    ?>

    <script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/css_browser_selector.js' ?>" type="text/javascript"></script>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />


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

  6. #6
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Javascript loading twice for google trust store

    Quote Originally Posted by Design75 View Post
    You didn't merge the file correct. try the code below
    PHP Code:
    <?php
    /**
     * Common Template
     *
     * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte Jul 5 2014 Modified in v1.5.4 $
     * Altered by rbarbour (ZCAdditions.com), Responsive DIY Template Default for 1.5.x (65)
     * Modified by Anne (Picaflor-Azul.com) Westminster New v1.3
     */
    /**
     * 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
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

    if (!class_exists('Mobile_Detect')) {
      include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php');
      
    $detect = new Mobile_Detect;
    }

    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS?>>
    <head>
    <title><?php echo META_TAG_TITLE?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen CartŪ Team. Responsive zen cart design by Picaflor Azul. " />
    <meta name="generator" content="shopping cart program by Zen CartŪ, http://www.zen-cart.com eCommerce" />

    <?php // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />

    <?php // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65) ?>

    <?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 ?>
    <?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 ?>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <?php
        
    /**
         * load the loader files
         */
        
    if ($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())) {
          
    $RI_CJLoader->autoloadLoaders();
          
    $RI_CJLoader->loadCssJsFiles();
          
    $files $RI_CJLoader->header();

          foreach (
    $files['css'] as $file) {
            if (
    $file['include']) {
              include(
    $file['src']);
            } else if (!
    $RI_CJLoader->get('minify_css') || $file['external']) {
              echo 
    '<link rel="stylesheet" type="text/css" href="' $file['src'] . '" />' "\n";
            } else {
              echo 
    '<link rel="stylesheet" type="text/css" href="min/?f=' $file['src'] . '&' $RI_CJLoader->get('minify_time') . '" />' "\n";
            }
          }

          foreach (
    $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 '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)

        
    if (COLUMN_WIDTH == '0' || (in_array($current_page_baseexplode(","'popup_image,popup_image_additional')) )) {

          echo 
    '';
        } else {
          
    $responsive_mobile '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_mobile.css' '" />';
          require(
    $template->get_template_dir('responsive_mobile.php'DIR_WS_TEMPLATE$current_page_base'common') . '/responsive_mobile.php');
          
    $responsive_tablet '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_tablet.css' '" />';
          require(
    $template->get_template_dir('responsive_tablet.php'DIR_WS_TEMPLATE$current_page_base'common') . '/responsive_tablet.php');
          
    $responsive_default '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . '/' 'responsive_default.css' '" />';
          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() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $_SESSION['display_mode'] == 'isMobile') {
            echo 
    $responsive_mobile;
          } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode'] == 'isTablet' or $detect->isTablet() && $_SESSION['display_mode'] == 'isTablet' or $_SESSION['display_mode'] == 'isTablet') {
            echo 
    $responsive_tablet;
          } else if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $_SESSION['display_mode'] == 'isNonResponsive') {
            echo 
    '';
          } else {
            echo 
    $responsive_default;
          }
        }

        if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $_SESSION['display_mode'] == 'isNonResponsive') {
          
    $fluidisFixed 'fluidIsFixed';
        } else {
          
    $fluidisFixed '';
        }
    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
        
    ?>

    <script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/css_browser_selector.js' ?>" type="text/javascript"></script>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />


    </head>
    <?php // NOTE: Blank line following is intended: ?>
    THANKS !! that fixed the problem
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

  7. #7
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Javascript loading twice for google trust store

    Ok i just found another problem

    Our checkout doesn't seem to be working in Firefox any suggestions on that?
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

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

    Default Re: Javascript loading twice for google trust store

    Quote Originally Posted by Dashizna View Post
    Ok i just found another problem

    Our checkout doesn't seem to be working in Firefox any suggestions on that?
    I went all the way to the confirmation page, and all seems to work. Except for some lay-out problems

  9. #9
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Javascript loading twice for google trust store

    Quote Originally Posted by Design75 View Post
    I went all the way to the confirmation page, and all seems to work. Except for some lay-out problems
    yes but there is no way to select a payment option so you can't confirm the order. its cutting off a bunch of things

    I have a test item on the site and you can choose a pay by phone option to test at this time. The test item is part number Test item 1000
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

 

 

Similar Threads

  1. v154 Step 3 Confirmation page loading the checkout_confirmation section twice
    By src1988 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 18 Mar 2016, 03:45 PM
  2. v154 sub catagory names display twice in the center page
    By TheGunStoreGuy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 May 2015, 09:44 PM
  3. v150 how to add javascripts?
    By Sarthak in forum General Questions
    Replies: 5
    Last Post: 11 Jul 2012, 01:15 PM
  4. CSS files are loading twice,normal and minimized,how to solve?
    By Rimo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Mar 2011, 11:55 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