View Single Post
  #1  
Old 04-27-2005, 05:26 PM
 
jburba2000 jburba2000 is offline
 

Advanced Member
  
Join Date: Dec 2003
Location: Oklahoma
Posts: 66
 

Default Awesome SubCat mod with a bit of help

I've got this awesome subcat mod, and would be willing to share it if I can get a bit of help from the Community.

created: customer/subcat.tpl
Code:
{capture name=subcatdiag} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {foreach from=$subcategories item=subcat} <FONT class="SubCategoriesList">{ $subcat.category|escape }</FONT> <FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count gt "0"}({ $subcat.product_count }){/if} {/if}</FONT> {/foreach} {/capture} {if $subcat ne ""} { include file="submenu.tpl" menu_title=$current_category.category menu_content=$smarty.capture.subcatdiag} {/if}

created: submenu.tpl
Code:
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <TD> <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <TD><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="CatHeadLeft">[img]{$ImagesDir}/spacer.gif[/img]</td> <td class="CatHeadSpacer" width="100%">{if $link_href} <FONT class="VertMenuTitle">{$menu_title}</FONT> {else} <FONT class="VertMenuBoxNewsTitle">{$menu_title}</FONT> {/if} </td> <td class="CatHeadRight">[img]{$ImagesDir}/spacer.gif[/img]</td> </tr> </table> </TD> </TR> <TR> <TD><table class="VertMenuBorder" width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><TABLE class="VertMenuBox" border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <td class="CatLeftSpacer">[img]{$ImagesDir}/spacer.gif[/img]</td> <TD class="SubCatHeadT" width="100%">{$lng.lbl_subcategories} </TD> <td class="CatRightSpacer">[img]{$ImagesDir}/spacer.gif[/img]</td> </TR> <TR> <TD class="SubCatDiv" width="100%" colspan="3">[img]{$ImagesDir}/spacer.gif[/img]</TD> </TR> <TR> <td class="SubCatHeadSpacerL">[img]{$ImagesDir}/spacer.gif[/img]</td> <TD class="SubCategoriesList" width="100%">{$menu_content} </TD> <td class="SubCatHeadSpacerR">[img]{$ImagesDir}/spacer.gif[/img]</td> </TR> <TR> <TD class="SubCatDiv" width="100%" colspan="3">[img]{$ImagesDir}/spacer.gif[/img]</TD> </TR> <TR> <td class="SubCatHeadSpacerL">[img]{$ImagesDir}/spacer.gif[/img]</td> <TD width="100%"></TD> <td class="SubCatHeadSpacerR">[img]{$ImagesDir}/spacer.gif[/img]</td> </TR> </TABLE></td> </tr> </table> </TD> </TR> </TABLE> </TD></TR> </TABLE>

1st Question
Down at the bottom of the 2nd code:
Code:
<TD width="100%"></TD> <td class="SubCatHeadSpacerR">[img]{$ImagesDir}/spacer.gif[/img]</td> </TR> </TABLE></td> </tr> </table> </TD> </TR> </TABLE> </TD></TR> </TABLE>

in the empty <TD width="100%"></TD> tags, is where the manufacturer information will go that I am trying to figure out. What I need is to be able to list the vendors in that subcategory and any sub/subcategories. Has anyone figured out how to do this yet?

2nd Question
How would you modify the product.count to be able to show the total products in all sub/subcategories in subcategories?

You can view my partially completed code here: http://www.mindells.com/home.php
and then clicking on the "Pumps" category to see how the site changes with this mod. You can then click on the "Replacement Parts" subcategory to see the count problem from my 2nd question.

the subcategory information out in the middle will be gone when this mod is completed.
__________________
Mindells.com - Your Style. Your Comfort. Your Way.
X-Cart Platinum - 4.6.1
Reply With Quote