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

How to remove the subcategories page from the products page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-07-2008, 05:46 AM
 
screeny screeny is offline
 

Advanced Member
  
Join Date: May 2008
Posts: 31
 

Lightbulb How to remove the subcategories page from the products page

Disclaimer: This is a tip I received from tech support that my designer asked, and I'm simply passing it on to the forums. If you want to know why I'm doing this, read here: http://forum.x-cart.com/showthread.php?t=42824. I'm not a web designer/developer, and I don't know anything about programming the back-end of X-Cart. My version of X-Cart is 4.1.10, so this tip may not work if you use a different version. If you have any questions about this tip, I can't answer them, but reply anyway and hopefully someone more knowledgeable will respond.

========

You should modify the "<xcart_dir>/skin1/customer/main/subcategories.tpl" file using the instruction below:
1) Find the following code:
{capture name=dialog}
{assign var="tmp" value="0"}
and replace it with this one:
{*
{capture name=dialog}
{assign var="tmp" value="0"}

2) Find the following code:
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra='width="100%"'}
and replace it with this one:
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra='width="100%"'}
*}
__________________
4.1.10
Reply With Quote
  #2  
Old 10-09-2008, 06:23 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

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

I see some problems.
If you do not have featured products, the page is blank, even if you do have products listed in the category. This is because in essence you have commented out everything except "bestsellers", "special offers", and "featured". If your category doesn't contain any of these it results in a blank page (no products listed).
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:24 PM.

   

 
X-Cart forums © 2001-2020