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)
-   -   Trouble displaying categories in table format (https://forum.x-cart.com/showthread.php?t=26743)

ptcsstore 11-20-2006 05:12 AM

Trouble displaying categories in table format
 
I am trying to display my categories in a table format with the image thumbnail right above the category name. The trouble I am having, is that it is displaying a blank category in the first cell, and it is not displaying the last category at all. If you want to see it for yourself, go to http://72.34.43.238/store/, the first category is Retractable Belted Barriers and the last one should be dancer poles. Here is my code: Thanks,

Code:

{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *}

{capture name=dialog}

{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}{/if}<br><br>
{assign var="tmp" value="0"}
{section name=cat_num loop=$subcategories}
{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}


{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 2}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
{if $subcategories[cat_num].icon_url}<img src="{$subcategories[cat_num].icon_url}" border="0" style="padding-bottom: 5px;">{else}<img src="{$xcart_web_dir}/default_icon.gif" border="0" style="padding-bottom: 5px;">{/if} </a><br /><br />
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<b>{ $subcategories[cat_num].category|escape }</b></a><br><br>
                        { $subcategories[cat_num].description|escape }</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{if $total_pages gt 2}
<br>
{ include file="customer/main/navigation.tpl" }
{/if}
{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_cat}
{/if}
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"}
{if $products eq ""}
{if $f_products ne ""}
<BR><BR>
{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }


balinor 11-20-2006 05:46 AM

Re: Trouble displaying categories in table format
 
Moving to Tempalte Editing. Do you have images uploaded for each category?

ptcsstore 11-20-2006 06:35 AM

Re: Trouble displaying categories in table format
 
yes, images are uploaded for each category

ptcsstore 11-21-2006 10:23 AM

Re: Trouble displaying categories in table format
 
Anyone Have any suggestions??

balinor 11-21-2006 10:28 AM

Re: Trouble displaying categories in table format
 
Is that the default code for 4.1.3 or have you installed a mod of some sort?

ptcsstore 11-22-2006 05:31 AM

Re: Trouble displaying categories in table format
 
It is a mod...

balinor 11-22-2006 05:36 AM

Re: Trouble displaying categories in table format
 
Make sure the mod was written for 4.1.3...


All times are GMT -8. The time now is 05:58 PM.

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