X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to Hard code a 3 column layout in products_t.tpl? (https://forum.x-cart.com/showthread.php?t=43175)

Christopher728 10-22-2008 07:23 PM

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">


pauldodman 10-22-2008 11:52 PM

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

Holub 10-23-2008 12:59 AM

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.

Christopher728 10-23-2008 06:44 AM

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.


All times are GMT -8. The time now is 01:41 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.