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

Number per page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-26-2010, 12:26 PM
 
atorres atorres is offline
 

Member
  
Join Date: Sep 2010
Posts: 18
 

Default 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}
__________________
X-Cart Pro 4.3.2
Reply With Quote
  #2  
Old 10-26-2010, 02:59 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Number per page

{list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=3}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 10-27-2010, 06:43 AM
 
atorres atorres is offline
 

Member
  
Join Date: Sep 2010
Posts: 18
 

Default Re: Number per page

what do i do to it?
__________________
X-Cart Pro 4.3.2
Reply With Quote
  #4  
Old 10-27-2010, 08:17 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Number per page

Sorry, are you trying to change the number of products per page or the number of products per line?
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 10-27-2010, 08:18 AM
 
atorres atorres is offline
 

Member
  
Join Date: Sep 2010
Posts: 18
 

Default Re: Number per page

per page.
__________________
X-Cart Pro 4.3.2
Reply With Quote
  #6  
Old 10-27-2010, 08:22 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 10:54 AM.

   

 
X-Cart forums © 2001-2020