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

add icons netx to category names

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 10-19-2006, 01:36 PM
 
zebu zebu is offline
 

eXpert
  
Join Date: Oct 2006
Posts: 310
 

Default 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
Reply With Quote
  #12  
Old 10-19-2006, 04:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
Reply With Quote
  #13  
Old 12-17-2006, 02:40 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default Re: add icons netx to category names

Quote:
Originally Posted by ranger82nd
What if I wanted a different icon for each category?

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
Reply With Quote
  #14  
Old 01-16-2007, 02:32 AM
 
Wallace Wallace is offline
 

Member
  
Join Date: Jan 2007
Posts: 26
 

Arrow 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
Reply With Quote
  #15  
Old 01-17-2007, 06:28 AM
 
Wallace Wallace is offline
 

Member
  
Join Date: Jan 2007
Posts: 26
 

Default 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
Reply With Quote
  #16  
Old 01-17-2007, 06:31 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
Reply With Quote
  #17  
Old 11-14-2007, 12:43 PM
 
terje@hyttevakt.no terje@hyttevakt.no is offline
 

Newbie
  
Join Date: Sep 2007
Posts: 1
 

Default 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}&amp;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
__________________
Terje
4.1.8
www.hyttevakt.no/provak
Reply With Quote
  #18  
Old 04-30-2009, 03:51 AM
 
JMC JMC is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 35
 

Default 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
Reply With Quote
  #19  
Old 05-07-2009, 11:41 AM
 
JMC JMC is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 35
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 09:27 AM.

   

 
X-Cart forums © 2001-2020