I'm going to join in the ressurection of this one
I've done as suggested with the extra table in xcart_categories and entered image location in the new table for each of the categories.
Then edited categories.tpl as follows
line in question:
complete file:
Code:
{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList">
[img]{$categories[cat_num].category_image}[/img]{$categories[cat_num].category}</FONT>
{/section}
{else} {section name=cat_num loop=$subcategories}
<FONT class="CategoriesList">
{$subcategories[cat_num].category}</FONT>
{/section}
{/if}
{/if}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
I've left the text links in for now, intending to remove them later and perhaps use a similar table trick to pull alt text for each button for SEO
problem is, instead of calling the image location, I'm just getting as imahe location '/home.php'
Am I trying to call the image incorrectly, or does it suggest a problem with the way I have set up the table?
(table contains the absolute url to the image)
Quote:
Originally Posted by mizzlewillz
Here is what I did to add a category icon instead of using the text for categories.
I created another field in xcart_categories table using phpmyadmin. I called it: category_image Type=VARCAR (255) I set it to NULL.
Then I just edited the table through phpMyAdmin and for each main category I added: yourwebsite.com/store/files/Fulfillment staff/product_images/WhateverYouWant.jpg (This is where I store my images for X-Cart).
Then in categories.tpl Between the {section name=cat_num loop=$categories} and {/section} I added this line
Code:
{$categories[cat_num].category_image}
I used category_image because that is the name of the field in my database.
I know there are probably other ways of doing this, and there are probably posts on this, I didn't even check  Hopefully someone might find this useful, I imagine you can use this for the subcategories too, just modify the loop for subcategories.
PLEASE if there are any errors or comments, POST IT- I just started using X-cart about 2 months ago or something so I am not an expert by any means.
Mike
|
[/code]