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

Category Images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-04-2010, 09:25 AM
 
koolie koolie is offline
 

Advanced Member
  
Join Date: Mar 2006
Posts: 35
 

Exclamation Category Images

How can I make a Category image appear on my site? I can add one in the backend however the image doesn't appear in the front end. Do I have to include it within the product description?

I've searched the threads but haven't found a current solution.
__________________
X-Cart : 4.3.0
OS : Linux Red Hat
Location : Wisconsin, USA
Reply With Quote
  #2  
Old 06-04-2010, 09:46 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Category Images

Try this

<img src="{if $current_category.icon_url}{$current_category.icon _url}
{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" />
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #3  
Old 06-04-2010, 12:57 PM
 
koolie koolie is offline
 

Advanced Member
  
Join Date: Mar 2006
Posts: 35
 

Default Re: Category Images

Thanks for your reply - where should I insert that code?
__________________
X-Cart : 4.3.0
OS : Linux Red Hat
Location : Wisconsin, USA
Reply With Quote
  #4  
Old 06-04-2010, 05:12 PM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Category Images

/xcart/skin1/customer/main/subcategories.tpl

Try this after this line:
<h1>{$current_category.category}</h1>

add the following ......

<img src="{if $current_category.icon_url}{$current_category.icon _url}
{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" />
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #5  
Old 11-09-2010, 10:13 PM
  flyclothing's Avatar 
flyclothing flyclothing is offline
 

eXpert
  
Join Date: Aug 2004
Location: Gilbert, AZ
Posts: 357
 

Default Re: Category Images

I tried adding the code above before and it never worked. I just took a look at this again and got it to work. I copied some code right from the subcategories.tpl and put it below the <h1>{$current_category.category}</h1> section. See below. I also took out the x and y coordinates.

<h1>{$current_category.category}</h1>
<img class="subcategory-image" src="{$current_category.icon_url|amp}" alt="{$current_category.category|escape}"{if $current_category.image_x} width="{$current_category.image}"{/if}{if $current_category.image} height="{$current_category.image_y}"{/if} />
__________________
Jonathan
Flyclothing, LLC
PO Box 1490
Gilbert, AZ 85299-1571
P 480.422.7350
F 888.359.2568
www.flysportsgear.com?MMCF_xcartforum (X-Cart 4.5.2) FOR SALE
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 08:30 PM.

   

 
X-Cart forums © 2001-2020