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
  #1  
Old 03-04-2003, 11:58 AM
 
davidgreenberg davidgreenberg is offline
 

Member
  
Join Date: Jan 2003
Posts: 15
 

Default sub category icon

I go to modify my subcategorys and there is a place where i can input an icon.

but why doesnt it show up when i add the icon? anyone, bueler?
Reply With Quote
  #2  
Old 03-04-2003, 01:09 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

What version are you using, and are you able to upload product images?
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 03-04-2003, 01:12 PM
 
funkydunk funkydunk is offline
 

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

Default

in the standard set up the category icon does not appear unless there are subcategories of that category.
__________________
ex x-cart guru
Reply With Quote
  #4  
Old 03-04-2003, 05:27 PM
 
GlennM GlennM is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 198
 

Default

I have the same problem.
  • I set up a brand new parent category
    Then I setup a sub category
    I assign an icon to that sub category from my local machine
    It shows in the admin screen when I view that sub category
    But when I go to the store I can't see any icon, just the name of the sub category when its parent category is selected
Running v3.3.3
Reply With Quote
  #5  
Old 03-04-2003, 05:45 PM
 
GlennM GlennM is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 198
 

Default

Ok, I see what is happening now, the parent categories icon is what will appear when you select a sub category...

When I click on my parent category I want this example to happen:
http://www.motorsport-depot.com/xcart/customer/home.php?cat=57

How do I get that, eh?
Reply With Quote
  #6  
Old 03-05-2003, 12:55 PM
 
davidgreenberg davidgreenberg is offline
 

Member
  
Join Date: Jan 2003
Posts: 15
 

Default

boomer, i just got x-cart like a month and a half ago. so im pretty sure i have the newest version of it.

i am able to upload images fine.

in the main categoy, i upload an image and when the subcategories pop up, thats when i see the main category image (if that makes any sense). i see why its working that way and i understand that its supposed to work like that, but i am curious to add an icon to each subcategory that will actually show up next to the subcategory (from within the main category section) glenn m has got it!

he poses the question very precisely!

thanks for the help everyone
Reply With Quote
  #7  
Old 03-18-2003, 01:34 AM
 
ambermoon ambermoon is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Perth Western Australia
Posts: 72
 

Default Subcategory Icon

how can I assign one icon for every subcategory instead of one for a whole category ?
Reply With Quote
  #8  
Old 04-10-2003, 09:24 AM
 
yamz yamz is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 46
 

Default here you go!

Try adding this tag to the top of subcategories.tpl; after the include tag:

{ include file="location.tpl" }

http://www.yourcompany.com/xcart/icon.php?categoryid={$cat}&rand={$rand}


Worked for me!
Reply With Quote
  #9  
Old 04-10-2003, 04:05 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Using image.php to call every subcat and cat icons from the db can be very costly. Remember the browser won't cache any of the image data coming from the database, so if your using such code on the main cat or subcat, you will notice a somewhat larger load on the server. The best method for this is to remove the category icons from using the database and using the file system so they are cached within the browser.

anyhow, just a tip.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #10  
Old 05-05-2003, 08:13 PM
 
poboy poboy is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 59
 

Default Novice..Only displays on first sub item.

I tried the code above to no success becuase I have customized subs catagory. I designate an icon for the main catagory and it shows up on the sub catagory. Everytime I try to modify the sub catagory to include an icon, it just creates a main catagory. My concern is this, I can only get the icon to show up on the first sub catagory and no others, Here is my subcatagories.tpl code:
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><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" }
Any help would be appreciated. Thanks in advance.
http://www.pfgpromotionals.com
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 12:16 PM.

   

 
X-Cart forums © 2001-2020