Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2007
    Location
    NNJ
    Posts
    212
    Plugin Contributions
    0

    help question Need help in modifying categories sidebox

    I made a change to tpl_document_categories.php so that the links are list item inside a "<ul>" tag.

    No matter where I put this file, it doesn't seem to have an effect.
    My last trial, I renamed the one that was in the
    includes/templates/template_default/sideboxes
    to tpl_document_categories_save and then saved my new one there;
    but no luck.

    the whole thing looks like this; my mods in red:

    $content = "";

    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
    /* ============================================== */
    /* changed the categoriesContent into a UL construct */
    /* ============================================== */
    $content.='<ul id="' . str_replace('_', '-', $box_id . 'NavList') . '>';

    for ($i=0;$i<sizeof($box_categories_array);$i++) {
    /*
    if ($box_categories_array[$i]['has_sub_cat'] or $box_categories_array[$i]['parent'] == 'true') {
    $new_style = 'category-parent';
    } else {
    $new_style = 'category-child';
    }
    */
    switch(true) {
    case ($box_categories_array[$i]['top'] == 'true'):
    $new_style = 'category-top';
    break;
    case ($box_categories_array[$i]['has_sub_cat']):
    $new_style = 'category-subs';
    break;
    default:
    $new_style = 'category-products';
    }
    $content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
    if ($box_categories_array[$i]['current']) {
    if ($box_categories_array[$i]['has_sub_cat']) {
    $content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
    } else {
    $content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
    }
    } else {
    $content .= $box_categories_array[$i]['name'];
    }
    if ($box_categories_array[$i]['has_sub_cat']) {
    $content .= CATEGORIES_SEPARATOR;
    }
    $content .= '</a>';
    if (SHOW_COUNTS == 'true') {
    if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
    $content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
    }
    }
    $content .= '</li>';
    }
    $content .= '</ul></div>';
    ?>

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Need help in modifying categories sidebox

    Do you have a custom template set up? If you do than it should go in includes/templates/YOUR_CUSTOM_TEMPLATE/sideboxes while leaving the original alone in the default template. If you don't have a custom template...shame on you...than replacing the one in the default template should work.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Need help in modifying categories sidebox

    Code:
    $content.='<ul id="' . str_replace('_', '-', $box_id . 'NavList') . '">';
    is there a double quote missing somewhere?
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  4. #4
    Join Date
    Feb 2007
    Location
    NNJ
    Posts
    212
    Plugin Contributions
    0

    Default Re: Need help in modifying categories sidebox

    Good catch Mike! Thanks.

    You were right, I did miss that double quote. fixed that.

    To answer your questions, the answer is yes, I have a CUSTOM template. (I'd show it to you the review crew, but I'm still developing on localhost.)

    And yes... I did create a folder called sideboxes.

    ..\includes\templates\CUSTOM\sideboxes\tpl_document_categories.php

    But still nothing. The generated HTML is still the same.
    The information links in the other sidebox come out in an unordered list.
    The category links don't.

    Thanks again. If you think of anything else, please by all, means talk to me.

    Elliot

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Need help in modifying categories sidebox

    Mighty Mike to the rescue again ...

    Getting pretty good isn't he?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: Need help in modifying categories sidebox

    You should see what I can do when I put on the skin tight suit with the big ZC on the chest and the cape......actually the kids just laugh at me and say "dad stop being silly"
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Need help in modifying categories sidebox

    Good thing our colors are not pink, eh?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2007
    Location
    NNJ
    Posts
    212
    Plugin Contributions
    0

    Default Re: Need help in modifying categories sidebox

    Just to follow up....

    The tpl_document_categories.php file is not the one that renders the links categories side box.

    The wiki, coupled with trial-n-error is really the way to go, but now that its a list construct, I can stylizing it as a rollover list, and man does it look better!!.

    Here I come to save the daaaaaaaaaaay, ZC man in on the waaaaaay!!

 

 

Similar Threads

  1. v153 Need Help Modifying Scuro Template
    By DK_Scully in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 26 Mar 2015, 05:35 PM
  2. Need help modifying Product filter and Wishlist
    By Friedrich72 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 5 Apr 2010, 07:27 PM
  3. I need help modifying the info sidebox (links etc.)
    By MULISH in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Jun 2009, 12:42 AM
  4. Help modifying the info sidebox.. (links etc.)
    By MULISH in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 May 2009, 12:20 AM
  5. Zen Experts... need help with modifying Cross Sell page...
    By jettrue in forum General Questions
    Replies: 7
    Last Post: 31 Mar 2007, 02:27 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