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)
-   -   Yikes... categories disappeared (https://forum.x-cart.com/showthread.php?t=53008)

Tami Indra 03-25-2010 04:19 PM

Yikes... categories disappeared
 
Lesson of the day: don't modify xcart templates on 3 hours of sleep.

Sigh. It was so lovely. I was all finished, went to clean up some commented bits and must have pulled out something crucial along with it. Save. Close. :oops:

Could someone please take a look at my code and see what I could have possibly done that would cause my categories menu (in the sidebar) to suddenly disappear? The header image isn't even showing up.

Code:

{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}

        <img src="{$ImagesDir}/title_categories.png" alt="Categories" />

        {capture name=menu}

        {if $config.General.root_categories eq "Y"}
       
        {foreach from=$categories item=c}
        <p><a href="home.php?cat={$c.categoryid}">{$c.category}</a></p>
            <ul>
            {foreach from=$allcategories item=cat}
            {if $cat.parentid eq $c.categoryid}
                <li><a href="home.php?cat={$cat.categoryid}" class="VertMenuItems">{$cat.category}</a></li>
            {/if}
            {/foreach}
            </ul>
        {/foreach}


        {/capture}
        { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}


My last backup was way too long ago, and would prefer not to revert unless I absolutely have to.

pauldodman 03-25-2010 10:57 PM

Re: Yikes... categories disappeared
 
If it's not showing at all, it's probably not the actual file, but the include statement that calls it. This should be in your home.tpl template - perhaps check there first.

Tami Indra 03-28-2010 06:16 PM

Re: Yikes... categories disappeared
 
Quote:

Originally Posted by pauldodman
If it's not showing at all, it's probably not the actual file, but the include statement that calls it. This should be in your home.tpl template - perhaps check there first.


Nope, the include is right where it should be. I wasn't modifying that file anyway.

Any other ideas?? :sad:

Jon 03-28-2010 09:17 PM

Re: Yikes... categories disappeared
 
Your missing the closing if statement for:

{if $config.General.root_categories eq "Y"}

Based on how you've edited your file I'd say this statement can be removed.

Tami Indra 04-01-2010 09:21 AM

Re: Yikes... categories disappeared
 
Quote:

Originally Posted by Jon
Your missing the closing if statement for:

{if $config.General.root_categories eq "Y"}

Based on how you've edited your file I'd say this statement can be removed.


Got it!! Thanks Jon, I appreciate it!

Jon 04-01-2010 09:38 AM

Re: Yikes... categories disappeared
 
Try clearing your template cache after removing that.


All times are GMT -8. The time now is 05:57 AM.

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