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

Remove Sub-Cat Listing After the First Category Result Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-21-2006, 06:03 PM
 
vikeny vikeny is offline
 

Member
  
Join Date: Jun 2004
Location: Los Angeles, CA.
Posts: 22
 

Default Remove Sub-Cat Listing After the First Category Result Page

Howdy,

When users click on a category that has a bunch of sub-categories the center column will display a listing of all sub catagories and, below the sub-cat listing, will show the products that have been assigned to parent catagory. The number of products overflow to mulitiple result pages for the parent category.

When users go to the next result page they still see the sub-category listing on top.

I'd like to remove the sub-category listing for parent category result pages after the first page.

Thanks,
Vik
Los Angeles

---
X-Cart 4.0.14 [linux]
__________________
--
1: X-Cart 4.0.x(live), Apache/2.0.52 (Red Hat), PHP 4.3.9, MySQL 4.1.20
2,3,4,5: X-Cart 4.0.x(live), Apache/2.0.54 (Linux), PHP 4.4.0, MySQL 4.0.25
Reply With Quote
  #2  
Old 02-21-2006, 09:41 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

try to edit skin1/customer/main/subcategory.tpl file.
Reply With Quote
  #3  
Old 02-22-2006, 02:56 PM
 
vikeny vikeny is offline
 

Member
  
Join Date: Jun 2004
Location: Los Angeles, CA.
Posts: 22
 

Default

Thanks for the tip Dongan. I suspected that skin1/customer/main/subcategory.tpl is where the mod would take place. I'm just not sure what to do.

I suspect it has something to do with not showing the subcat listing if the result page is past the first page. I'm just not sure how to do it or what to look for.
__________________
--
1: X-Cart 4.0.x(live), Apache/2.0.52 (Red Hat), PHP 4.3.9, MySQL 4.1.20
2,3,4,5: X-Cart 4.0.x(live), Apache/2.0.54 (Linux), PHP 4.4.0, MySQL 4.0.25
Reply With Quote
  #4  
Old 02-23-2006, 05:10 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

this is what checks to see if its the first page or not

Code:
{if ($navigation_page eq "")||($navigation_page eq "1")}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 02-23-2006, 09:14 AM
 
vikeny vikeny is offline
 

Member
  
Join Date: Jun 2004
Location: Los Angeles, CA.
Posts: 22
 

Default

Thanks Shan (for this and all your other contributions).

I'm trying to get my head around how I could apply that statement to the problem.

Just to refresh, the goal is to have this sub-cat mod function only on the first result page.

Here is my skin1/customer/main/subcategories.tpl

Code:
{* $Id: subcategories.tpl,v 1.43.2.5 2004/12/01 15:15:49 mclap Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/category_offers_short_list.tpl} {/if} [b]{if ($navigation_page eq "")||($navigation_page eq "1")}[/b]{$current_category.description|regex_replace:"/[\n]/":" "} {/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {* ==================== Sub categories mod start *} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 3} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <font size="2">{ $subcategories[cat_num].category|escape }</font></a> { $subcategories[cat_num].description|escape } {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} ({ $subcategories[cat_num].product_count } Products) {elseif $subcategories[cat_num].subcategory_count} ({ $subcategories[cat_num].subcategory_count } Subcategories) {/if} {/if} </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {* ==================== Sub categories mod end *} {if $tmp and $products ne "" } <BR clear="left"> <HR size="1" noshade> {/if} {if $products} {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

Would the statement you highlighted have to be reused or would it be possible to modify it to achieve the task?
__________________
--
1: X-Cart 4.0.x(live), Apache/2.0.52 (Red Hat), PHP 4.3.9, MySQL 4.1.20
2,3,4,5: X-Cart 4.0.x(live), Apache/2.0.54 (Linux), PHP 4.4.0, MySQL 4.0.25
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 10:02 PM.

   

 
X-Cart forums © 2001-2020