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

How can I display the category icon on every page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-04-2005, 09:31 AM
 
mikelynch mikelynch is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 16
 

Default 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
__________________
Version 4.0.14
Reply With Quote
  #2  
Old 10-10-2005, 06:27 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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...
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-10-2005, 07:00 AM
 
mikelynch mikelynch is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 16
 

Default

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.
__________________
Version 4.0.14
Reply With Quote
  #4  
Old 10-11-2005, 04:40 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-11-2005, 07:10 AM
 
mikelynch mikelynch is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 16
 

Default

That done the trick

Thanks
__________________
Version 4.0.14
Reply With Quote
  #6  
Old 10-27-2005, 05:47 AM
 
mikelynch mikelynch is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 16
 

Default

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
__________________
Version 4.0.14
Reply With Quote
  #7  
Old 10-27-2005, 05:50 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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

tags in there.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 10-27-2005, 06:19 AM
 
mikelynch mikelynch is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 16
 

Default

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}
__________________
Version 4.0.14
Reply With Quote
  #9  
Old 10-27-2005, 06:23 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 11-17-2005, 12:50 PM
 
Realsecurity Realsecurity is offline
 

Senior Member
  
Join Date: Apr 2005
Location: Bexhill
Posts: 128
 

Default

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.
__________________
SURECOM XCART V4.1.8
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 01:55 PM.

   

 
X-Cart forums © 2001-2020