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)
-   -   cat & sub cat descriptions (https://forum.x-cart.com/showthread.php?t=25753)

gargonzo 10-12-2006 09:05 AM

cat & sub cat descriptions
 
folks..

i have a main cat with 4 sub cats. In the main cat, I've added a description of the cat.

Once i view this online, i see the main cat description but its shown 3 times.

MAIN CAT
>>> Description
Sub Cat
>>> SAME description
Sub Cat
>>> Same Description

How do i keep the description, but stop it from duplicating itself?

Anyone?

TIA
Garz

4.07 | php | linux

balinor 10-12-2006 09:15 AM

Re: cat & sub cat descriptions
 
You must have made some sort of customization, as that doesn't happen by default. Have you installed any mods from the forum or otherwise?

gargonzo 10-12-2006 10:12 AM

Re: cat & sub cat descriptions
 
balinor, its possible.. i cannot remember :)

Code:

{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{/if}
{assign var="tmp" value="0"}
{section name=cat_num loop=$subcategories}
{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}
{if $subcategories}
<TABLE width="100%" border="0" cellspacing="5">
{foreach name=fsub from=$subcategories item=subcat}
{if (($smarty.foreach.fsub.iteration-1) % 2)==0}
    <TR>
      <TD colspan="2" align="left">
          {$current_category.description|regex_replace:"/[\n]/":""}</TD>
    </TR>
   
    <TR>
{/if}
{* SAFETYNET DSEFU MOD *}
{if $enable_seo_links == "Y"}
        <TD width="50%" align="left" nowrap><A href="{seo_link cat_name=$subcat.category cat_id=$subcat.categoryid}">{if $tmp}<IMG src="{if $subcat.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$subcat.categoryid}{/if}" align="center" border="0">{/if}<br>
          <b>{$subcat.category}</b></a><br></TD>
{else}
        <TD width="50%" align="left" nowrap><A href="home.php?cat={ $subcat.categoryid }">{if $tmp}<IMG src="{if $subcat.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$subcat.categoryid}{/if}" align="center" border="0">{/if}<br>
          <b>{$subcat.category}</b></a><br></TD>
{/if}
{* END SAFETYNET DSEFU MOD *}
        {if (($smarty.foreach.fsub.iteration) % 2)==0 OR $fsub.last}    </TR>
{/if}
{/foreach}
</TABLE>
{/if}
{if $tmp and $products ne "" }
<HR size="1" noshade>
{/if}
{if $products}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" class="DialogTitle">&nbsp;&nbsp;{$current_category.category}</td>
  </tr>
</table>
{include file="customer/main/products.tpl" products=$products}
{/if}
{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_man}
{/if}
{if $products eq ""}
{if $f_products ne ""}
<P>
{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }

<table width="100%" border="0">
  <tr>
    <td bgcolor="d2d0ca">{ include file="location.tpl" }</td>
  </tr>
</table>



All times are GMT -8. The time now is 11:37 PM.

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