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)
-   -   More than 3 columns product display (https://forum.x-cart.com/showthread.php?t=31624)

amcc 06-03-2007 10:26 PM

More than 3 columns product display
 
I have used appearance options to get a 3 column display. But I want a 5 column display, how is this possible?

PhilJ 06-04-2007 01:39 AM

Re: More than 3 columns product display
 
In skin1/customer/main/products.tpl

change...
Code:

$config.Appearance.products_per_row lt 4
to...
Code:

$config.Appearance.products_per_row lt 6

amcc 06-04-2007 08:26 PM

Re: More than 3 columns product display
 
Thanks, however it didn't work. My appearance options are set to 0 columns and products.tpl now looks like:

$config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 6 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")}

Any ideas on what else I need to do?

balinor 06-05-2007 02:26 AM

Re: More than 3 columns product display
 
Well you would also need to change your appearance options to 5 :)

amcc 06-05-2007 04:41 PM

Re: More than 3 columns product display
 
Cheers thanks, I thought I had already tried it and it didn't work. Works fine this time though.

sjbt 10-09-2007 01:36 PM

Re: More than 3 columns product display
 
Quote:

Originally Posted by PhilJ
In skin1/customer/main/products.tpl

change...
Code:

$config.Appearance.products_per_row lt 4
to...
Code:

$config.Appearance.products_per_row lt 6



I'm trying to troubleshoot why, when I have appearance set to 3, I still get only one column. I think it's because of the skin I'm using. I like this skin otherwise so I'm wondering where in this template this code should go?

Thanks

balinor 10-09-2007 01:40 PM

Re: More than 3 columns product display
 
What skin would that be?

sjbt 10-09-2007 01:57 PM

Re: More than 3 columns product display
 
7Dana's Blue
http://www.7dana.com/shop/X-Cart-7Blue-p-28.html

The category page has stylized rows of alternating colors.

balinor 10-09-2007 02:01 PM

Re: More than 3 columns product display
 
Going to need to ask 7dana about that, as I doubt they want you posting their code here :)

sjbt 10-09-2007 02:24 PM

Re: More than 3 columns product display
 
All I wanted was to know where it normally goes. Didn't plan to post proprietary code.

Thanks

balinor 10-09-2007 02:34 PM

Re: More than 3 columns product display
 
As mentioned above, the control is in customer/main/products.tpl. IT basically checks to see what the number of columns is set to in the config settings. If it is more than 1, it goes to products_t.tpl, if not, it displays products.tpl

sjbt 10-10-2007 07:46 AM

Re: More than 3 columns product display
 
Thanks. Problem is resolved. Was a dumb error on my part.

Rajasekhar 06-16-2008 02:16 PM

Re: More than 3 columns product display
 
Quote:

Originally Posted by balinor
Well you would also need to change your appearance options to 5 :)


Hi Balinor, I opened a new thread for this question, just now I found your answer in some other thread. I did that code change to 5 in products.tpl and in the appearance options, it takes only upto 3, if I give 4 or more, it says invalid data entry. can you help me with this.

Thanks

carpeperdiem 06-16-2008 02:19 PM

Re: More than 3 columns product display
 
Quote:

Originally Posted by Rajasekhar
I opened a new thread for this question


no need. duplicate thread deleted.

abeight 06-25-2008 06:54 AM

Re: More than 3 columns product display
 
I have used this trick many times in the past, but it seems that it doesn't work in 4.1.10. When I try to enter the # of columns that I want in the general settings it says that it's an invalid entry. Has anyone found a way around this?

Rajasekhar 06-25-2008 08:35 AM

Re: More than 3 columns product display
 
I managed to do this, you just need do the change in database after modifying the products.tpl file. It works.

  • Change the code in customer\main\products.tpl. change that number on line 6.
  • In the database, table “x-cart_config”, search for the field: “products_per_row”, edit the field, change the “value” to 6. In this case you don’t have to do any changes from admin-appearance options.

If you want to get the control from admin, then, do the code change as in point 1 above,
  • In the database, table “x-cart_config”, search for the field: “products_per_row”, edit the field, change the “validation” ^[0-6]?$
  • Then, you can change the number from the admin-apperance options.
