| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
add icons netx to category names | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: add icons netx to category names
Guys,
Any clues on why the padding doesnt work? I belive I have teh syntax ok, and have played around on padding size, but it doesnt seem to add any padding? Thanks - this place is so helpful!
__________________
Version 4.7.7 |
|||||||
#12
|
|||||||
|
|||||||
Re: add icons netx to category names
No idea why padding isn't working...here's another trick...add some spacing to the image itself
ranger, sorry, that bit of code would be a bit more complicated than just an {if} statement, as it is a loop.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#13
|
|||||||||
|
|||||||||
Re: add icons netx to category names
Quote:
use this code worked 100% for me. <td align="right"> {if $categories[cat_num].categoryid == your cat no here} <img src="{$ImagesDir}/your_image.gif" width="20" height="20"> {/if}
__________________
X-Cart Gold 4.3.2 X-Cart Gold 4.4.1 Unix High Quality CCTV DVRs & Cameras http://www.eaglemobiles.co.uk/CCTV |
|||||||||
#14
|
|||||||
|
|||||||
Re: add icons netx to category names
Where exactly would I paste that bit of code? Is it possible to post the whole solution in this forum? I hope it is, need it badly...
__________________
Version 4.1.5 |
|||||||
#15
|
|||||||
|
|||||||
Re: add icons netx to category names
But wait a minute... isn't it possible to configure this from admin without having to put our hands in the dirt (code)? It stands in the manual that it's possible to assign icons to categories. I suppose I can do it like so:
http://www.robdiamond.net/category/alice_wonders_buckles/ I have done it and the image shows on the top as I edit the category. I saved it and it was uploaded, because I see it from another machine. But we can only see the category icon in that particular "edit category" dialog, not anywhere else on the site. Sent a support ticket yesterday and still haven't got a reply. Is it a bug or am I missing something here? Cheers, Wallace
__________________
Version 4.1.5 |
|||||||
#16
|
|||||||
|
|||||||
Re: add icons netx to category names
It isn't a bug, but a 'design flaw'. The only place a category icon shows up by default is if it is a root category with sub-categories
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#17
|
|||||||
|
|||||||
Re: add icons next to category names
To display your icon in the category meny u have to copy or raplace the categoriy.tpl with this:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems"> {****************************Add to activate icon*} <img src="{if $c.icon_url}{$c.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&type=C{/if}" alt="" /> {*end of change************************************} {$c.category} </a></font> <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font> <br /> {/foreach} {else} {foreach from=$subcategories item=c key=catid} <font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding} You also have to save your icon in small format or insert limit for widt & height in the text above. Running 4.1.8 |
|||||||
#18
|
|||||||
|
|||||||
Re: add icons netx to category names
Hi Zebu
May I ask how you managed to set an image for each seperate category as you have done on your site. I am not a coder, so please could you show me the step by step process to add, change things within my site files. I feel confident enough to work through my tpl files etc, so long as I have the code and placement location. May I also ask you how you placed your links within the top bar instead of having them show up at the top of the header bar. I am using the same default x-cart template as you have on your site. Thanks for any help and advice you can give me. Regards John
__________________
x-cart gold version 4.1.8 |
|||||||
#19
|
|||||||
|
|||||||
Re: add icons netx to category names
Just bringing this up to the front again.
Anyone able to offer advice here on my questions above. Regards John
__________________
x-cart gold version 4.1.8 |
|||||||
|
|||
X-Cart forums © 2001-2020
|