X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Need Help ! Subcategory dropdown (https://forum.x-cart.com/showthread.php?t=39845)

Rajdeep 05-17-2008 03:57 AM

Need Help ! Subcategory dropdown
 
Hi All !!

We are using Fancy Categories !!
There are multiple subcategories defined of a category. When I select a category half of the page is covered with subcategory listing, below which are display of products of that category.

Is it possible to show the subcategories in a dropdown list (with links to them, so that on select you go to that subcategory) for each Category you select?

Either a suitable mod or better ideas would be highly appreciated.....

Anyone ?????

I am looking for some mod which to me is interesting but couldn't crack it myself...



Thanks in advance.

carpeperdiem 05-17-2008 04:32 AM

Re: Need Help ! Subcategory dropdown
 
Depending on the number of cats and subcats, you may want to check out PhilJ's category mods:

http://www.xcartmods.co.uk/category/x-cart-navigation/

One of these may be what you are looking for?

tamicampos 05-18-2008 04:24 PM

Re: Need Help ! Subcategory dropdown
 
Does anyone have one that is made for a horizontal nav bar? My categories are listed horizontally in the head.tpl and I really want to cut out a page by having the subcategories display (like a flyout menu) when the curser rolls over the category. Then I would like you to be able to click on the subcategory and go straight to that page which has the products for that subcategory thereby cutting out the page that lists all of the subcategories which I think is a waste. I have looked at length in the Forum and at Phil's Mods but I can't find one that does exactly what I want and unfortunately I am not yet adept at modifying the codes for vertical menus to work with my horizontal menu.

Any help is appreciated.

carpeperdiem 05-18-2008 04:33 PM

Re: Need Help ! Subcategory dropdown
 
http://www.xcartmods.co.uk/demos/418/home.php?hm=y

hover over DVD and watch the subcats flyout
or books> etc...

and yes, with Phil's mod you can change all the visual elements with CSS

PS this is Phil's horizontal flyout mod

tamicampos 05-18-2008 04:48 PM

Re: Need Help ! Subcategory dropdown
 
Thanks so much. I know I checked Phil's Mods but I must have missed it. Thanks for your guidance!

Rajdeep 05-19-2008 01:48 AM

Re: Need Help ! Subcategory dropdown
 
Hi Carpeperdiem & Tamicampos,

Thanks for your responses. We have a huge category & subcategories & sub sub categories hence the links (xcartmods.co.uk) provided by you does not address my requirements.
As mentioned in my original post, when a customer clicks a category; half of the displayed page is covered with list of sub & sub-sub categories....
A customer has to really scroll down to view matching products. I hope I am able to explain the situation....



Can you please suggest some other ways/ mods ???

I'll really appreciate your support.

Thanks once again

boomobile 06-04-2008 01:22 PM

Re: Need Help ! Subcategory dropdown
 
I have a similar issue, only I have a dropdown menu that has been created, but I don't know where to place anything within x-cart to make it function...If anyone can help with this, it'd be great:

I have the actual menu to be placed on customer/home.tpl (css-menu.tpl)
I have the CSS file to be added to skin1.css (css-menu.css)
I have a "styles" folder that contains (csshover.htc) I don't know exactly what this does or where it should go.

(Edit) - This is actually a "roll over" or "flyout" menu, not a dropdown.

ubergeek 06-18-2008 11:56 AM

Re: Need Help ! Subcategory dropdown
 
Maybe try something like this?

In subcategories.tpl find the block of code starts at or near 16 and end at 33

Code:

{if $subcategories}
<table cellspacing="5" width="100%">
{foreach from=$subcategories item=subcat}
<tr>
{if $tmp and $first_subcat ne "Y"}
        <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" /></td>
{assign var="first_subcat" value="Y"}
{/if}
        <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td>
        <td class="SubcatInfo">{if $config.Appearance.count_products eq "Y"}
{if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products}
{elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower}
{/if}
        {/if}</td>
</tr>
{/foreach}
</table>
{/if}


Replace this if statement with the following:

Code:

{if $subcategories}
<FORM>
<SELECT ONCHANGE="location = this.options[this.selectedIndex].value;">
<OPTION>Select Category...</OPTION>
{foreach from=$subcategories item=subcat}
<OPTION VALUE="home.php?cat={ $subcat.categoryid }">{ $subcat.category|escape } {if $config.Appearance.count_products eq "Y"}
{if $subcat.product_count}
({ $subcat.product_count } {$lng.lbl_products})
{elseif $subcat.subcategory_count}
({ $subcat.subcategory_count } {$lng.lbl_categories|lower})
{/if}{/if}</OPTION>
{/foreach}
</SELECT>
</FORM>
{/if}


Probably could be cleaned up some but it should get you close.

boomobile 06-26-2008 02:13 PM

Re: Need Help ! Subcategory dropdown
 
Has anyone used a dynamic drive menu for x-cart? If so how and where is the code placed? I'm looking at a couple ideas, but would really like to use this one http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

Rajdeep 07-03-2008 03:22 AM

Re: Need Help ! Subcategory dropdown
 
Quote:

Originally Posted by ubergeek
Maybe try something like this?

In subcategories.tpl find the block of code starts at or near 16 and end at 33

Code:

{if $subcategories}
<table cellspacing="5" width="100%">
{foreach from=$subcategories item=subcat}
<tr>
{if $tmp and $first_subcat ne "Y"}
    <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" /></td>
{assign var="first_subcat" value="Y"}
{/if}
    <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td>
    <td class="SubcatInfo">{if $config.Appearance.count_products eq "Y"}
{if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products}
{elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower}
{/if}
    {/if}</td>
</tr>
{/foreach}
</table>
{/if}


Replace this if statement with the following:

[code]
{if $subcategories}
[TRUNCATED....]

Probably could be cleaned up some but it should get you close.




Hi ubergeek,

We are using fancy categories (Icons) options.. Could not find the codes as mentioned by you in the subcategories.tpl file.

Could you suggest alternates. Help would be appreciated.

Thanks in advance.....


All times are GMT -8. The time now is 06:36 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.