Thanks

abeight 06-25-2008 08:41 AM

Re: More than 3 columns product display
 
Thank you! :)

rayjohnson 05-06-2009 10:22 PM

Re: More than 3 columns product display
 
I manged to change the settings in the database, but the products.tpl in 4.2.1 does not let you change the number of rows...take a look:

Quote:

{*
$Id: products_t.tpl,v 1.46 2008/12/10 08:29:52 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{list2matrix assign="products_matrix" assign_width="cell_width" list=$products row_length=$config.Appearance.products_per_row}
{assign var="is_matrix_view" value=true}

{if $products_matrix}

{foreach from=$products_matrix item=row name=products_matrix}

{foreach from=$row item=product}

<div class="PListCell" onmouseover="this.className='PListCellHover'" onmouseout="this.className='PListCell'">
<div class="PListCellInside">
{if $product}
<a href="product.php?productid={$product.productid}&a mp;cat={$cat}&amp;page={$navigation_page}" class="product-title">{$product.product|escape}</a>
{if $config.Appearance.display_productcode_in_list eq "Y" && $product.productcode}
<div class="sku">{$lng.lbl_sku}: {$product.productcode|escape}</div>
{/if}

{/if}


{if $product}
<div class="image">
<a href="product.php?productid={$product.productid}&a mp;cat={$cat}&amp;page={$navigation_page}">{includ e 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>
{/if}



{if $product}
{if $active_modules.Feature_Comparison && $product.fclassid gt 0}
<div align="center">{include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$product.productid}</div>
{/if}
{/if}



{if $product}
{if $product.product_type ne "C"}

{if $active_modules.Subscriptions ne "" && $product.catalogprice}

{include file="modules/Subscriptions/subscription_info_inlist.tpl"}

{elseif $product.appearance.is_auction}

<span class="price">{$lng.lbl_enter_your_price}</span><br />
{$lng.lbl_enter_your_price_note}

{else}

{if $product.appearance.has_price}

<div class="price-row">
<span class="price">{$lng.lbl_our_price}:</span> <span class="price-value">{include file="currency.tpl" value=$product.taxed_price}</span>
<span class="market-price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span>
</div>

{if $product.appearance.has_market_price && $product.appearance.market_price_discount gt 0}
<div class="market-price">
{$lng.lbl_market_price}: <span class="market-price-value">{include file="currency.tpl" value=$product.list_price}</span>

{if $product.appearance.market_price_discount gt 0}
{if $config.General.alter_currency_symbol ne ""} {/if}<br />
<span class="price-save">{$product.appearance.market_price_discount}% {$lng.lbl_save_price}</span>
{/if}

</div>
{/if}

{if $product.taxes}
<div class="taxes">{include file="customer/main/taxed_price.tpl" taxes=$product.taxes is_subtax=true}</div>
{/if}

{/if}

{if $active_modules.Special_Offers && $product.use_special_price}
{include file="modules/Special_Offers/customer/product_special_price.tpl"}
{/if}

{/if}

{else}

&nbsp;

{/if}


{/if}

<br />

{if $product}
{if $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl"}
{else}
&nbsp;
{/if}
{/if}


</div>
</div>

{/foreach}
{/foreach}
{/if}


rayjohnson 05-06-2009 10:23 PM

Re: More than 3 columns product display
 
Sorry...that was the products-t.tpl....here is the products.tpl

Quote:

{*
$Id: products.tpl,v 1.80 2008/10/29 16:50:14 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{if $products}

{if $active_modules.Feature_Comparison && !$printable && $products_has_fclasses}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
<script type="text/javascript" src="{$SkinDir}/modules/Feature_Comparison/products_check.js"></script>
{/if}

{if $config.Appearance.products_per_row && ($featured eq "Y" || $config.Appearance.featured_only_multicolumn eq "N")}

{include file="customer/main/products_t.tpl"}

{else}

{include file="customer/main/products_list.tpl"}

{/if}

{if $active_modules.Feature_Comparison && !$printable && $products_has_fclasses}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
{/if}

{/if}



All times are GMT -8. The time now is 07:36 AM.

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