Non mi visualizza immagini

Postate qui discussioni di carattere generale riguardo a problemi di installazione e configurazione di osCommerce

Moderatore: mod Generali

Rispondi
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Non mi visualizza immagini

Messaggio da pietro »

Salve
sono nuovo sia di questo forum che nell'utilizzo di OSCommerce.
Sto creando un sito utilizzando OSCOmmerce 2.2rc2a ed un template che si chiama Flower.
Il problema che ho è questo:
Nella home page del sito vi sono a sinistra le categorie dei prodotti. Cliccandoci sopra mi compare la pagina con la lista dei prodotti appartenente a quella categoria ma senza immagine, ossia dove dovrebbe comparire l'immagine mi ci scrive il nome, mentre nel listato dovrebbe comparire l'immagine. Ho provato a modificare la pagina PRODUCT_LISTING.PHP ma senza esito. potreste aiutarmi? Vi allego il listato della index.php (che funziona bene) e della product_listing (che non mi visualizza l'immagine dei prodotti).
Grazie in anticipo

FILE INDEX.PHP

<?php
/*
$Id: index.php,v 1.1 2005/08/11 17:37:59 hpdl Exp $

E-Commerce Solutions

Copyright (c) 2005 www.flash-template-design.com

Released under the GNU General Public License
*/

require('includes/application_top.php');

// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<!--<link rel="stylesheet" type="text/css" href="stylesheet.css">-->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<tr>
<td width="160" align="right" valign="top">
<table width="158" cellpadding="0" cellspacing="0" border="0">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</table>
</td>
<td width="549" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="549">
<tr>

<?php
if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
?>
<td width="100%" class="green" height="25" valign="top" style=" background:#235704 url(images/green_bg.gif) repeat-x bottom; padding-top:3px;" align="right"><?php echo HEADING_TITLE; ?><table border="0" cellpadding="0" cellspacing="0"><?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

include(DIR_WS_BOXES . 'currencies.php');
}?></table></td>
</tr>
<!--<tr>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>-->
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<?php
if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
$category_links = array_reverse($cPath_array);
for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
$categories = tep_db_fetch_array($categories_query);
if ($categories['total'] < 1) {
// do nothing, go through the loop
} else {
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
break; // we've found the deepest category the customer is in
}
}
} else {
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
}

$number_of_categories = tep_db_num_rows($categories_query);

$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
$rows++;
$cPath_new = tep_get_path($categories['categories_id']);
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
echo ' </tr>' . "\n";
echo ' <tr>' . "\n";
}
}

// needed for the new products module shown below

$new_products_category_id = $current_category_id;
?>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
</tr>
</table></td>
</tr>
</table></td>
<?php
} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
switch ($column_list[$i]) {
case 'PRODUCT_LIST_MODEL':
$select_column_list .= 'p.products_model, ';
break;
case 'PRODUCT_LIST_NAME':
$select_column_list .= 'pd.products_name, ';
break;
case 'PRODUCT_LIST_MANUFACTURER':
$select_column_list .= 'm.manufacturers_name, ';
break;
case 'PRODUCT_LIST_QUANTITY':
$select_column_list .= 'p.products_quantity, ';
break;
case 'PRODUCT_LIST_IMAGE':
$select_column_list .= 'p.products_image, ';
break;
case 'PRODUCT_LIST_WEIGHT':
$select_column_list .= 'p.products_weight, ';
break;
}
}

// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
}
} else {
// show the products in a given categorie
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from ((" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "' ";
}
}

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by pd.products_name";
break;
}
}
} else {
$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
$sort_order = substr($HTTP_GET_VARS['sort'], 1);
$listing_sql .= ' order by ';
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_MODEL':
$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_QUANTITY':
$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_IMAGE':
$listing_sql .= "pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
}
}
?>
<td width="100%" valign="top" align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="right" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
<tr>
<td width="100%" class="green" height="25" valign="top" style=" background:#235704 url(images/green_bg.gif) repeat-x bottom; padding-top:3px;" >
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="left" width="50%" style="padding-left:4px; color:#DFFFBA; font-weight:bold; text-transform:uppercase;"><?php
//show category name
if (!isset($HTTP_GET_VARS['manufacturers_id']))
{
$cat='SELECT categories_id, language_id , categories_name FROM categories_description WHERE categories_id = '.(int)$current_category_id.' AND language_id = '.(int)$languages_id.' LIMIT 0, 30 ';
$cat=tep_db_query($cat);
$cat = tep_db_fetch_array($cat);
echo $cat['categories_name'];
}
else
{
$cat='SELECT manufacturers_name FROM '. TABLE_MANUFACTURERS .' WHERE manufacturers_id = '.$HTTP_GET_VARS['manufacturers_id'].' LIMIT 0, 30 ';
$cat=tep_db_query($cat);
$cat = tep_db_fetch_array($cat);
echo $cat['manufacturers_name'];
}
?>

</td>
<td>
<table border="0" width="50%" cellpadding="0" cellspacing="0">
<?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'currencies.php');
}?>
</table>
</td>
</tr></table>

</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td>
</tr>
<tr>
<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
<?php
} else { // default page
?>
<td width="100%" class="green" height="25" valign="top" style=" background:#235704 url(images/green_bg.gif) repeat-x bottom; padding-top:3px;" align="right"><table border="0" cellpadding="0" cellspacing="0"><?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

include(DIR_WS_BOXES . 'currencies.php');
}?></table></td>
</tr>
<tr>
<td width="549" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="534">
<tr>
<td width="244" height="158" valign="top" style="padding-top:8px; padding-left:10px;" align="left"><img src="images/welcome.jpg" width="232" height="24" alt="" />
<br/>
<img src="images/str_head.gif" width="9" height="5" hspace="2" vspace="1"/><span class="crimson">Defui et pertin saepius refero hedreio.</span><br/>
Ea quia nostrud sagaciter ullamcorper, nequeuer adsum accumsan, vellit melior ullamcorper. Similis gravis augue rerit minim vulputate refoveo.

</td>
<td width="280" height="158" align="right" valign="top" style="padding-top:8px;"><img src="images/piano.jpg" width="270" height="148" alt="" /></td>
</tr>
<tr>
<td colspan="2" background="images/crimson_points.gif" align="left" width="100%" height="3"><img src="images/crimson_points.gif" width="3" height="3" alt="" /></td>
</tr>
<tr>
<td width="534" colspan="2"><?php include(DIR_WS_MODULES . 'special_products.php'); ?></td>
</tr>
<tr>
<td colspan="2" width="100%"><img src="images/proposition.jpg" width="534" height="123" alt="super proposition" /></td>
</tr>
</table>
</td>
</tr>
<tr>

</tr>
</table>
</td>
</tr>
<?php
}
?>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->


</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>



************************************
FILE PRODUCT_LISTING.PHP
*************************************

<?php
/*
$Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

E-Commerce Solutions

Copyright (c) 2005 www.flash-template-design.com

Released under the GNU General Public License
*/

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>
</table>
<?php
}

$list_box_contents = array();

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_text = TABLE_HEADING_MODEL;
$lc_align = '';
break;
case 'PRODUCT_LIST_NAME':
$lc_text = TABLE_HEADING_PRODUCTS;
$lc_align = '';
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_text = TABLE_HEADING_MANUFACTURER;
$lc_align = '';
break;
case 'PRODUCT_LIST_PRICE':
$lc_text = TABLE_HEADING_PRICE;
$lc_align = 'center';
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_text = TABLE_HEADING_QUANTITY;
$lc_align = 'right';
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_text = TABLE_HEADING_WEIGHT;
$lc_align = 'right';
break;
case 'PRODUCT_LIST_IMAGE':
$lc_text = TABLE_HEADING_IMAGE;
$lc_align = 'center';
break;
case 'PRODUCT_LIST_BUY_NOW':
$lc_text = TABLE_HEADING_BUY_NOW;
$lc_align = 'center';
break;
}

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

