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

Different Column Number Based on Category

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-22-2008, 11:44 PM
 
anela2003 anela2003 is offline
 

Senior Member
  
Join Date: Nov 2007
Posts: 103
 

Default Different Column Number Based on Category

I was looking through the boards and could not find anything that was even remotely similar to my question.

I'd like something like this:

{if $cat eq "342"}
then number of columns 4
{else}
number of columns 3
{/if}

This is for my main categories, by the way.

I tried editing the Appearance.products_per_row, x, %product.index% and any other variable or equation possible in products.tpl and products_t.tpl, but nothing ever does anything. It stubbornly just keeps the 3-column display.


Does anyone have anything that I can do that I haven't done already (=has not been said on these boards already)?


No paid mods, please (I got burnt before).


Thanks.
__________________
4.1.9 Gold

window valances | curtains
Reply With Quote
  #2  
Old 08-23-2008, 02:17 AM
  Piotr M.'s Avatar 
Piotr M. Piotr M. is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 134
 

Default Re: Different Column Number Based on Category

Insert this code at the very top of products_t.tpl
Code:
{if $cat eq 23}{assign var=products_per_row value="2"}{else}{assign var=products_per_row value="3"}{/if}

Then replace $config.Appearance.products_per_row with $products_per_row in the file.
__________________
Regards,
Piotr Markushin

X-Cart PDF Catalog Generator NEW
Professional X-Cart Skins Store (7 new skins added in August 2008!)

ahedOffice.com - Web 2.0 Online Groupware
Reply With Quote
  #3  
Old 08-23-2008, 12:44 PM
 
anela2003 anela2003 is offline
 

Senior Member
  
Join Date: Nov 2007
Posts: 103
 

Default Re: Different Column Number Based on Category

Does a weird design with 3, 1, 2 and 2 products per row. Strange.
__________________
4.1.9 Gold

window valances | curtains
Reply With Quote
  #4  
Old 08-23-2008, 02:59 PM
  Piotr M.'s Avatar 
Piotr M. Piotr M. is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 134
 

Default Re: Different Column Number Based on Category

You probably missed $config.Appearance.products_per_row occurence.
All of them must be replaced with $products_per_row
__________________
Regards,
Piotr Markushin

X-Cart PDF Catalog Generator NEW
Professional X-Cart Skins Store (7 new skins added in August 2008!)

ahedOffice.com - Web 2.0 Online Groupware
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 03:44 PM.

   

 
X-Cart forums © 2001-2020