| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Category Images | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 |
|||||||
#2
|
|||||||
|
|||||||
Re: Category Images
Try this
<img src="{if $current_category.icon_url}{$current_category.icon _url} {else}{$xcart_web_dir}/image.php?id={$cat}&type=C{/if}" alt="" />
__________________
http://www.lingerieblowout.com Version 4.1.10 http://www.topnichewebsites.com Version 4.4.5 Michael |
|||||||
#3
|
|||||||
|
|||||||
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 |
|||||||
#4
|
|||||||
|
|||||||
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}&type=C{/if}" alt="" />
__________________
http://www.lingerieblowout.com Version 4.1.10 http://www.topnichewebsites.com Version 4.4.5 Michael |
|||||||
#5
|
|||||||||
|
|||||||||
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 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|