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)
-   -   Moving a category to another menu (https://forum.x-cart.com/showthread.php?t=19978)

vixnfox 02-16-2006 09:18 PM

Moving a category to another menu
 
Hi,
I am setting up a shop selling jewellery and photographic prints. I have all the categories working ok.
I want to move the "Photography" category from "Categories" to another menu beneath the "Categories" menu. Creating the new menu is fine. Can I make a category display in another menu? It seems there would be a lot involved.

vixnfox

vixnfox 02-16-2006 09:34 PM

here is as far as I have got. This is the code as it is now.
home.tpl:
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{ include file="customer/categories.tpl" }


{/if}

in categories.tpl
* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max 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"}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList">{$categories[cat_num].category}</FONT>

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

{/section}
{/if}
{/if}
{/capture}

in there somewhere. Im thinking I can clone this somehow and use it, but I dont know what "{section name=cat_num loop=$categories}" means, and I think I may be biting off more than I can chew.
:(
Oh well, at least I have nice indented frames around my product icons :)

vixnfox 02-17-2006 01:22 AM

OK while im waiting :)
in categories.tpl I did this

{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
{assign var="tmp" value = $categories[cat_num].categoryid}

{if $tmp ne "250"}


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



{/if}

then in my own menu tpl

{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
{assign var="tmp" value=$categories[cat_num].categoryid}
{if $tmp eq"250"}


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

{/if}

Now I have the Photography category on its own menu, so I can link my own CSS to change the whole appearance when someone selects it.

I have a question though, in this
{assign var="tmp" value=$categories[cat_num].categoryid}

I tried to get the category name by using
{assign var="tmp" value=$categories[cat_num][categoryid].category}
so I couyld test for "Photography" instead of the cat ID of 250 that I had to get from MyPhPAdmin. Anyone know how to assign the category name so I can see it??


[/b]


All times are GMT -8. The time now is 12:40 AM.

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