
strano
Meglio così...
ma sinceramente non ho capito cosa ho cambiato
Questo è tutto il codice di questa contribution=
<?php
/*****************************************************************************************************
Paul Sanders, Compute Solutions P/L - This program has no reserved copyright - please feel free to distribute / improve!
*****************************************************************************************************
This is an upgrade to Paul Sanders' contribution, so that it better integrates into the osCommerce format. It also supports multiple languages. Hope you enjoy! Julie Williams (
www.baskinglizards.com)
*****************************************************************************************************/
require('includes/application_top.php');
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRICELIST);
$breadcrumb->add(HEADING_TITLE, tep_href_link(FILENAME_PRICELIST, '', 'NONSSL'));
?>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta name="keywords" content="<?php echo META_KEYWORDS; ?>">
<meta name="description" content="<?php echo META_DESCR; ?>">
<style type="text/css">
table.report {
border: 1px solid Black;
page-break-after: auto;
page: auto;
border-collapse: collapse;
font-family: Tahoma, Arial, sans-serif;
font-size: 12px;
padding: 6px;
}
TD.header {
font-family: Tahoma, Arial, sans-serif;
font-size: 18px;
}
h4.report {
font-family: Tahoma, Arial, sans-serif;
font-size: 14px;
}
P.report {
font-family: Tahoma, Arial, sans-serif;
font-size: 12px;
}
td.price {
font-family: Tahoma, Arial, sans-serif;
font-size: 14px;
font-weight: bold;
color: #006600;
text-align: right;
border: 1px solid;
padding: 3px;
}
td.report {
border: 1px solid;
padding: 3px;
}
</style>
<title><?php echo TITLE ?></title>
</head>
<body>
<table width=750 align=center>
<tr><td align=center><?php echo tep_image(DIR_WS_IMAGES . 'MTS.gif', 'MonsterTruckShop.net'); ?></td>
<td class=header valign=middle><br><b><i><?php echo TEXT_TITLE ?></i></b></td></tr>
<tr><td colspan=2 align=center>
<!--<h4 class="report">(<?php echo $num_records; ?> products)</h4>//-->
<h4 class="report"><?php echo TEXT_HEADER ?></h4>
<p class="report"><?php echo TEXT_CONTENT ?></p></td>
</tr>
</table><br>
<?php
$sql = "SELECT * FROM products_to_categories ORDER BY products_id";
$records = mysql_query($sql);
print "<table width=750 cellpadding=5 align=center class=report>";
print "<tr><td class=report><b>" . TEXT_CATEGORY;
print "</b></td><td class=report><b>" . TEXT_IMAGE;
print "</b></td><td class=report><b>" . TEXT_DESCRIPTION;
print "</b></td><td class=report align=right><b>" . TEXT_PRICE;
print "</b></td></tr>";
$i = 0;
while ($table = mysql_fetch_array($records)) {
$product = $table['products_id'];
$category = $table['categories_id'];
$desc_id = $product;
$sql = "SELECT categories_description.categories_name, categories_description.categories_id FROM categories_description inner join languages on (categories_description.language_id = languages.languages_id) WHERE (categories_description.categories_id = $category AND languages.directory='$language')";
$category = mysql_query($sql);
$category = mysql_fetch_array($category);
$category = $category['categories_name'];
$sql = "SELECT products_id, products_model, products_price, products_status, products_image FROM products WHERE products_id = $product";
$product = mysql_query($sql);
$product = mysql_fetch_array($product);
$part = $product['products_model'];
$price = $product['products_price'];
$picture = $product['products_image'];
$price = substr($price,0, strlen($price) - 2);
$sql = "SELECT products_description.products_id, products_description.products_name, products_description.products_description, products_description.language_id FROM products_description inner join languages on (products_description.language_id = languages.languages_id) WHERE (products_description.products_id = $desc_id AND languages.directory='$language')";
$description = mysql_query($sql);
$description = mysql_fetch_array($description);
$name = $description['products_name'];
$description = $description['products_description'];
if (!($i%2)) {
$color = "BGCOLOR = #DEDEDE";
}
else {
$color = "BGCOLOR = #FFFFFF";
}
/* This adds two conditions to show a product: it has to have a Price (useful if you have free products and don't want them in your catalog) and it has to be In Stock */
if (($product['products_price'] > 0) && ($product['products_status'] == 1)) {
print "<tr><td $color class=report>$category</td><td $color class=report><img src = /images/$picture width=100 height=80></td><td $color class=report><b>$name</b><br>$description</td><td $color class=price>€$price</td></tr>";
$i++;
}
}
print "</table>"
?>
</body>
</html>
Vorrei sapere, come potrei fare a utilizzare le immagini della cartella imagecache???
Vsito che adesso prende le immagini grandi e le ridimensiona... quindi ci mette un macello ad caricare la pagina.