// $list_box_contents[0][] = array('align' => $lc_align,
// 'params' => 'class="productListing-heading"',
// 'text' => ' ' . $lc_text . ' ');
}

if ($listing_split->number_of_rows > 0) {
$rows = 0;
$col=0;
$listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
/* $rows++;

if (($rows/2) == floor($rows/2)) {
$list_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$list_box_contents[] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($list_box_contents) - 1;
*/
/*for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
$lc_align = '';

switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = ' ' . $listing['products_model'] . ' ';
break;
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a class="productListing-link" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
} else {
$lc_text = ' <a class="productListing-link" href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
break;
case 'PRODUCT_LIST_PRICE':
$lc_align = 'right';
if (tep_not_null($listing['specials_new_products_price'])) {
$lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
} else {
$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
}
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_align = 'right';
$lc_text = ' ' . $listing['products_quantity'] . ' ';
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_align = 'right';
$lc_text = ' ' . $listing['products_weight'] . ' ';
break;
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
}
break;
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
}

$list_box_contents[$cur_row][] = array('align' => $lc_align,
'params' => 'class="productListing-data"',
'text' => $lc_text);
}*/
$listing['products_name'] = tep_get_products_name($listing['products_id']);

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$listing['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);
$description['products_description'] = substr($description['products_description'], 0, 65);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';


$list_box_contents[$rows][$col] = array('align' => 'center',
'params' => 'width="33%" style="padding-top:2px;"',
'text' => '<table border="0" cellpadding="0" cellspacing="0"><tr><td align="center" style="padding-bottom:8px; padding-top:4px;"><div style=" width:140px; height:106px; border:1px solid #3A3236;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div></td></tr></table>');

$col ++;
if ($col >2) {
$col = 0;
$rows ++;
}
}
// new productListingBox($list_box_contents);
new contentBox($list_box_contents, 0);
} else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => '');
$list_box_contents[0][] = array('params' => ' style="padding:15px 0px; "',
'text' => '<center>'.TEXT_NO_PRODUCTS.'</center>');

new productListingBox($list_box_contents);
}

if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr >
<!--<td class="smallText" style="padding-top:30px;"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>-->
<td class="smallText" style="padding-top:10px;" align="center"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>

</table>
<?php
}
?>


************************************************************************************

grazie
Pietro
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

qualche informazione in più sarebbe gradita...

dove non vedi le immagini??? in locale, in remoto? se in remoto se che server sei? win o linux?
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

Si scusami
sto lavorando su un hosting linux sotto aruba.
La home page riporta sulla sinistra il link delle categorie, cliccando su una delle categorie mi viene ricaricata la pagina index.php che include la pagina product_listing.php che dovrebbe farmi vedere tutti gli articoli (una immagine per ogni articolo con relativo nome) presenti in quella categoria. Invece mi fa vedere solo il nome e non l'immagine del prodotto. Se clicco sul nome vado allora alla pagina product_info e li funziona tutto bene. Non mi visualizza l'immagine dei prodotti appartenenti alla categoria.
Grazie
Avatar utente
xnetus
membro Senior
membro Senior
Messaggi: 371
Iscritto il: 08/09/2008, 17:50
Contatta:

Re: Non mi visualizza immagini

Messaggio da xnetus »

Hai impostato la visualizzazione delle immagini in Configurazione (nel lato admin)?
Assistenza osCommerce e Realizzazione Moduli!
Solo una piattaforma ben gestita può garantirti dei benefici notevoli. Contattaci e scopri quali sono le potenzialità del tuo business.
(email: info@xnetus.net)
Scopri il servizio...
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

oltre alla domanda di xnetus... hai fatto qualche modifica? o questo problema si è presentato con l'osc vergine?
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

