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

Moving a category to another menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-16-2006, 09:18 PM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default 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
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
Reply With Quote
  #2  
Old 02-16-2006, 09:34 PM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default

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
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
Reply With Quote
  #3  
Old 02-17-2006, 01:22 AM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default

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]
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
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 12:40 AM.

   

 
X-Cart forums © 2001-2020