View Single Post
  #2  
Old 07-02-2007, 11:26 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Cats into Featured?

in skin1/customer/main/welcome.tpl,
before the featured_products.tpl include,
add
Code:
{include file="customer/main/categories_welcome.tpl"} <br />

create a new file called categories_welcome.tpl in skin1/customer/main
with (change number of columns accordingly)
Code:
{capture name=dialog} <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td> <table width="100%" cellpadding="5" cellspacing="1"> <tr> {assign var="width" value=20} {foreach from=$categories item=ca name=cats} {if $smarty.foreach.cats.index is div by 4} </tr> <tr> {/if} <td width="{$width}%" class="PListCell"> <div> <a href="home.php?cat={$ca.categoryid}" class="VertMenuItems"><img src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/image.php?id={$ca.categoryid}&amp;type=C{/if}" /></a> </div> <div> <font class="CategoriesList"><a href="home.php?cat={$ca.categoryid}" class="VertMenuItems">{$ca.category}</a></font><br /> </div> </td> {/foreach} </table> </td> </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.dialog extra='width="100%"'}

it may contain a few bugs (i found one where if you have category images displayed on the side menu they will all display the same icon once you click on a category), but it should get you started


a sample image of it can be found in the attached thumbnail
Attached Thumbnails
Click image for larger version

Name:	sample.jpg
Views:	445
Size:	61.8 KB
ID:	446  
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote