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)
-   -   Category Description in dialog box. (https://forum.x-cart.com/showthread.php?t=21586)

brgreene 05-05-2006 05:53 AM

Category Description in dialog box.
 
I am using the following code for my subcategories.tpl

Code:

{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"}


 
{include file="modules/Bestsellers/bestsellers.tpl"}
{/if}


 
{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"
"}

{/if}


{capture name=dialog}
{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 border=0 cellspacing=5 width=100%>
{/if}

  {if $smarty.section.cat_num.index is div by 2}
    </tr><tr valign="top">
  {/if}

  <td valign="top" align="center">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr><td></td></tr>
  <tr>
    <td align="center" valign="top"></td>
  </tr>
  <tr>
    <td align="center" valign="top"><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
  [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]
  </a></td>
  </tr>
  <tr>
    <td align="center"><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
  {$subcategories[cat_num].category|escape}</a>
 
  { $categories[cat_num].description|escape }</td>
  </tr>
</table>
  </td>

{ if %cat_num.last% }
</tr></table>
{/if}

{/section}

{include file="customer/main/products.tpl" products=$products}
 
{if $tmp and $products ne "" }
<br clear=_all>{*<hr size=1 noshade>*}
{/if}

{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_cat}
{/if}

{/capture}
{include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"}



 
 

{if $products eq ""}
{if $f_products ne ""}


 
{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }


I would like to put the category description in side the dialog box. Right now it is on top. I tried moving the code and it just does not appear.

I am using 4.0.18. This is a modified subcategories.tpl.

balinor 05-05-2006 06:02 AM

What code did you put in the side menu?

brgreene 05-05-2006 07:12 AM

Categories.tpl
 
Here is my categories.tpl code:

Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="3" bgcolor="#669ACE">[img]{$ImagesDir}/cat_head_blue.gif[/img]</td>
  </tr>
  <tr>
    <td colspan="3" bgcolor="#FFFFFF"><td width="1">[img]{$ImagesDir}/spacer.gif[/img]</td></td>
  </tr>
  <tr>
    <td width="50" bgcolor="#669ACE"></td>
        <td width="1">[img]{$ImagesDir}/spacer.gif[/img]</td>
    <td valign="top">
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                {if $config.General.root_categories eq "Y"}
                {section name=cat_num loop=$categories}
                        <tr>
                        <td>
                                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="10" bgcolor="#EAE4CC"></td>
                                            <td width="10" bgcolor="#EAE4CC">[img]{$ImagesDir}/arrow.gif[/img]</td>
                                            <td height="20" bgcolor="#EAE4CC"><FONT class="CategoriesList">{$categories[cat_num].category}</FONT>
</td>
                                          </tr>
                                        <tr>
                                    <td width="1" height="1">[img]{$ImagesDir}/spacer.gif[/img]</TD>
                                          </tr>
                                </table>
                        </td>
                  </tr>
                {/section}
        {else} {section name=cat_num loop=$subcategories}
                <tr>
                        <td>
                                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="10" bgcolor="#EAE4CC"></td>
                                            <td width="10" bgcolor="#EAE4CC">[img]{$ImagesDir}/arrow.gif[/img]</td>
                                            <td height="20" bgcolor="#EAE4CC"><FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT>
</td>
                                          </tr>
                                        <tr>
                                    <td width="1" height="1">[img]{$ImagesDir}/spacer.gif[/img]</TD>
                                          </tr>
                                </table>
                        </td>
                </tr>
                {/section}
        {/if}
        </table>
        </td>
  </tr>
</table>


balinor 05-05-2006 07:22 AM

I don't see any code in there for category description...that code is at the top of subcategory.tpl:

{$current_category.description}

brgreene 05-05-2006 07:37 AM

Sub-Category
 
I guess i mean sub category.

Here is a link to show my problem

http://66.206.25.17/home.php?cat=85

In the center you will see the sub-category description above the dialog box.

Quote:

Choose either our standard size braided bench pad or a custom size braided bench pad.

I am trying to move this under the dialog box.

balinor 05-05-2006 07:41 AM

Oh sorry, I misunderstood your post...I thought you wanted to put the description in the SIDE menu! :oops: To do what you want, just edit subcategories.tpl and replace this:

Code:



{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"
"}

{/if}


{capture name=dialog}
{assign var="tmp" value="0"}


with this:

Code:

{capture name=dialog}



{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"
"}

{/if}

{assign var="tmp" value="0"}


brgreene 05-05-2006 09:14 AM

Works great
 
Thanks...it works great.

I don't know what I was thinking I kept leaving out part of the code because I was thing the navigation was the location links.

Thanks for the help


All times are GMT -8. The time now is 01:14 PM.

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