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)
-   -   thumbnail columns misbehaving (https://forum.x-cart.com/showthread.php?t=4431)

nerd luv 09-21-2003 06:20 PM

thumbnail columns misbehaving
 
I'm using 3.4.1 and I'm having a display problem. No matter what value I enter my thumbnails will only display in one column. It's always been this way, but I assumed it was because I only had a couple test products in the store. I now have a total of 4 test products and they're still showing in one tall column.

When I DO NOT check "Display only featured products list in multicolumn format" I get the 1 column. When I DO check it, none of the thumbnails show up.

Is the General settings>Appearance options the only place to change this? Any ideas on how to get the thumbnails to display in 3 columns instead of 1?

B00MER 09-24-2003 09:30 PM

3.4.5 this feature works fine for me.

Perhaps upgrading may help?

nerd luv 10-08-2003 07:21 PM

HELP!
 
I'm really not ready to upgrade yet, but shouldn't this work in 3.4.1 anyway?

Can you change a template to override the 1 column that is being displayed? X-Cart code confuses the heck out of me, but it's got to be somewhere in /customer/main/products_t.tpl or /customer/main/products.tpl, correct?

This seems like such a simple, totally necessary function, and I haven't done much template editing yet which might cause this problem. I've done some mods (like funkydunk's meta mod, and 'tell a friend'), but no one else who has used those is mentioning this problem.

PLEASE help me figure out where I can fix this. If there's a way to enter the value "3" columns rather than using an X-Cart template I will gladly do that. Please help!

B00MER 10-08-2003 07:43 PM

Perhaps you could copy the products_t.tpl from 3.4.6 over your existing one and see if that helps?

Code:

{* $Id: products_t.tpl,v 1.4.2.2 2003/08/26 06:06:22 svowl Exp $ *}
<table border=0 width=100% cellpadding=0 cellspacing=0><tr><td class="TableThumbnailBorder">

<table border=0 width=100% cellpadding=5 cellspacing=1>

{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}

{section name=product loop=$products}

{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 align=center valign=top width="{$width}%" bgcolor=#FFFFFF>

{$products[product].product}

<table cellpadding=3 cellspacing=0 border=0><tr><td height=100>
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}

</td></tr>
</table>
{$lng.lbl_see_details}


{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if $products[product].price ne 0}
{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].price lprice=$products[product].list_price format="%d" assign=discount}
<font class=MarketPrice>{$lng.lbl_market_price}: <s>
{include file="currency.tpl" value=$products[product].list_price}
</s></font>

{/if}
<font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font>
<font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}, save {$discount}%{/if}{if $config.Taxes.use_vat eq "Y" and $products[product].vat gt "0"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if}
{else}
<font class=ProductPrice>{$lng.lbl_enter_your_price}</font>
{/if}
{/if}
{*** Uncomment it ***
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}
{/if}
*** Uncomment it ***}
</td>

{capture name=prod_index}
{math equation="index+x+1" index=%product.index% x=$config.Appearance.products_per_row}
{/capture}
{if $smarty.capture.prod_index is div by $config.Appearance.products_per_row }
</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 bgcolor=#FFFFFF></td>
{/section}
</tr>
{/if}

</table>
</td></tr></table>


nerd luv 10-08-2003 09:31 PM

Thanks for the suggestion, but the results are the same. Perhaps it's the products.tpl file?

B00MER 10-09-2003 05:18 AM

Updated customer/products.php should do the trick. Note, I'd keep the above products_t.tpl also. Make sure in Admin->General Settings->Appearance Options that you have a value greater than one for products per row.

:!: Be sure and backup customer/products.php before copying the below code over.

hth. ;)

Code:

