X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Category Images (https://forum.x-cart.com/showthread.php?t=54046)

koolie 06-04-2010 09:25 AM

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.

Lingerieblowout 06-04-2010 09:46 AM

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="" />

koolie 06-04-2010 12:57 PM

Re: Category Images
 
Thanks for your reply - where should I insert that code?

Lingerieblowout 06-04-2010 05:12 PM

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="" />

flyclothing 11-09-2010 10:13 PM

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.