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)
-   -   How can I display the category icon on every page? (https://forum.x-cart.com/showthread.php?t=17074)

mikelynch 10-04-2005 09:31 AM

How can I display the category icon on every page?
 
Please could someone help?

I am running Xcart version 4.0.14

How can I make the category icon display on every page?

By default it on seems to display on category pages that include subcategories.

Thanx :?

balinor 10-10-2005 06:27 AM

You will need to edit subcategories.tpl....there is an {if} statement in there that tells X-Cart to only display the icon on pages with sub-categories...

mikelynch 10-10-2005 07:00 AM

Thanks for your response.

Do you know which (if) statement or what I need to change it to?

I've never edited the templates before and am a bit confused by them.

balinor 10-11-2005 04:40 AM

Ok, open up skin1/customer/main/subcategories.tpl and replace this:

Code:

{if $subcategories}
{if $tmp} [img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img] {/if}


with this:

Code:

[img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img]
{if $subcategories}


Be sure and make a backup of your current template first. Haven't tested this, but it should work.

mikelynch 10-11-2005 07:10 AM

That done the trick

Thanks

mikelynch 10-27-2005 05:47 AM

Sorry, one more question.

The category photo now displays next tro the first item which sometimes causes the description text to run off the end of the page.

Is there any way to make the category photo appear above all the items?

Thanks

balinor 10-27-2005 05:50 AM

Either put the category icon and description in a different table cell, or add a few
or

tags in there.

mikelynch 10-27-2005 06:19 AM

I don't really understand the code very well.

Please could you tell me exactly what I need to change it to?

I think this is the piece of code I need to change:

[img]{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img]
{if $subcategories}

balinor 10-27-2005 06:23 AM

Yes, replace that bit of code with this:

Code:

[img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img]



{if $subcategories}


Add or remove
tags as required to get the correct spacing.

Realsecurity 11-17-2005 12:50 PM

I had this done by X-cart, i wanted an icon for each catagory whether there was subs or not in there, if you know html or have and editor like dreamweaver then use this to create your product layout, instead of typing text in tehe description boxes i use html gives much more control over the layout with out needing to be a php guru......

this was to stop your text running of the screen.


All times are GMT -8. The time now is 01:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.