Si ho attivato la visualizzazione delle immagini lato admin.
Ho caricato il template di oscommerce chiamato flower, e mi da questo problema. praticamente la dir_ws_images è giusta perche quando visualizzo la pagina, richiedo di farmi visualizzare l'html e vedo che dove dovrebbe comparire l'immagine compare solo il tag <img src="images/" ....... senza il nome dell'immagine.
Eventualmente potrei darvi il link alle pagine per visualizzare il problema, ma non so se si può fare.
Grazie ancora per l'attenzione
Pietro
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

si linka :wink:
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

il link è questo
http://www.olio-argan.it/argan
come potrete vedere le immagini nella home compaiono, mentre se cliccate su una delle categorie non vengono visualizzate le immagini dei prodotti, ma solo il nome.
Grazie mille
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

allora ho spulciato un po' il codice e penso che il problema sia dovuto al templates...

perchè quelli che lo hanno realizzato hanno un po' pastrugnato con il codice, infatti il file è completamente diverso rispetto ad un osc normale... sembra quasi che abbiano mischiato il codice del file new_products.php


prova a chiedere assistenza a loro
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

Grazie ugualmente,
non penso riuscirò a trovare chi ha realizzato il templates, perchè fa parte di un pacchetto gratuito di 13 osctemplates, e non c'è scritto chi lo ha realizzato. Vedrò di risolvere in altra manierà.
Grazie ugualmente per la cortesia.
Pietro
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

una soluzione è sostituire il file products_listing che hai con uno di un osc vergine e poi sistemare le classi css per far combaciare i colori :wink:
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

Grazie mille,
Ho risolto il problema. Si trattava della SQL che non reperiva il file immagine (mancava il p.product.image all'interno della stringa SELECT).
Adesso però chiaramente mi ritrovo alle prese con il carrello della spesa che non mi elimina i prodotti quando clicco sul checkbox e faccio l'update. Ci sto impazzendo. Il difetto lo puoi vedere sempre al solito indirizzo.
Ti allego il listato, (approfitto della tua immensa pazienza e cortesia), mi ci daresti un occhiata, magari è solo sintassi.
Grazie
Pietro


*************** FILE SHOPPING CART *******************************
<?php
/*
$Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

E-Commerce Solutions

Copyright (c) 2005 www.flash-template-design.com

Released under the GNU General Public License
*/

require("includes/application_top.php");

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<tr>
<td width="160" align="right" valign="top">
<table width="158" cellpadding="0" cellspacing="0" border="0">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</table>
</td>
<td width="549" valign="top">

<table border="0" cellpadding="0" cellspacing="0" width="549">
<tr>
<td width="100%" height="100%" valign="top" >

<table border="0" width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td width="100%" class="green" height="25" valign="top" style=" background:#235704 url(images/green_bg.gif) repeat-x bottom; padding-top:3px;" align="right">
<table border="0" cellpadding="0" cellspacing="0"><?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {


}?></table></td>

</tr>
<tr>
<td height="20"><div style='height:20px; padding-right:10px;color:#C0C0C0; font-weight:bold; font-size:14px; text-align:left;'>  <?php echo HEADING_TITLE; ?></div></td>
</tr>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>




<?php

if ($cart->count_contents() > 0) {
?>
<tr>
<td align="center" style="padding:0px 5px;">
<?php
$info_box_contents = array();
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_REMOVE);

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_PRODUCTS);



$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_TOTAL);

$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . $products[$i]['id'] . "'
and pa.options_id = '" . $option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . $value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . $languages_id . "'
and poval.language_id = '" . $languages_id . "'");
$attributes_values = tep_db_fetch_array($attributes);

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
$products[$i][$option]['options_values_id'] = $value;
$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
}
}
}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($info_box_contents) - 1;

$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="left"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top" align="center" style="padding-left:8px;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;

$products_name .= $stock_check;
}
}

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
}
}

$products_name .= ' </td>' .
' </tr>' .
'</table>';

$info_box_contents[$cur_row][] = array('params' => 'align="left" class="productListing-data"',
'text' => $products_name);


$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

