Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2010
    Posts
    9
    Plugin Contributions
    0

    Default Losing the footer when accessing categories with sub-categories

    I was working on my site: http://airscopes.com

    Everything was going fine. I made a bunch of modifications and things were going well as I added product. But when I started sorting products into sub-categories, I lost the footer on category level pages. You can see this if you visit the site.

    I assume this has to do with the fact that there are product listings in my page templates for the category. As categories with subcategories can't have products, there is nothing to list and the query for product fails...somehow exiting compilation of the page.

    I can think of several acceptable solutions:

    1) catch the error in the query when it looks for products (but that requires knowing where the query is, and I dont)
    2) do not open a page when a folder with subcategories is clicked -- but I have no idea how to do that.
    3) change the query to include subcategories *see 1*
    4) make a built in selection of the preference I am not aware of that will fix this issue.

    I'd be glad for any help... took me like 4 hours to figure out where the issue was because I thought I'd muffed the code somewhere.

    version 1.3
    no upgrades, new install
    I don't do add ons, but I have been modifying the tpl files -- using the template system
    i have looked at the FAQ and searched here, but I didn't find anything.
    the problem of course started when I added the sub-categories
    This is my first store with Zen Cart, but the landscape is pretty familiar as I used to do development in tikiwiki.


    Thanks for any help!

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

    Default Re: Losing the footer when accessing categories with sub-categories

    I lost the footer on category level pages.
    You or someone has hacked the template structure so bad on this that it is difficult to follow
    The mainWrapper that normally holds & constrains the page elements is only about 35px high and at the top only

    I am sure that you have invested a good amount of time in this but suggest that you attempt to restructure it to be more compliant to standard templating structure.
    Your schema can be developed fully within a more normal layout without the need for the many added div's some named and some not.

    Sorry not to have good news or a solution
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Losing the footer when accessing categories with sub-categories

    You have gone to a huge amount of work to get a layout that you could have done by only styling the stock template files, and a bit of work in tpl_header.php. Meanwhile, if you have changed the coding that calls in the appropriate listing files, you have broken the stock functionality which takes care of product/category listing situations.

    Until you understand the stock functionality thoroughly, you should try minimal tweaks to stock files rather than wholesale substitutions. Studying current best practice in CSS styling would benefit you, and enable you to avoid antiquated table-style (even without tables) page structures.

  4. #4
    Join Date
    Dec 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: Losing the footer when accessing categories with sub-categories

    Perhaps the one thing I left out of the original post was that I had a pre-existing site that I was trying to quickly insinuate into the existing structure. Believe it or not, that really didn't take much time. Short of figuring out the entire layout over again (which would be a time-consuming pain) I stuck it in, and as you can see it generally works fine. All I did was modify tpl files, and as I was careful within the style structure, it can all be restored with ease. Perhaps, in hind-sight, some of that was best done with includes.

    One of the reasons for choosing Zen Cart was that it was supposed to be easy... Regretfully, it is not the case for someone who does not already know it intimately if they already have a site they want to imitate. The structures are not entirely modular, and the placement of files is a bit convoluted. For example, why there are several places to store tpl files seems over-complicated. DIVs are a pretty common thing in design... not sure what the issue is there.

    The answer I was looking for, I believe, is where is "the stock functionality which takes care of product/category listing situations." I am not looking for people to approve of my implementation -- which I happen to like -- I am looking for the place to target the solution. What I have is a decent-looking site that works -- as far as I know -- but for a glitch I have identified. It is probably worth fixing the issue rather than starting over from a time perspective. who knows... might locate something that has been overlooked. It is possible that I may have to start over, but for me this was pretty easy -- breaking up and inserting existing design rather than totally re-creating it in another structure which I would first have to spend a lot more time studying. It is a nicely integrated whole if you don't want a different look and feel... design wize, I'd have swapped the top-down structuring for a bottom up -- that being you could have functions to insert into pages rather than something more restrictive to design.

    I can make a template for the original site available if that would be helpful.

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Losing the footer when accessing categories with sub-categories

    The page is dying just as Zencart starts to build the subcategory list. If you're using version 1.3.9, check your /cache folder for error logs. If 1.3.8, install this: http://www.zen-cart.com/index.php?ma...roducts_id=860 then check for error logs.

  6. #6
    Join Date
    Dec 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: Losing the footer when accessing categories with sub-categories

    yes, exactly. I am on 1.3.9 and show no error logs in the cache. Specifically it is failing here in the tpl_index_categories.php

    <?php
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
    // do nothing
    } else {
    // display subcategories
    /**
    * require the code to display the sub-categories-grid, if any exist
    */
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
    }
    ?>

    this seems inconsistent with much of the php in the templates.

    I'm not sure why that isn't:

    <?php
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS >= 1) {
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
    }
    ?>

    but neither seems to be working. suggests I have to look into the
    tpl_modules_category_row.php

    in any case, stevesh, yours was a helpful reply.

  7. #7
    Join Date
    Dec 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: Losing the footer when accessing categories with sub-categories

    FIXED.

    for some reason the tpl_columnar_display.php file was truncated. Restored that file and it is working fine.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Losing the footer when accessing categories with sub-categories

    If you already had those chunks of template code built, I can understand wanting to just bring them in.

    But the best way to start styling a new site, ZC or any other dynamic platform, is to use Firefox and its Web Developer and Firebug extensions. They can tell you exactly what classes, ids, ancestors etc. apply to any page element, and its outlines, and let you try styling on the fly to see what works.

    Then if you identify a place where there is no element to apply styling to, or need to rearrange elements in the output flow, you can modify PHP files.

 

 

Similar Threads

  1. Show only sub-categories when viewing top-categories
    By bthreen in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Feb 2010, 08:28 AM
  2. Sub Categories Logo's When Categories Clicked???
    By hcd888 in forum General Questions
    Replies: 8
    Last Post: 2 Dec 2009, 10:24 AM
  3. Show sub-sub categories underneath sub-categories on the category page?
    By tomrice in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jun 2009, 03:05 AM
  4. Sub categories displayed when hover over categories?
    By roger06 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Mar 2008, 02:28 PM

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