View Single Post
  #3  
Old 10-09-2008, 06:26 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: How to remove the subcategories page from the products page

If you simply want to remove sub-categories from a category display (not sure why you'd want to do that as it would hurt your internal linking structure and customer navigation) you'd comment out this bit of code:

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}

While we certainly appreciate your willingness to share Screeny, if you don't understand the code you are posting, it may be best if you don't post it. The code may be tailored to your specific store or in the case of one of your other tips, it may just be poorly coded. Many times people here implement code without knowing what they are doing, and if the code is incorrect to begin with, it can have disastrous effects. We usually ask that any code you share is tested and functional before posting it.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote