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)
-   -   Number per page (https://forum.x-cart.com/showthread.php?t=56211)

atorres 10-26-2010 12:26 PM

Number per page
 
I'm tying to set a different value per page then the one you set in the options. which line of code would i change in the products_t.tpl file to set it to 3 for example?

Quote:

{*
$Id: featured_t.tpl,v 1.168.2.42 2010/05/07 13:42:05 aim Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=3}
{assign var="is_matrix_view" value=true}
{if $products_matrix}
<table cellspacing="3" class="products products-table width-100" summary="{$lng.lbl_products_list|escape}">
{foreach from=$products_matrix item=row name=products_matrix}
<tr{interline name=products_matrix additional_class="product-name-row"}>
{foreach from=$row item=product name=products}
{if $product}
<td{interline name=products additional_class="product-cell"}>
<div class="image">
<a href="{$product.alt_url|default:$product.page_url| amp}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>
{if $active_modules.Special_Offers && $product.have_offers}
{include file="modules/Special_Offers/customer/product_offer_thumb.tpl"}
{/if}
</div>
</td>
{/if}
{/foreach}
</tr>
<tr{interline name=products_matrix}>
{foreach from=$row item=product name=products}
{if $product}
<td{interline name=products additional_class="product-cell"} style="width: {$cell_width}%;">
<div class="prod_name">
<script type="text/javascript">
<!--
products_data[{$product.productid}] = {ldelim}{rdelim};
-->
</script>
<a href="{$product.alt_url|default:$product.page_url| amp}" class="product-title">{$product.product|escape}</a>
{* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}
{include file="modules/On_Sale/onsale_product_title_display.tpl" sales_map=$product.global_sales_map}{/if}
{* END On Sale :: alteredcart.com *}
</div>
</td>
{/if}
{/foreach}
</tr>
{if $config.Appearance.display_productcode_in_list eq "Y"}
<tr{interline name=products_matrix}>
{foreach from=$row item=product name=products}
{if $product}
<td{interline name=products additional_class="product-cell"}>
{if $product.productcode}
<div class="sku">{$lng.lbl_sku}: {$product.productcode|escape}</div>
{else}
&nbsp;
{/if}
</td>
{/if}
{/foreach}
</tr>
{/if}
{if ($active_modules.Product_Configurator and $is_pconf and $current_product) || $config.Appearance.buynow_button_enabled eq "Y" and $product.product_type ne "C"}
<tr{interline name=products_matrix}>
{foreach from=$row item=product name=products}
{if $product}
<td{interline name=products additional_class="product-cell product-cell-buynow"}>
{if $active_modules.Product_Configurator and $is_pconf and $current_product}
{include file="modules/Product_Configurator/pconf_add_form.tpl"}
{elseif $config.Appearance.buynow_button_enabled eq "Y" and $product.product_type ne "C"}
{include file="customer/main/buy_now.tpl"}
{else}
&nbsp;
{/if}
</td>
{/if}
{/foreach}
</tr>
{/if}
{if $active_modules.Feature_Comparison}
<tr{interline name=products_matrix}>
{foreach from=$row item=product}
{if $product}
<td class="product-cell product-cell-fccheckbox">
{if $product.fclassid gt 0}
{include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$product.productid}
{else}
&nbsp;
{/if}
</td>
{/if}
{/foreach}
</tr>
{/if}

{/foreach}
</table>
{/if}


cflsystems 10-26-2010 02:59 PM

Re: Number per page
 
{list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=3}

atorres 10-27-2010 06:43 AM

Re: Number per page
 
what do i do to it?

cflsystems 10-27-2010 08:17 AM

Re: Number per page
 
Sorry, are you trying to change the number of products per page or the number of products per line?

atorres 10-27-2010 08:18 AM

Re: Number per page
 
per page.

cflsystems 10-27-2010 08:22 AM

Re: Number per page
 
You can't do this from the template files. Products per page are passed to the template by the script. There is a thread in here how to get different number of products per page but involves php changes


All times are GMT -8. The time now is 10:28 AM.

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