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

Exclude Certain Categories From Category List

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 08-11-2006, 10:53 AM
  vipstore's Avatar 
vipstore vipstore is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 33
 

Default

thanks!
__________________
version 4.0.18
Reply With Quote
  #12  
Old 06-15-2007, 10:32 PM
 
yages yages is offline
 

eXpert
  
Join Date: Sep 2004
Location: Australia
Posts: 332
 

Default Re: Exclude Certain Categories From Category List

Quote:
Originally Posted by balinor
Welcome to X-Cart! Please be sure to post your full version in your signature (i.e. 4.0.1. Each version is different, and this information is very important.

You can use the orderby function to solve your issue. Use an {if} statement like this to only show categories with an orderby under 500:

{if $categories[cat_num].order_by < 500}

This would go in customer/categories.tpl

does this work for 4.1.7
__________________
yages
x-cart version 4.5.5
Reply With Quote
  #13  
Old 06-22-2007, 07:15 AM
 
Widerimagellc Widerimagellc is offline
 

Member
  
Join Date: Dec 2006
Location: Pittsburgh, PA
Posts: 23
 

Default Re: Exclude Certain Categories From Category List

Quote:
Originally Posted by balinor
Welcome to X-Cart! Please be sure to post your full version in your signature (i.e. 4.0.1. Each version is different, and this information is very important.

You can use the orderby function to solve your issue. Use an {if} statement like this to only show categories with an orderby under 500:

{if $categories[cat_num].order_by < 500}

This would go in customer/categories.tpl



I have tried this if statement all throughout my categories.tpl and i just keep getting an error can some please help on where exactly to put this. Thanks so much

here is my categories.tpl

{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
{capture name=menu}
{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"}
<div class="categories">
{foreach from=$categories item=c}
<a href="home.php?cat={$c.categoryid}">{$c.category}< /a>
{/foreach}
</div>
{else}
<div class="categories">
{foreach from=$subcategories item=c key=catid}
<a href="home.php?cat={$catid}">{$c.category}</a>
{/foreach}
</div>
{/if}
{/if}
{/capture}
{ include file="menu_cat.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
__________________
www.widerimage.com
XCART version 4.1.8
Reply With Quote
  #14  
Old 06-25-2007, 07:16 PM
 
Widerimagellc Widerimagellc is offline
 

Member
  
Join Date: Dec 2006
Location: Pittsburgh, PA
Posts: 23
 

Default Re: Exclude Certain Categories From Category List

Nevermind, I think,

here is my new categories.tpl code and this seems to be working......


{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
{capture name=menu}
{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"}
<div class="categories">
{foreach from=$categories item=c}
{if $c.order_by < 500}
<a href="home.php?cat={$c.categoryid}">{$c.category}< /a>
{/if}{/foreach}
</div>
{else}
<div class="categories">
{foreach from=$subcategories item=c key=catid}
{if $c.order_by < 500}
<a href="home.php?cat={$catid}">{$c.category}</a>
{/if}{/foreach}
</div>
{/if}
{/if}
{/capture}
{ include file="menu_cat.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
__________________
www.widerimage.com
XCART version 4.1.8
Reply With Quote
  #15  
Old 09-25-2007, 06:03 PM
 
LittleLizard LittleLizard is offline
 

Member
  
Join Date: Jun 2007
Location: Atlanta
Posts: 27
 

Default Re: Exclude Certain Categories From Category List

Quote:
Originally Posted by Widerimagellc
Nevermind, I think,

here is my new categories.tpl code and this seems to be working......


Thank you so much for posting that - I needed to do the same thing and it worked great!
__________________
www.littlelizard.com
X-Cart version 4.1.8
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 11:48 PM.

   

 
X-Cart forums © 2001-2020