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

Homepage show cat in welcome area

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-08-2006, 10:59 AM
 
hudge hudge is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 50
 

Default Homepage show cat in welcome area

How do I add the main cat to the home page similar to lite commerce does:
http://www.litecommerce.com/demo/cart.php

Thanks
__________________
-----www.hudge.com------
X-Cart Pro v4.1.8
X-Cart Gold v4.1.8
Lite Commerce v2.2
Reply With Quote
  #2  
Old 09-20-2006, 03:00 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Homepage show cat in welcome area

Put this in customer/man/welcome.tpl:

{include file="customer/main/subcategories.tpl" cat=$cat}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-20-2006, 07:40 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Homepage show cat in welcome area

That won't quite do it balinor. That just shows them in a single column. Try this:

Code:
{if $subcategories} <table cellspacing="5" width="100%" border="0"> <tr> {foreach from=$subcategories item=subcat} {if $tmp is div by 4} </tr><tr><td colspan="3"></td></tr><tr valign="top"> {/if} { if $tmp and $first_subcat ne "Y" } {assign var="tmp" value=1} {assign var="first_subcat" value="Y"} {/if} <td class="ColumnTitles" valign="top"><a title="{$subcat.category}" href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/default_image.gif{/if}" alt="" /> <br /><font class="ItemsList">{ $subcat.category|escape }</font></a> {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} {else} 0 Products {/if} {/if} {assign var="tmp" value=$tmp+1} {/foreach} </table> {/if}

Change {if $tmp is div by 4} to whatever number of columns you want.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #4  
Old 09-20-2006, 07:42 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Homepage show cat in welcome area

Sorry, forgot subcategories come in that crappy list by default...I have them in columns by default in my install package.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 09-20-2006, 09:31 AM
 
hudge hudge is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 50
 

Default Re: Homepage show cat in welcome area

THANKS! This helps might site alot.

Anyway of autosizing to 100x100px of the icons via thumb.phplike the products?
__________________
-----www.hudge.com------
X-Cart Pro v4.1.8
X-Cart Gold v4.1.8
Lite Commerce v2.2
Reply With Quote
  #6  
Old 09-20-2006, 10:02 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Homepage show cat in welcome area

I'm still working on that. I just implimented the code yesterday.

One change I have made since posting though is to change {if $tmp is div by 4} to {if $tmp is div by $config.Appearance.products_per_row}

I'll be adding the code for thumbnail sizing next. I'll let you know when I've got it working.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
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 05:49 AM.

   

 
X-Cart forums © 2001-2020