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

Adding category banners

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-20-2010, 01:05 AM
 
madason2k madason2k is offline
 

Newbie
  
Join Date: Apr 2010
Posts: 5
 

Default Adding category banners

Hi,

I want to add a banner to the top of every category but aren't sure where it goes (i was hoping to just do it by CSS). Anyone got any pointers?

A banner under the "CPU's" header would be great as shown here: http://www.freshtechsolutions.co.uk/home.php?cat=70

Thanks for your time and any help is appriciated.
__________________
4.4.1


www.freshtechsolutions.co.uk
Reply With Quote
  #2  
Old 10-20-2010, 01:25 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Adding category banners

Your signature says 4.4.2, yet it's not out yet

Can't you just add banner image as category icons in category admin?

Or, for v4.4.1 (assuming light and lucid skin)

skin/common_files/customer/subcategories.tpl

Insert...

Code:
{if $cat eq "70"}<img src="{$ImagesDir}/banners/70.jpg" />{/if}

Or if you are prepared to make banners for every category...

Code:
<img src="{$ImagesDir}/banners/{$cat}.jpg" />
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 10-22-2010, 03:07 AM
 
madason2k madason2k is offline
 

Newbie
  
Join Date: Apr 2010
Posts: 5
 

Default Re: Adding category banners

Its not showing for some reason.

I have this in the subcategories.tpl:

<h3{if $class} class="{$class}"{/if}>{$title}</h3>
{if $cat eq "443" OR "444"}<img src="{$ImagesDir}/amd.jpg" />{/if}
__________________
4.4.1


www.freshtechsolutions.co.uk
Reply With Quote
  #4  
Old 10-22-2010, 03:09 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Adding category banners

Use...
Code:
{if $cat eq "443" || $cat eq "444"}
__________________
xcartmods.co.uk
Reply With Quote
  #5  
Old 10-25-2010, 12:05 AM
 
madason2k madason2k is offline
 

Newbie
  
Join Date: Apr 2010
Posts: 5
 

Default Re: Adding category banners

still no luck :/
__________________
4.4.1


www.freshtechsolutions.co.uk
Reply With Quote
  #6  
Old 10-25-2010, 08:46 AM
 
peddler peddler is offline
 

Senior Member
  
Join Date: May 2007
Posts: 140
 

Default Re: Adding category banners

Try this:

Code:
{if $current_category.categoryid eq "443" or "444"}<img src="{$ImagesDir}/amd.jpg" />{/if}


Generally.. use lower-case boolean in smarty tpl files: and, or, ne, eq, etc. and use symbolic boolean in php files and javascript entries within tpl files: &&, ||, ==, !, etc

But mix-and-match works.. generally.
__________________
Ralph
X-Cart v4.4.2 Gold (still buggy, some are new ones)
PHP 5.2.13
Reply With Quote
  #7  
Old 10-25-2010, 09:16 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: Adding category banners

Quote:
Originally Posted by madason2k
Hi,

I want to add a banner to the top of every category but aren't sure where it goes (i was hoping to just do it by CSS). Anyone got any pointers?

A banner under the "CPU's" header would be great as shown here: http://www.freshtechsolutions.co.uk/home.php?cat=70

Thanks for your time and any help is appriciated.


Correct me if I am mistaken? Why go through all that trouble? Just go in admin - Categories - "Choose your category" and then click on Modify category and then in your Description area put a banner there

Here is an example on my site http://www.customoid.co.uk/miscellaneous/
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #8  
Old 11-02-2010, 08:11 AM
 
Snowrev Snowrev is offline
 

Member
  
Join Date: Oct 2010
Posts: 24
 

Default Re: Adding category banners

If you were to do this, could you display a scaled down version of the same image on every product page per manufacturer?

If so where could you apply the code to display the banner above the product description?

Where would you upload the files?

What could would you use for that?
__________________
John Centi
SNOWREV
SUBURBAN BLEND
X Cart 4.4.1
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 06:11 AM.

   

 
X-Cart forums © 2001-2020