X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   2 Category columns (https://forum.x-cart.com/showthread.php?t=7300)

urch 04-25-2004 01:47 AM

2 Category columns
 
Hello,

Iam a total newbie to X-cart with a lot to learn from what I have read already in these forums.

After much searching it does not look like this situation has been discussed before...

I would like to create 2 category colums and around 8 rows on the left hand side of the page.

I have already purchased the xcart addon for graphic buttons.

Can someone please point me in the right direction please?

Thanks in advance. :)

defibcentral 04-25-2004 12:46 PM

Duplicating Categories
 
I'm looking for the same procedure. I want to add an additional category under the original products category. I know how to get the "Category.tpl" to work under the original, but there is a cloning problem. I don't know what code to change to get the category independent of the original.

Duncan

B00MER 04-26-2004 01:50 AM

:arrow: http://forum.x-cart.com/viewtopic.php?t=1326

urch 04-26-2004 03:04 AM

Thanks for your post B00MER but the link to the post you provided is for subcategories in multiple columns. :(

What I require is the MAIN categories in 2 columns and multiple rows. Incidently I will be using images for the category buttons that is why I brought the Fancy image add on.

Cheers

mffowler 04-11-2005 04:19 AM

Boomer's code was correct for root categories if you just remove the "sub" text. I haven't added the {else} option if you show subcategories in the categories menu below root, but that seems simple enough. Here's the basic code.

Multiple columns of root categories:
Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{* first coloumn *}
<TABLE width="100%"><TR><TD valign="top" width="50%">

{section name=cat_num loop=$categories start=0 step=2}
{math equation="x/2" x=$smarty.section.cat_num.max assign="counter"}
{if %cat_num.first%}
<table border=0 width="100%" cellspacing=5><tr>
{/if}
<td width="50%">{$categories[cat_num].category}
</td>
</tr><tr>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}

{* 2nd coloumn *}
</TD><TD valign="top" width="50%">

{section name=cat_num loop=$categories start=1 step=2}
{math equation="x/2" x=$smarty.section.cat_num.max assign="counter"}
{if %cat_num.first%}
<table border=0 width="100%" cellspacing=5><tr>
{/if}
<td width="50%">{$categories[cat_num].category}
</td>
</tr><tr>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}

</TD></TR></TABLE>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }



All times are GMT -8. The time now is 06:01 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.