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)
-   -   sub category icon (https://forum.x-cart.com/showthread.php?t=1724)

davidgreenberg 03-04-2003 11:58 AM

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?

B00MER 03-04-2003 01:09 PM

What version are you using, and are you able to upload product images?

funkydunk 03-04-2003 01:12 PM

in the standard set up the category icon does not appear unless there are subcategories of that category.

GlennM 03-04-2003 05:27 PM

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

GlennM 03-04-2003 05:45 PM

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?

davidgreenberg 03-05-2003 12:55 PM

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

ambermoon 03-18-2003 01:34 AM

Subcategory Icon
 
how can I assign one icon for every subcategory instead of one for a whole category ?

yamz 04-10-2003 09:24 AM

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! 8)

B00MER 04-10-2003 04:05 PM

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. ;)

poboy 05-05-2003 08:13 PM

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


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

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