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

sub category icon

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 05-06-2003, 08:25 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Try this instead:

Code:
{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *} { include file="location.tpl" } {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> {/if} <tr> {* new funkydunk bit *} <td align="left"> [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] </td> {* end of funkydunk bit *} <td align=left nowrap width=95%> <font class="ItemsList">{ $subcategories[cat_num].category|escape }</font> </td> <td align=right nowrap><font class=Text> {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } {$lng.lbl_products} {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } {$lng.lbl_categories|lower} {/if} </font></td> </tr> {*/if*} { if %cat_num.last% } </table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

This will put the icons to the left of the category names
__________________
ex x-cart guru
Reply With Quote
  #12  
Old 05-06-2003, 06:10 PM
 
poboy poboy is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 59
 

Default You're the man..

Funkydunk,

You are the man, I had to change the code a tiny bit, but I would have never done it with out you, I can promise you that. Here is the code that I used:
Code:
{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *} { include file="location.tpl" } {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% } {if $tmp} [img]../icon.php?categoryid={$cat}[/img] {/if} <table border=0 cellspacing=5> {/if} {*if $subcategories[cat_num].product_count or $subcategories[cat_num].subcategory_count*} <tr> {* new funkydunk bit *} <td align="left" valign="middle"> [img]{$ImagesDir}/arrow.gif?categoryid={$subcategories[cat_num].categoryid}[/img] </td> {* end of funkydunk bit *} <td align=left nowrap width=95%> <font class="ItemsList">{ $subcategories[cat_num].category|escape }</font> </td> <td align=right nowrap><font class=Text> {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } {$lng.lbl_products} {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } {$lng.lbl_categories|lower} {/if} </font></td> </tr> {*/if*} { if %cat_num.last% } </table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

Check it out and please pass it on. I'm also pulling my icon out of the images directory and not the database. Thank you for helping, seriously.
My home address is http://www.iexweb.com

Chris
chris@iexweb.com
Reply With Quote
  #13  
Old 06-04-2003, 11:27 AM
 
parzoe parzoe is offline
 

Member
  
Join Date: May 2003
Posts: 17
 

Default uploaded graphic and link to cat.

This one shows the uploaded graphic along with a link to the category. Cheers!

Code:
{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *} { include file="location.tpl" } {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> {/if} <tr> {* new funkydunk bit *} <td align="left"> [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] </td> {* end of funkydunk bit *} <td align=left nowrap width=95%> <font class="ItemsList">{ $subcategories[cat_num].category|escape }</font> </td> <td align=right nowrap><font class=Text> {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } {$lng.lbl_products} {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } {$lng.lbl_categories|lower} {/if} </font></td> </tr> {*/if*} { if %cat_num.last% } </table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }
Reply With Quote
  #14  
Old 06-11-2003, 10:04 PM
 
Jim K. Jim K. is offline
 

Advanced Member
  
Join Date: Mar 2003
Location: USA
Posts: 35
 

Default

I used the code from parzoe and it seems to work well. I am also trying to use this to display my icons in columns ( 2 or 3 columns wide) with a link below each image. I will have a category with 80 - 100 subcategories that will need to show images for each listing. Does anyone have any ideas on the code to do this?


Jim
Reply With Quote
  #15  
Old 11-18-2003, 03:03 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default

Quote:
Originally Posted by Jim K.
I used the code from parzoe and it seems to work well. I am also trying to use this to display my icons in columns ( 2 or 3 columns wide) with a link below each image. I will have a category with 80 - 100 subcategories that will need to show images for each listing. Does anyone have any ideas on the code to do this?


Jim

i'm intrested in this as well; i've seen many examples....is there a mod somewhere?
Reply With Quote
  #16  
Old 11-18-2003, 03:11 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default

i found this (it was a few pages back in the search!)

i'll give it a try now.....

http://forum.x-cart.com/viewtopic.php?t=5131&highlight=3+columns
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:31 AM.

   

 
X-Cart forums © 2001-2020