new productListingBox($info_box_contents);
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td align="right" class="main" style="padding-right:5px;"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
</tr>
<?php
if ($any_out_of_stock == 1) {
if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
</tr>
<?php
} else {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" >
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) {
?>
<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
}
?>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
} else {
?>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr></form>
<?php
}
?>
</table></td>







<!-- body_text_eof //-->


</tr>


</table>
</td>

</tr>




<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->


</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>



**************** FINE *******************************
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: Non mi visualizza immagini

Messaggio da dynamo »

anche qui il codice è un po' diverso...

prova con questo codice a vedere cosa fa...

Codice: Seleziona tutto

<?php
/*
$Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

E-Commerce Solutions

Copyright (c) 2005 www.flash-template-design.com

Released under the GNU General Public License
*/

require("includes/application_top.php");

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<tr>
<td width="160" align="right" valign="top">
<table width="158" cellpadding="0" cellspacing="0" border="0">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</table>
</td>
<td width="549" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>


<table border="0" cellpadding="0" cellspacing="0" width="549">
<tr>
<td width="100%" height="100%" valign="top" >

<table border="0" width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td width="100%" class="green" height="25" valign="top" style=" background:#235704 url(images/green_bg.gif) repeat-x bottom; padding-top:3px;" align="right">
<table border="0" cellpadding="0" cellspacing="0"><?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {


}?></table></td>

</tr>
<tr>
<td height="20"><div style='height:20px; padding-right:10px;color:#C0C0C0; font-weight:bold; font-size:14px; text-align:left;'>  <?php echo HEADING_TITLE; ?></div></td>
</tr>




<?php

if ($cart->count_contents() > 0) {
?>
<tr>
<td align="center" style="padding:0px 5px;">
<?php
$info_box_contents = array();
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_REMOVE);

$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_PRODUCTS);



$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_TOTAL);

$any_out_of_stock = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Push all attributes information in an array
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
while (list($option, $value) = each($products[$i]['attributes'])) {
echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . $products[$i]['id'] . "'
and pa.options_id = '" . $option . "'
and pa.options_id = popt.products_options_id
and pa.options_values_id = '" . $value . "'
and pa.options_values_id = poval.products_options_values_id
and popt.language_id = '" . $languages_id . "'
and poval.language_id = '" . $languages_id . "'");
$attributes_values = tep_db_fetch_array($attributes);

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
$products[$i][$option]['options_values_id'] = $value;
$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
}
}
}

for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (($i/2) == floor($i/2)) {
$info_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$info_box_contents[] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($info_box_contents) - 1;

$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="left"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top" align="center" style="padding-left:8px;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;

$products_name .= $stock_check;
}
}

if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
reset($products[$i]['attributes']);
while (list($option, $value) = each($products[$i]['attributes'])) {
$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
}
}

$products_name .= ' </td>' .
' </tr>' .
'</table>';

$info_box_contents[$cur_row][] = array('params' => 'align="left" class="productListing-data"',
'text' => $products_name);


$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

new productListingBox($info_box_contents);
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td align="right" class="main" style="padding-right:5px;"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
</tr>
<?php
if ($any_out_of_stock == 1) {
if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
</tr>
<?php
} else {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" >
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
$back = sizeof($navigation->path)-2;
if (isset($navigation->path[$back])) {
?>
<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
}
?>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
} else {
?>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr></form>
<?php
}
?>
</table></td>







<!-- body_text_eof //-->


</tr>


</table>
</td>

</tr>




<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->


</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

PS: la prossima volta che posti del codice inseriscilo nei tag CODE :wink:
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
pietro
membro Junior
membro Junior
Messaggi: 13
Iscritto il: 21/09/2009, 17:13

Re: Non mi visualizza immagini

Messaggio da pietro »

Ciao e grazie per la tempestività della risposta,
purtroppo però continua a darmi lo stesso bug , ossia non elimina l'articolo dal carrello. Il problema è proprio nel file originale del templates.
Rispondi