| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Breakup Subcategories | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() How can I separate subcategories into multiple columns? IБ─≥ve searched the forum and found a few related topics but none seem to work??? Any help is greatly appreciated!
|
|||||||
#3
|
|||||||
|
|||||||
![]() Correct, I am wanting the sub category listings to be in 2 columns.
|
|||||||
#4
|
|||||||
|
|||||||
![]() Try something like for a two column list in subcategories.tpl:
Code:
__________________
ex x-cart guru ![]() |
|||||||
#5
|
|||||||
|
|||||||
![]() Hello,
Thanks for posting the code it pointed me in the right direction, but I am trying to split them into 3 or 4 columns. I tried using the {if $smarty.section.cat_num.index is div by 3} but since the index starts with a 0 and 0 is divisible by 3 it inserts <tr></tr> after the first category, so the table looks like this cat0 cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 etc. I would realy appreciate any help. Thanks |
|||||||
#6
|
|||||||
|
|||||||
![]() have you ever changed this in the version 4 xcart? the code is set up a bit different. I was able to use this code in the last store I used but the new version subcategories.ypl has this code instead:
{section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {if $subcategories} <TABLE border="0" cellspacing="5"> {foreach from=$subcategories item=subcat} <TR> <TD align="center" nowrap width="95%"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcat.categoryid}[/img] <FONT class="ItemsList">{ $subcat.category|escape }</FONT> </TD> <TD align="right" nowrap><FONT class="Text">{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} {/if} {/if}</FONT></TD> </TR> {/foreach} </TABLE> {/if} |
|||||||
#7
|
|||||||
|
|||||||
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|