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 get 4 products a row on products.tpl? (https://forum.x-cart.com/showthread.php?t=39197)

davidsaldana 12-15-2008 08:28 PM

Re: how to get 4 products a row on products.tpl?
 
I just went straight into the database and changed it to 4, and then changed products.tpl to less than 5. worked like a charm.

cbostard 01-04-2009 10:46 AM

Re: how to get 4 products a row on products.tpl?
 
how did you change the code in database? where to find file?
im using version 4.1.11

pfarcus 01-06-2009 01:43 PM

Re: how to get 4 products a row on products.tpl?
 
Hi,

I put the code from #6 replacing this: {section name=product loop=$products}bla bla{/section} but nothing happened, I'm not getting an error but its still 3 products per column. (or row) Is it because I am using version 4.2?

thx for your help.

pfarcus 01-16-2009 09:28 AM

Re: how to get 4 products a row on products.tpl?
 
Is this thread dead? Anyone ever get it to work in 4.1.11?

cbostard 01-18-2009 02:22 PM

Re: how to get 4 products a row on products.tpl?
 
i tried to combine post #6 and products_t.tpl and put it in products.tpl , im on version 4.1.11 and got it to work pretty good but it needs some product name and sku realigning I will paste code below and if anyone can help refine this please add toit in here

Quote:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div class="product_records_container" style="margin-bottom: 2px; border #474747 ">
<table cellspacing="0" cellpadding="0" width="620" border="5">
<tbody>
<tr>
<td>
<table width="100%" cellpadding="5" cellspacing="1">
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{section name=product loop=$products}
{assign var="discount" value=0}
<td>
<table id="ctl00_cpContentArea_dlProductRecords" style="border-collapse: collapse;" cellspacing="1px" cellpadding="3px">
<tbody>
<tr>
<td valign="top">
<div class="prod_box">
<a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}" class="ProductTitle">{$products[product].product}</a><br />
{if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
{$lng.lbl_sku}: {$products[product].productcode}<br />
{/if}
<table cellpadding="3" cellspacing="0" width="100%">
<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}">
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=130 image_y=130 product=$products[product].product tmbn_url=$products[product].tmbn_url}</a>
{if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""}
{include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]}
{/if}
<p <font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</font><br /><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if}
{if $products[product].taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes is_subtax=true}{/if}
</p>
</div></td>
</tr>
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}
{/if}
</tbody>
</table>
</td>

{if ($smarty.section.product.iteration is div by 4) and not ($smarty.section.product.last)}</tr><tr>{/if}

{/section}
{if $cell_counter lt $config.Appearance.products_per_row}
{section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter}
<td class="SectionBox"> </td>
{/section}
</tr>
{/if}
</table>
</td>
</tr>
</table>
{if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y' && $products_has_fclasses && $js_enabled}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
{/if}

pfarcus 01-18-2009 03:05 PM

Re: how to get 4 products a row on products.tpl?
 
cool, hey could you dumb it down a bit for me? Where would I paste it and would I paste the whole thing? (i'm still a copy paster)

thx a lot!

cbostard 01-18-2009 03:09 PM

Re: how to get 4 products a row on products.tpl?
 
copy and paste the entire thing thus replacing everything in products.tpl but make a back up copy somewhere on your local computor

this script basically is the new products.tpl located in Skin1/customer/main/products.tpl

pfarcus 01-18-2009 04:55 PM

Re: how to get 4 products a row on products.tpl?
 
dang, I did that and nothing seems to have happened, still 3 products per row. (tried entering 4 into the option box too)

?
Thx

pfarcus 01-19-2009 05:34 PM

Re: how to get 4 products a row on products.tpl?
 
Hey you were right, I was in skin1/main, i didn't realize there were more than 1 products.tpl, thanks! (its skin1/customer/main/products.tpl)

It works! I changed it to 5 per row too. The product name is bumping the top of the thumbnail on some, I can try and mess with that I guess.

Thanks again!

spence88mph 01-20-2009 12:34 PM

Re: how to get 4 products a row on products.tpl?
 
Has anyone got this to work on 4.2, the product.tpl is different, instead of a value of 4 it has &&.


All times are GMT -8. The time now is 03:59 AM.

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