Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Category Description in dialog box.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-05-2006, 05:53 AM
 
brgreene brgreene is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 70
 

Default 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.
__________________
Brian
X-Cart 4.0.18
Reply With Quote
  #2  
Old 05-05-2006, 06:02 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

What code did you put in the side menu?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-05-2006, 07:12 AM
 
brgreene brgreene is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 70
 

Default 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>
__________________
Brian
X-Cart 4.0.18
Reply With Quote
  #4  
Old 05-05-2006, 07:22 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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

{$current_category.description}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-05-2006, 07:37 AM
 
brgreene brgreene is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 70
 

Default 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.
__________________
Brian
X-Cart 4.0.18
Reply With Quote
  #6  
Old 05-05-2006, 07:41 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Oh sorry, I misunderstood your post...I thought you wanted to put the description in the SIDE menu! 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"}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 05-05-2006, 09:14 AM
 
brgreene brgreene is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 70
 

Default 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
__________________
Brian
X-Cart 4.0.18
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:22 PM.

   

 
X-Cart forums © 2001-2020