Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Estimate Shipping CSS not linked

    Hi!

    im testing fresh installed test site of v1.5.1 so that I can upgrade actual running site.

    My problem is all pages of custom template are loading properly CSS, only Estimate Shipping is not loading, so when I have a look at source of the page I noticed it is still calling CSS files from default template and not from custom template files.

    here is the link it is showing for both java and css in header, im adding for example which you can see still template_default
    HTML Code:
    <link rel="stylesheet" href="includes/templates/template_default/popup_shipping_estimator/template.css" type="text/css" />
    <script src="includes/templates/template_default/popup_shipping_estimator/bootstrap.js" type="text/javascript"></script>
    other pages with working css
    HTML Code:
    <link rel="stylesheet" href="includes/templates/custom_temp/css/template.css" type="text/css" />
    <script src="includes/templates/custom_temp/jscript/bootstrap.js" type="text/javascript"></script>
    if I tried to put a override in includes/templates/custom_temp/popup_shipping_estimator/tpl_main_page.php it is coming like this with two "//"
    HTML Code:
    <link rel="stylesheet" href="includes/templates/custom_temp/popup_shipping_estimator//template.css" type="text/css" />
    <script src="includes/templates/custom_temp/popup_shipping_estimator//bootstrap.js" type="text/javascript"></script>
    maybe im wrong in override placement, but even without overrides it should still give proper path to the files. the solution maybe simple but im not able to figure out.

    please guide me which part of template may be causing this, so that I can rectify it or if any one wanted to paste code here of that particular template code, i'll do so.

    thanking you in advance.

    ~Time
    v1.5.1

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Estimate Shipping CSS not linked

    Sounds like there's a lot more going on in your custom template than what you've shared here.

    I suspect you've got a custom html_header.php file in that same folder which is causing your problem.

    The core original Zen Cart code would never generate a link like you posted (ie: template.css) since Zen Cart never calls its file:
    Code:
    <link rel="stylesheet" href="includes/templates/template_default/popup_shipping_estimator/template.css" type="text/css" />
    So, your problem lies in whatever you've coded to specifically call template.css instead of using the normal stylesheeting support in ZC.
    .

    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
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Re: Estimate Shipping CSS not linked

    thank you for the reply.

    the html_header.php location is /www/zen_151testing/includes/templates/custom_temp/common/html_header.php

    and yes after i looked it, it is custom indeed but it have all template specific css and java scripts links rest is as-is like default file except following 2 codes are missing, rest nothing unusual atleast for me. and there are no secondary html_header.php within the custom template folders.

    even if I added below given 2 missing codes, still same issue.

    Code:
    /**
     *  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 .= '_';
     }
    in the end </head> was missing
    Code:
    </head>
    <?php // NOTE: Blank line following is intended: ?>
    link of stated template.css is like this follows, if you are interested in that
    Code:
    <link rel="stylesheet" href="<?php  echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'css').'/template.css'?>" type="text/css" />
    in html_header.php

    when i commented out the template.css in html_header.php, it is effecting main page menu outlook so I restored it for now, I havent checked what all other it is effecting.

    any other code or file location you need, then i'll provide that. i dont know what you are exactly looking for so given what I could make out of your answer.

    with regards,

    ~Time

  4. #4
    Join Date
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Re: Estimate Shipping CSS not linked

    Still nothing?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Estimate Shipping CSS not linked

    I'm not sure what exactly you're asking for.

    The original html_output.php code works correctly:
    On a fresh clean brand new install of v1.5.1, with "classic" template selected (as it is out-of-the-box), if I add a new stylesheet file at /includes/templates/classic/css/popup_shipping_estimator.css then the HTML will correctly show that stylesheet ... I've copied this directly from mine:
    Code:
    <link rel="stylesheet" type="text/css" href="includes/templates/classic/css/popup_shipping_estimator.css" />
    And I can immediately see the effect of it by loading that shipping estimator popup page.

    The contents I put into mine were simply the following, which makes the text red and the background black:
    Code:
    body {
        color: red;
        background-color: black !important;
        }
    If yours isn't doing that, then your template's customizations need to be undone to match the original code. Or some hybrid of the original logic plus whatever extras you think you need to add.

    Not sure why you feel the need to add a "template.css" when you could simply rename your "template.css" to "style_template.css" and it would automatically load. Or better yet, just paste your template.css contents into the bottom of the stylesheet.css file.
    .

    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. v150 CSS Linked correctly but not loading
    By BoostPromo in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 22 Jan 2015, 05:30 PM
  2. Admin site appears to be not linked to CSS file
    By aussiewebgirl in forum Installing on a Windows Server
    Replies: 1
    Last Post: 11 Jan 2011, 01:52 AM
  3. shipping estimate not pop up
    By bear1728 in forum General Questions
    Replies: 1
    Last Post: 24 Aug 2009, 02:31 PM
  4. Estimate Shipping not working
    By dinkar in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 2 Jul 2006, 05:38 AM

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