Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

main categories drop down list Please help!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-17-2007, 07:47 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Unhappy main categories drop down list Please help!

PLEASE HELP! Is there a drop down list mod that I can use for my categories that I can create for my main page? My Category list is to long and I am not liking the look. Please help me please. I have been looking all over this forum and I have tried a drop down list that was shared but it will not display my categories. I think it is for an earlier version of x-cart and I have the 4.1.6. Take a look at my site to see what I am talking about. Again please be kind and help me. Thanks in advance.
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #2  
Old 02-17-2007, 10:22 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: main categories drop down list Please help!

backup skin1/customer/categories.tpl and replace the inside with

Code:
{capture name=menu} <form name="formCategories"> {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} <select name="listCategories" onchange="window.location=this.options[selectedIndex].value"> <option value=""><font class="VertMenuItems">Select a Category</font></option> {foreach from=$categories item=c} <option value="home.php?cat={$c.categoryid}"><font class="VertMenuItems">{$c.category}</font></option> {/foreach} </select> {else} {foreach from=$subcategories item=c key=catid} <font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if} {/if} </form> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #3  
Old 02-17-2007, 10:51 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: main categories drop down list Please help!

Bless your heart. You have made my weekend. Thank you so much for helping me out.
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #4  
Old 12-27-2010, 07:02 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: main categories drop down list Please help!

Inebriate, you showed me how to do this in 2007 with vs 4.1, do you know how to do this category drop down for vs 4.4? It seems the code is very different and the old drop down will not work. This was very helpful in the past. Thank you very much in advance. Shareen
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #5  
Old 05-30-2011, 04:40 PM
  moonslice's Avatar 
moonslice moonslice is offline
 

Senior Member
  
Join Date: May 2004
Posts: 128
 

Default Re: main categories drop down list Please help!

I'd also be interested in how to do drop-down menus in 4.4.x. (and not specifically for categories - products, but rather for the general things a website uses drop-down menus for.)

We had it working on LiteCommerce websites, but can't figure out where to put the couple of javascript codes that are necessary. We thought we had it correct, but it isn't working.
__________________
Jim - X-cart Gold 4.4.5
Reply With Quote
  #6  
Old 02-18-2013, 08:46 AM
 
dustinb14 dustinb14 is offline
 

Newbie
  
Join Date: Feb 2013
Posts: 3
 

Default Re: main categories drop down list Please help!

Looking for this as well .. running 4.5 gold
__________________
X-Cart 4.5.4 Mobile Gold
Ybizz skin
Reply With Quote
  #7  
Old 12-14-2014, 03:04 PM
 
Marc Gold Marc Gold is offline
 

Member
  
Join Date: Oct 2006
Posts: 11
 

Default Re: main categories drop down list Please help!

Hi

Did anyone get this sorted for 4.5 or even 4.6. Just started scoping an upgrade of our 4.1 (yeah i know ).

Any assistance greatly received.

Marc
__________________
www.i-point.co.uk
www.novelties4parties.co.uk - 4.1.8
www.edworthys.co.uk - 4.1.5
Inkntoner.co.uk - 4.1.8 / 4.7
ROK Universal 4.3
Displaysense - 4.2
Xcart Ver: 4.7.3
Reply With Quote
  #8  
Old 12-14-2014, 06:58 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: main categories drop down list Please help!

Okay here goes:
Make sure you are using a custom skin. Don't edit a default skin. Flyout Menus module must be active.

In your custom skin create the file:
modules/Flyout Menus/Icons/fancy_categories.tpl
With this content:
Code:
<div class="nav_menu"> {if $fancy_use_cache} {fancycat_get_cache} {else} {include file="modules/Flyout_Menus/Icons/fancy_subcategories.tpl" level=0} {/if} <div class="clearing"></div> </div>

In your custom skin create the file:
modules/Flyout Menus/Icons/fancy_subcategories.tpl
With this content:
Code:
<ul> {foreach from=$categories_menu_list item=c key=catid name=$loop_name} <li> <a href="home.php?cat={$catid}"> {$c.category|amp} </a> {if $c.childs and $c.subcategory_count gt 0} {include file="modules/Flyout_Menus/Icons/fancy_subcategories.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1} {/if} </li> {/foreach} </ul>
In your custom skin edit or create the file:
customer/head.tpl
Where you want the menu to show up add:
Code:
{include file="modules/Flyout_Menus/Icons/fancy_categories.tpl"}

Add the following CSS to your css/altskin.css:
Code:
#header .line1 .nav_menu { height: 40px; } .nav_menu ul { list-style: none; margin: 0; padding: 0; } .nav_menu ul > li { float: left; position: relative; text-align: center; } .nav_menu ul a:link, .nav_menu ul a:active, .nav_menu ul a:visited, .nav_menu ul a:hover { display: block; min-width: 120px; line-height: 40px; background: #ccc none; color: #000; } .nav_menu ul a:hover { background: #222 none; color: #fff; } .nav_menu ul > li > ul { display: none; position: absolute; top: 40px; } .nav_menu ul > li:hover > ul { display: block; z-index: 10; }

Position the container and style the menu as needed. This only provides for one level of drop down, the next level can easily be accommodated by adding to the CSS.
Tada!
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
qualiteam (12-18-2014)
  #9  
Old 12-16-2014, 06:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: main categories drop down list Please help!

Mike, you now suggest new files/modules instead of editing core ones for X-Cart 4 changes as well
Nicely done!
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
totaltec (12-16-2014)
  #10  
Old 12-16-2014, 06:40 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: main categories drop down list Please help!

You have to remember though when using custom skin and upgrading the cart - all changes to common_files files have to be applied to the custom skin as well. I have seen this when user runs the upgrade and all files are patched by the upgrade script - then they wonder why this or that functionality is not showing....
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:28 PM.

   

 
X-Cart forums © 2001-2020