Jump to content

drop down Menu bar in store front


Recommended Posts

drop down Menu bar in store front CC6

1. Black menu bar when you place your curser over a category it brings down the listings  of the subcategories for that category.

or

2. When you click the category in brings down the images for each subcategory and then you can select what subcategory you want from the image.

Is there a way to change this when you place your curser over a category it will bring the images for each subcategory and do away with the first No.1 selection?

Link to comment
Share on other sites

I have everything working up to the point where, if a category does not have an image associated with it, the default "noimage.png" is shown extremely large. CubeCart, as of CC6011, does not resize "noimage.png" to the requested and appropriate size.

If you remain aware of this situation, here is an edit to get an image to show next to the sub-category name in the drop-down of the menu bar:

In /classes/gui.class.php, near line 1441, find:

private function _makeTree($tree_data) {

About seven lines later, find:

$branch['url'] = $GLOBALS['seo']->buildURL('cat', $branch['cat_id'], '&');

On a new blank line after that, add:

$cat_data = $GLOBALS['catalogue']->getCategoryData($branch['cat_id']);
$branch['img'] = (!empty($cat_data['cat_parent_id'])) ? $GLOBALS['catalogue']->imagePath($cat_data['cat_image'], 'gallery', 'url'): '';


Then, in the skin template element.navigation_tree.php, find:

<a href="{$BRANCH.url}" title="{$BRANCH.name}">{$BRANCH.name}</a>

Change to:

<a href="{$BRANCH.url}" title="{$BRANCH.name}">{if $BRANCH.img}<img src="{$BRANCH.img}" />&nbsp;{/if}{$BRANCH.name}</a>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...