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)
-   -   Have categories that don't show up in the main menu (https://forum.x-cart.com/showthread.php?t=19383)

jkirkpatrick 01-20-2006 11:16 AM

Have categories that don't show up in the main menu
 
Hello,

I have recently set up a gift center on my site and want to group products in different categories. However, I don't want these categories to show up on my main menu (otherwise it will become too long!)

Is there a way to create a category and link to it from a static page, but not have that category show up in your main menu?

Any help would be appreciated.

Thanks,
Jennifer

balinor 01-20-2006 12:00 PM

Make the category hidden. There is a mod for this in the Custom Mods forum.

sonoro 01-26-2006 12:38 AM

Modify "skin1/customer/categories.tpl":

After: "{section name=cat_num loop=$categories}"
Add: "{if $categories[cat_num].order_by lt 20}"

After this modification only categories with a "order_by" in the admin-backend lower than ("lt") 20 will be displayed. Set every order-by-number of the categories you don't want to show in the menue higher than 20.

jkirkpatrick 01-26-2006 12:12 PM

sonoro -- I couldn't get that to work. Here's the code for my categories.tpl file:

Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}

{* $Id: categories.tpl,"Category menu modifications" 2005/01/28 09:53:29 chesser Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}






{* BEGIN Customization "Category menu modifications" *}
{section name=cat_num loop=$categories}

{if $categories[cat_num].order_by eq 0}
{$lng.lbl_heading1}


{elseif $categories[cat_num].order_by eq 80}

{$lng.lbl_heading2}


{elseif $categories[cat_num].order_by eq 90}

{$lng.lbl_heading3}


{/if}




{section name=allcat_num loop=$allcategories}

{if $allcategories[allcat_num].categoryid eq $cat and $allcategories[allcat_num].parentid eq $categories[cat_num].categoryid}{assign var="is_sub_cat" value="Y"}{/if}
{/section}

{if $cat eq $categories[cat_num].categoryid or $is_sub_cat eq "Y"}{/if}

{* SAFETYNET DSEFU MOD *}
{if $enable_seo_links == "Y"}
{$categories[cat_num].category}

{else}
{$categories[cat_num].category}

{/if}
{* END SAFETYNET DSEFU MOD *}

{if $cat eq $categories[cat_num].categoryid or $is_sub_cat eq "Y"}


{section name=allcat_num loop=$allcategories}

{if $allcategories[allcat_num].parentid eq $categories[cat_num].categoryid}
    {if $cat eq $allcategories[allcat_num].categoryid}{/if}
{* SAFETYNET DSEFU MOD *}
{if $enable_seo_links == "Y"}
{$allcategories[allcat_num].category}

{else}
{$allcategories[allcat_num].category}

{/if}
{* END SAFETYNET DSEFU MOD *}
    {if $cat eq $allcategories[allcat_num].categoryid}
{/if}
{/if}
{/section}
{/if}
{assign var="is_sub_cat" value="N"}
{/section}
{* END Customization "Category menu modifications" *}
{else} {section name=cat_num loop=$subcategories}
{* SAFETYNET DSEFU MOD *}
{if $enable_seo_links == "Y"}
<FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT>

{else}
<FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT>

{/if}
{* END SAFETYNET DSEFU MOD *}
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" menu_content=$smarty.capture.menu }


Any idea how I can make it work? I see there is a commercial mode but I don't really need this working bad enough to pay $40. It would be nice if there was a simple solution though.

Thanks for any help you can give!

Jennifer

balinor 01-26-2006 12:14 PM

There is a free mod for this in the Custom Mods forum.

jkirkpatrick 01-26-2006 12:20 PM

I went through that entire thread and tried everything mentioned but I was unable to get it to work. It was originally started for version 3.x and then some comments were made about 4.x but I wasn't able to even find the code I needed to change.

Thanks though. If I knew more coding I'm sure that thread would have told me everything I needed to know!

Jennifer


All times are GMT -8. The time now is 04:23 PM.

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