Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Custom categories sidebox

    Hi all

    I am using 1.3.9h version of zen cart. If you look at our home page http://ergonomiceducationfurniture.co.uk/, we are trying to set the category/image list (currently placed at the bottom of the page) on the right hand side column on the home page only.

    Now if this already was a sidebox, I know how I would fix it. However, it isn't a sidebox. Please could anyone advise me how I can create the category image/list as a sidebox so I can add it to the right hand side.

    I have a basic knowledge of PHP and MySQL so I am open to instruction.

    Many thanks in advance.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Custom categories sidebox

    The stock categories sidebox fetches the category image, though it doesn't use it. You could modify /includes/templates/your_template/sideboxes/tpl_categories.php to add $box_categories_array[$i]['image'] to the output in the position you want. (I believe that is the right field - away from home now.)

    If you want the images only on the homepage, you could wrap this addition in a test like

    if ($this_is_home_page) {
    //add image code
    }
    Last edited by gjh42; 11 Nov 2011 at 04:23 PM.

  3. #3
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Custom categories sidebox

    Thanks gjh42 but what I was thinking of was moving the index_categories.php so it sits on the right hand side rather than at the bottom of the page which it currently does.

    Take a look at http://ergonomiceducationfurniture.co.uk/ and you'll see what I mean.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Custom categories sidebox

    I think it would be easier to add another categories sidebox and modify it than to move the main page content partially to the sidebar. If you never had any content in the sidebar, you could turn it off on the homepage and put the main content in two divs floated left and right. The shopping cart sidebox would interfere with that.
    If you moved the cart and notifications sideboxes to the left sidebar, you could have more space for internal page main content and use the "right column" for the cat/image list on homepage.

    You could install another categories sidebox like the CSS Flyout one for the left (restyle it as desired) and move the stock one to the right column with a test for $this_is_home_page and the $box_categories_array[$i]['image'] added.

  5. #5
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Custom categories sidebox

    Ok maybe my programming doesn't extend beyond monkey see, monkey do.

    I have created a duplicate categories file called categorieshom.php. How do I add it to the layout boxes controller page? and where do I add the if ($this_is_home_page) {
    //add image code
    }

    Please advise.
    Debbie Harrison
    DVH Design | Web Design blog

  6. #6
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Custom categories sidebox

    Alternatively, can your categories dressing addon be used for the same purpose? I would like to keep my category list throughout but just need the image and categories on this right hand side.

    Please advise.
    Debbie Harrison
    DVH Design | Web Design blog

  7. #7
    Join Date
    Dec 2011
    Posts
    36
    Plugin Contributions
    0

    Default Re: Custom categories sidebox

    can anyone tell me how can i create new post ,i am new to this forum
    and i have an error that i need to fix asap
    Thank you


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

    Default Re: Custom categories sidebox

    Go to the subforum where you want to make the new thread and look for the New Thread button.

  9. #9
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Custom categories sidebox

    Anyway after that little intermission, please advise how I can duplicate a categories list and set it up using (I assume?) is Layout Boxes Controller.

    I tried to use your category dressing add-ons but in essence, thats really to style the actual categories list isn't it?

    Please help.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Custom categories sidebox

    Yes, it does use the stock categories sidebox as its base. It is possible to use the ch_categories option to have two different sideboxes (I helped someone through that a year or two ago for a rather complex set of requirements), but your purpose might best be served with a simpler setup. Install the CSS Flyout Menu from Free Addons for your regular categories sidebox, and add $box_categories_array['image'] to the stock tpl_categories.php in three places.
    /includes/templates/your_template/sideboxes/tpl_categories.php:
    PHP Code:
          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'];
          } 
    PHP Code:
          if ($box_categories_array[$i]['current']) {
            if (
    $box_categories_array[$i]['has_sub_cat']) {
              
    $content .= '<span class="category-subs-parent">' $box_categories_array['image'] . $box_categories_array[$i]['name'] . '</span>';
            } else {
              
    $content .= '<span class="category-subs-selected">' $box_categories_array['image'] . $box_categories_array[$i]['name'] . '</span>';
            }
          } else {
            
    $content .= $box_categories_array['image'] . $box_categories_array[$i]['name'];
          } 
    Gotta run now - we're taking my girlfriend's grandkids to Disney on Ice.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Hide categories and tree categories sidebox
    By adowty in forum Addon Sideboxes
    Replies: 1
    Last Post: 16 Aug 2011, 03:09 PM
  2. Enable Links for Parent Categories in Categories Sidebox
    By MrsQ in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Sep 2009, 08:25 PM
  3. How to display sub-categories in categories sidebox?
    By icaros in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Oct 2007, 12:22 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