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

How to set 2 different column numbers?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-18-2015, 04:39 AM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 307
 

Default How to set 2 different column numbers?

How to let category a display 2 columns, and let category b display 3 columns, pls?
Reply With Quote
  #2  
Old 11-19-2015, 02:06 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How to set 2 different column numbers?

This really depends on how you want to do this. I think I would handle it with CSS.

Just add in your products_t.tpl somewhere a class definition associated with categoryid.

I'm assuming the categoryid is assigned to Smarty, and it is something like this {$cat} = 123

So in the container div you could do something like this:
Code:
<div class="products{if $cat != ''}cat-{$cat}{/if}">

Then you can add CSS specific to that category.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 11-22-2015, 02:12 PM
 
cheap eyeglasses cheap eyeglasses is offline
 

Senior Member
  
Join Date: Oct 2010
Posts: 143
 

Default Re: How to set 2 different column numbers?

i am planning to use 2 different categories templates for www.loupesusa.com , because i may add other text block or images at different places of different template.
Reply With Quote
  #4  
Old 11-23-2015, 05:39 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How to set 2 different column numbers?

If you want to use different category templates entirely, just add a checkbox on the category page in admin. I have tutorials that will guide you through that, just click the link in my signature.

Then in the templates, check if the checkbox is checked and switch category templates based on that.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
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 07:24 AM.

   

 
X-Cart forums © 2001-2020