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

How to Hard code a 3 column layout in products_t.tpl?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-22-2008, 07:23 PM
  Christopher728's Avatar 
Christopher728 Christopher728 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: CA
Posts: 46
 

Question How to Hard code a 3 column layout in products_t.tpl?

Hello,
This will sound like a somewhat odd request, but I need to hard code my templates_t.tpl with a 3 column layout. I need it set to "0" in the admin , but hard coded with "3" in this file, cause I'm doing a skin swapping thing.

Below is what I believe to be the controling portion of code from products_tpl, does anyone know how to rewrite it the way I need?

Thanks in advance!

Code:
<table width="100%" cellpadding="5" cellspacing="5"> {math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"} {section name=product loop=$products} {assign var="discount" value=0} {if %product.index% is div by $config.Appearance.products_per_row} <tr> {assign var="cell_counter" value=0} {/if} {math equation="x+1" x=$cell_counter assign="cell_counter" } <td width="{$width}%" class="PListCell">
__________________
X-cart versions 4.1.11, 4.1.9 & 4.1.8
Reply With Quote
  #2  
Old 10-22-2008, 11:52 PM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: How to Hard code a 3 column layout in products_t.tpl?

Try chaning all references to:
$config.Appearance.products_per_row

with 3
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 10-23-2008, 12:59 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: How to Hard code a 3 column layout in products_t.tpl?

Yes, you should change all instances of $config.Appearance.products_per_row to 3.
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
  #4  
Old 10-23-2008, 06:44 AM
  Christopher728's Avatar 
Christopher728 Christopher728 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: CA
Posts: 46
 

Default Re: How to Hard code a 3 column layout in products_t.tpl?

Thanks to both of you, that worked.

I thought I had tried that, but I had missed 3 more instances of it further down in the page.
__________________
X-cart versions 4.1.11, 4.1.9 & 4.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 05:56 AM.

   

 
X-Cart forums © 2001-2020