<?
/*****************************************************************************\
+-----------------------------------------------------------------------------+
| X-Cart                                                                      |
| Copyright (c) 2001-2003 Ruslan R. Fazliev <rrf@rrf.ru>                      |
| All rights reserved.                                                        |
+-----------------------------------------------------------------------------+
| PLEASE READ  THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" |
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE  |
| AT THE FOLLOWING URL: http://www.x-cart.com/license.php                    |
|                                                                            |
| THIS  AGREEMENT  EXPRESSES  THE  TERMS  AND CONDITIONS ON WHICH YOU MAY USE |
| THIS SOFTWARE  PROGRAM  AND  ASSOCIATED  DOCUMENTATION  THAT  RUSLAN  R. |
| FAZLIEV (hereinafter  referred to as "THE AUTHOR") IS FURNISHING  OR MAKING |
| AVAILABLE TO YOU WITH  THIS  AGREEMENT  (COLLECTIVELY,  THE  "SOFTWARE").  |
| PLEASE  REVIEW  THE  TERMS  AND  CONDITIONS  OF  THIS  LICENSE AGREEMENT |
| CAREFULLY  BEFORE  INSTALLING  OR  USING  THE  SOFTWARE.  BY INSTALLING, |
| COPYING  OR  OTHERWISE  USING  THE  SOFTWARE,  YOU  AND  YOUR  COMPANY |
| (COLLECTIVELY,  "YOU")  ARE  ACCEPTING  AND AGREEING  TO  THE TERMS OF THIS |
| LICENSE  AGREEMENT.  IF  YOU    ARE  NOT  WILLING  TO  BE  BOUND BY THIS |
| AGREEMENT, DO  NOT INSTALL OR USE THE SOFTWARE.  VARIOUS  COPYRIGHTS  AND |
| OTHER  INTELLECTUAL  PROPERTY  RIGHTS    PROTECT  THE  SOFTWARE.  THIS |
| AGREEMENT IS A LICENSE AGREEMENT THAT GIVES  YOU  LIMITED  RIGHTS  TO  USE |
| THE  SOFTWARE  AND  NOT  AN  AGREEMENT  FOR SALE OR FOR  TRANSFER OF TITLE.|
| THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT.      |
|                                                                            |
| The Initial Developer of the Original Code is Ruslan R. Fazliev            |
| Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2003          |
| Ruslan R. Fazliev. All Rights Reserved.                                    |
+-----------------------------------------------------------------------------+
\*****************************************************************************/

#
# $Id: products.php,v 1.31.2.2 2003/06/11 13:55:19 svowl Exp $
#
# Navigation code
#

$objects_per_page = $config["Appearance"]["products_per_page"];

if ($config["General"]["disable_outofstock_products"] == "Y") {
        $current_category["product_count"] = array_pop(func_query_first("SELECT COUNT(*) FROM $sql_tbl[products] WHERE forsale='Y' AND avail>'0' AND (categoryid='$cat' OR categoryid1='$cat' OR categoryid2='$cat' OR categoryid3='$cat')"));
        if (is_array($subcategories)) {
                foreach($subcategories as $k=>$v)
                        $subcategories[$k]["product_count"] = array_pop(func_query_first("SELECT COUNT(*) FROM $sql_tbl[products] WHERE forsale='Y' AND avail>'0' AND (categoryid='$v[categoryid]' OR categoryid1='$v[categoryid]' OR categoryid2='$v[categoryid]' OR categoryid3='$v[categoryid]')"));
                $smarty->assign("subcategories",$subcategories);
        }
}

$total_nav_pages = ceil($current_category["product_count"]/$objects_per_page)+1;

require "../include/navigation.php";

if($active_modules["Advanced_Statistics"])
    include "../modules/Advanced_Statistics/cat_viewed.php";


#
# Get products data for current category and store it into $products array
#
$search_query = "($sql_tbl[products].categoryid='$cat' or $sql_tbl[products].categoryid1='$cat' or $sql_tbl[products].categoryid2='$cat' or $sql_tbl[products].categoryid3='$cat') and $sql_tbl[products].forsale='Y'";

$products = func_search_products($search_query, $user_account['membership'], $first_page,$current_category["product_count"]);
if (count($products) ==0) $products="";

if($active_modules["Subscriptions"]) {
    include "../modules/Subscriptions/subscription.php";
}

$smarty->assign("products",$products);
$smarty->assign("navigation_script","home.php?cat=$cat");
?>


nerd luv 05-20-2004 08:30 PM

3.4.14
 
I stopped working on X-Cart for several months due to several seemingly "unexplainable" errors and have recently started again on version 3.4.14. I'm still having the same problem with thumbnails displaying in 1 column!

The only things I have done are to change standard details in the admin section (shipping & company info, etc.) and add the "Enable/Disable Profile Modified Email from Admin" mod. http://forum.x-cart.com/viewtopic.php?t=3410

Under General Settings > Appearance Options, and I have 3 as "Display products list in multiple columns". I have 7 (test) products displaying all in 1 column.

Has anyone else experienced this? Since the suggestions below did not work, what else could it be?

B00MER 05-21-2004 07:42 AM

Do you have "Display only featured products list in multicolumn format" checked under appearance options?

nerd luv 05-21-2004 06:57 PM

hey that did it this time! thank you for the reminder. hopefully this will stay displaying correctly through the other mods.


All times are GMT -8. The time now is 01:34 AM.

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