![]() |
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. |
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="" /> |
Re: Category Images
Thanks for your reply - where should I insert that code?
|
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="" /> |
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} /> |
All times are GMT -8. The time now is 02:50 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.