Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Sep 2010
    Posts
    6
    Plugin Contributions
    0

    Default Using category image on the nav menu?

    Hi,

    Is there a way to use the category images on the menu? Either on the navmenu or the categories sidebar? I would love to be able to do this. I am using using: v1.3.9d of Zen cart.

    Many thanks in advance,

    Claire

  2. #2
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Using category image on the nav menu?

    Clare,

    You can do it relatively easily if you want to change your zencart database!

    I accept absolutely no responsibility for you totally trashing your website if you decide to follow these instructions!!!

    Open up your mySQL database software (usually phpMyAdmin).
    Edit the table named categories_description
    Change the categories_name field to be 128 or 256 characters long (instead of the default 32)

    Next...

    Edit one of your categories in ZenCart Admin
    In the 'category name' box, put a standard HTML img tag before the name of your category.
    eg. Category Name: <img src="/images/categories/danceShoes.jpg">Dance Shoes


    You can also stick a similar img tag into the 'page title' of your EZPages to get images to appear there. (I don't think you need to make the database change for this to work.)

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

    Default Re: Using category image on the nav menu?

    If you want to use the category image set in admin with the categories sidebox, you can add its display just by invoking $box_categories_array[$i]['image']. This contains the filepath of the current category's image, and you can insert it where you like in /includes/templates/your_template/sideboxes/tpl_categories.php.

    If you want to substitute an image of your choice for the category name, you can use Categories Dressing from Free Addons. It is also built to allow hover effects on the image.

  4. #4
    Join Date
    Sep 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Using category image on the nav menu?

    Aha! Thank you very much for replying.

    I found the $box_categories_array call in the categories php. I'm a little curious to see if I can find where that array is defined - perhaps I could add an Image2 into the database and use that as a hover over image.

    However - I shall take a look at the Categories Dressing from Free Addons, because that may save me a lot of bother.

    I'm always up for a bit of database trashing thou!

    Thanks again!

    Claire

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

    Default Re: Using category image on the nav menu?

    If you want the hover, Cat Dressing will save you a bunch of work. Just use the "background image" instructions in the readme.

  6. #6
    Join Date
    Sep 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Using category image on the nav menu?

    OK - I've installed that - it's a lot of fun - thanks for the recommendation!

    I'm still struggling to get the hover over working, so that I get independent ones for different categories. I'll keep at it thou :)

    Thanks!

    Claire

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

    Default Re: Using category image on the nav menu?

    Study the "To display images in place of selected category names:" section of the readme, especially the parts that refer to catBG or catbg.

  8. #8
    Join Date
    Sep 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Using category image on the nav menu?

    Thank you gjh42 - you're a big help!

    I'm wondering if you know what the

    categories li A.catBg1:hover

    css will actually affect - I would love it to change my categories headers on hovering :) I'm getting the feeling it may not.

    Claire

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

    Default Re: Using category image on the nav menu?

    If you have images named catbg#.gif and catbg#hover.gif (where # is the cPath of the category), the code will be ready to use the images replacing that category's name. If you also add to your stylesheet


    #categories li a.catBg# {background-image: url(../buttons/english/catbg#.gif);}
    #categories li a.catBg#:hover {background-image: url(../buttons/english/catbg#hover.gif);}

    you will get the hover effect.
    You need a set of these for each category where you want to have an image hover effect.
    Last edited by gjh42; 17 Sep 2010 at 11:38 PM.

  10. #10
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Using category image on the nav menu?

    Hey Glenn, I've been wondering about putting Category images in my CSS Flyout Menu..........exactly what would I have to do to call them into it, as using the above example didn't seem to work at all for this particular menu.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Adding my own menu items to the nav
    By Momof9Blessings in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Jul 2016, 05:01 PM
  2. using image for category menu
    By gogumagamza in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Sep 2009, 11:27 PM
  3. Separate Nav Category Menu into multiple lines?
    By zkitten in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Jun 2009, 12:02 PM
  4. Using a CSS Navigation Menu for the top NAV bar
    By spikeycactus in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Oct 2008, 10:59 AM
  5. Category image in let hand nav?
    By roger06 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Sep 2008, 07:38 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