View Single Post
  #4  
Old 08-14-2006, 05:54 PM
 
Hunabku Hunabku is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 47
 

Default My solution

Well I managed to come up with a fairly elegant solution.

I went with a static page so that my client could modify the static element of the page. I then placed an if statement in skin1/customer/main/"pages.tpl" to test if we're on the page (pageid=9 in my case) and then handle the dynamic listing of main categories. The code to do the dynamic listing was borrowed from skin1/customer/main/"subcategories.tpl". Here is that code that i modified and inserted into pages.tpl:

Code:
{** AC_Mod for root catalog page **} {if ($smarty.get.pageid eq "9")} <span class="bigred">Pharmacopia Catalog</span> [img]{$ImagesDir}/aaCustomInterface/a_Spacer.GIF[/img] {$page_content} [img]{$ImagesDir}/aaCustomInterface/a_Spacer.GIF[/img] {capture name=dialog} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} <TABLE border="0" cellspacing="5" width="100%"> {section name=cat_num loop=$categories} {if $categories[cat_num].category ne "Medical Conditions"} <TR> <TD align="left" width="95%"><FONT class="ItemsList">{$categories[cat_num].category}</FONT> </TD> <TD align="right" nowrap><FONT class="Text"> {if $config.Appearance.count_products eq "Y"} {if $categories[cat_num].product_count}{ $categories[cat_num].product_count} {$lng.lbl_products} {elseif $categories[cat_num].subcategory_count}{ $categories[cat_num].subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</FONT></TD> </TR> {/if} {/section} </TABLE> {/if} {/if} {/capture} {include file="dialog.tpl" title="Main Categories" content=$smarty.capture.dialog extra="width=100%"} In this paragraph we can briefly introduce the Phytomedicinal column to the right and describe how to use it. We can also tell them about the search and the advanced search. {/if}

The modification of the pasted subcategory code involved taking out the column that shows cat/product thumbnails (you could leave that in), an if statement to not list a cat entitled "Medical Conditions", and MOST importantly substituting all references for sub cats to cats. That was the key that you should do and made it work like a charm.

Fixing the breadcrumbs (location.tpl) to start with my main category page was easy - just refer to this post: http://forum.x-cart.com/viewtopic.php?t=24008&highlight=main+catalog+catal ogue

To view the final root categories page on my site go to:
http://amazonmedicine.com/xcart/pages.php?pageid=9

I hope this helps someone
__________________
Version 4.1.3
Reply With Quote