Hi, try to get lightbox to work on my test site and I have a problem .I have OSC 2.2rc2a .I download from here version 2.4 relese on march 25 08. It come with Product_info.php file and I replace the one I had. I copy the the lightbox folder to the catalog ,I copy and drop the pictures on the catalog/image .it works but the format of my original page broke.Name of the product is BIG ,Picture and all description is pushed to the right side of the screen.It looks like it is not respecting the CSS.
Does any one can point me in the right direction,on how I can get this to work?
Thank you adrian
Here is my original Product_info.PHP:
<?php
/*
$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<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">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
e
ft=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="col_left">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</td>
<!-- body_text //-->
<td width="100%" class="col_center"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
if ($product_check['total'] < 1) {
?>
<tr><td>
<? tep_draw_heading_top(); ?>
<?php echo tep_draw_title_top();?>
<?php echo TEXT_PRODUCT_NOT_FOUND;?>
<?php echo tep_draw_title_bottom();?>
<? tep_draw_heading_top_1(); ?>
<!--
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td>
-->
<br style="line-height:1px;"><br style="line-height:12px;">
<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"><?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>
</table>
-->
<? tep_draw_heading_bottom_1(); ?>
<? tep_draw_heading_bottom(); ?>
<?php
} else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}
if (tep_not_null($product_info['products_model'])) {
$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
$products_name = $product_info['products_name'];
}
?>
<tr>
<td>
<? tep_draw_heading_top(); ?>
<?php echo tep_draw_title_top();?>
<?php echo $breadcrumb->trail(' » ')?>
<?php echo tep_draw_title_bottom();?>
<? tep_draw_heading_top_1(); ?>
<? /* tep_draw_heading_top_2(); */ ?>
<?php
if (tep_not_null($product_info['products_image'])) {
?>
<table cellspacing="0" cellpadding="0" border="0" class="product">
<tr><td>
<table cellspacing="0" cellpadding="0" border="0">
<tr><td height="100%">
<table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info">
<tr><td align="center">
<?php echo tep_draw_prod_pic_top();?>
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>
</noscript>
<?php echo tep_draw_prod_pic_bottom();?>
</td></tr>
<tr><td align="center">
<script language="javascript"><!--
document.write('<?php echo '<div><a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>');
//--></script>
<noscript>
<?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>
</noscript>
</td></tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" class="title_info">
<tr><td><em><?php echo $products_name; ?></em></td></tr>
</table>
<div class="padd3"><?php echo stripslashes($product_info['products_description']); ?>
<br><br style="line-height:11px"><span class="productSpecialPrice"><?=$products_price?></span></div>
</td></tr>
</table>
</td>
</tr>
</table>
<?php
}
?>
<? /* tep_draw_heading_bottom_2(); */ ?>
<table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:15px 0px 15px 0px; height:1px;">
<tr><td class="bg_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr>
</table>
<? tep_draw_heading_top_2();?>
<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
<table cellpadding="0" cellspacing="0" class="box_width_cont product">
<tr><td height="25" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td></tr>
<?php
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
while ($products_options = tep_db_fetch_array($products_options_query)) {
$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
if ($products_options['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
}
if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<tr>
<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
</tr>
<tr><td height="10" colspan="2"></td></tr>
<?php
}
?>
</table>
<?php
}
?>
<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
<table cellpadding="0" cellspacing="0" class="product box_width_cont">
<tr><td class="line_h"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td></tr>
<tr><td height="17"></td></tr>
</table>
<?php
}
if (tep_not_null($product_info['products_url'])) {
?>
<table cellpadding="0" cellspacing="0" class="product box_width_cont">
<tr><td class="line_h"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td></tr>
<tr><td height="17"></td></tr>
</table>
<?php
}
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<table cellpadding="0" cellspacing="0" class="product box_width_cont">
<tr><td class="line_h"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td></tr>
<tr><td height="17"></td></tr>
</table>
<?php
} else {
?>
<table cellpadding="0" cellspacing="0" class="product box_width_cont">
<tr><td class="line_h"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td></tr>
<tr><td height="17"></td></tr>
</table>
<?php
}
?>
<!--
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents"><td>
-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont">
<tr>
<td class="main bg_input"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?><?php echo tep_draw_separator('spacer.gif', '15', '1'); ?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
</tr>
</table><br style="line-height:1px;"><br style="line-height:10px;">
<!--
</td></tr>
</table>
-->
<? tep_draw_heading_bottom_2();?>
<? tep_draw_heading_bottom_1(); ?>
<?php tep_draw_heading_bottom();?>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_also_purchased(3600);
} else {
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
}
?>
</td>
</tr>
</table></form></td>
<!-- body_text_eof //-->
<td class="col_right">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //--></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
This is My Stylesheet.css original:
/*
$Id: stylesheet.css,v 1.56 2003/06/30 20:04:02 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; }
.stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; }
.productsNotifications { background: #DBDBDB; }
.orderEdit {font-family : Verdana, Arial, sans-serif;font-size : 10px;color: #999999;text-decoration: underline;}
BODY {background: #ffffff; color: #000000; margin: 0px;}
.infoBox {background: #de1558;}
.infoBoxContents {background: #ffffff;font-family: Verdana, Arial, sans-serif; font-size: 10px;}
/* A {color: #000000; text-decoration: none;}A:hover { color: #AABBDD; text-decoration: underline;} */
FORM {display: inline;}
TR.header {background: #ffffff;}
TR.headerNavigation {background: #bbc3d3;}
TD.headerNavigation {font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #bbc3d3; color: #ffffff; font-weight : bold;}
/* A.headerNavigation {color: #FFFFFF; }A.headerNavigation:hover { color: #ffffff;
} */
TR.headerError {background: #ff0000;}
TD.headerError {font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #ff0000; color: #ffffff; font-weight : bold; text-align : center;}
TR.headerInfo {background: #00ff00;}
TD.headerInfo {font-family: Tahoma, Verdana, Arial, sans-serif;font-size: 12px;background: #00ff00;color: #ffffff;font-weight: bold;text-align: center;}
/* TR.footer {background: #bbc3d3;}TD.footer { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #bbc3d3; color: #ffffff; font-weight: bold;}*/
.infoBoxNotice {background: #FF8E90;}
.infoBoxNoticeContents {background: #FFE6E6;font-family: Verdana, Arial, sans-serif; font-size: 10px;}
TD.infoBoxHeading {font-family: Verdana, Arial, sans-serif;font-size: 10px;font-weight: bold;background: #bbc3d3;color: #ffffff;}
TD.infoBox, SPAN.infoBox {font-family: Verdana, Arial, sans-serif; font-size: 10px;}
TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {background: #f8f8f9;}
TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {background: #f8f8f9;}
TABLE.productListing {border: 1px;border-style: solid;border-color: #b6b7cb;border-spacing: 1px;}
.productListing-heading {font-family: Verdana, Arial, sans-serif;font-size: 10px;background: #b6b7cb;color: #FFFFFF;font-weight: bold;}
TD.productListing-data {font-family: Verdana, Arial, sans-serif;font-size: 10px;}
TD.pageHeading, DIV.pageHeading {font-family: Verdana, Arial, sans-serif;font-size: 20px;font-weight: bold;color: #9a9a9a;}
TR.subBar {background: #f4f7fd;}
TD.subBar {font-family: Verdana, Arial, sans-serif;font-size: 10px;color: #000000;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
TD.main, P.main {font-family: Verdana, Arial, sans-serif;font-size: 11px;line-height: 1.5;}
TD.smallText, SPAN.smallText, P.smallText {font-family: Verdana, Arial, sans-serif;font-size: 10px;}
TD.accountCategory {font-family: Verdana, Arial, sans-serif;font-size: 13px;color: #aabbdd;}
TD.tableHeading {font-family: Verdana, Arial, sans-serif;font-size: 12px;font-weight: bold;}
CHECKBOX, INPUT, RADIO, SELECT {font-family: Verdana, Arial, sans-serif;font-size: 11px;}
TEXTAREA {width: 100%;font-family: Verdana, Arial, sans-serif;font-size: 11px;}
SPAN.greetUser {font-family: Verdana, Arial, sans-serif;font-size: 12px;color: #f0a480;font-weight: bold;}
TABLE.formArea {background: #f1f9fe;border-color: #7b9ebd;border-style: solid;border-width: 1px;}
TD.formAreaTitle {font-family: Tahoma, Verdana, Arial, sans-serif;font-size: 12px;font-weight: bold;}
SPAN.markProductOutOfStock {font-family: Tahoma, Verdana, Arial, sans-serif;font-size: 12px;color: #c76170;font-weight: bold;}
SPAN.errorText {font-family: Verdana, Arial, sans-serif;color: #ff0000;}
.moduleRow { }
.moduleRowOver {background-color: #DBDBDB; cursor: pointer; cursor: hand; }
.moduleRowSelected {background-color: #DBDBDB; }
.checkoutBarFrom, .checkoutBarTo {font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; }
.checkoutBarCurrent {font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #c76170; }
/* message box */
.messageBox {font-family: Verdana, Arial, sans-serif; font-size: 11px; }
.messageStackError, .messageStackWarning {font-family: Verdana, Arial, sans-serif;font-size: 15px;background-color: #ffff00;color: #000000;}
.messageStackSuccess {font-family: Verdana, Arial, sans-serif; font-size: 15px; background-color: #99ff00; }
#myse select {width:90%;}
/* input requirement */
.product .inputRequirement, .inputRequirement
{font-family: Verdana, Arial, sans-serif; font-size: 11px; color:#FF0000; }
/* ------------------------------------------------- User Account Information -------------------------------------------------------- */
.main a {color:#1e2222; text-decoration:underline;}
.main a:hover {color:#7d0311; text-decoration:none;}
.vam {vertical-align:middle;}
input {background:#ffffff;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ----------------------------------- Font pentru currencies ,shoping cart,check out form -------------------------------- */
body {padding:0; margin:0;}
table, td, .main, select, input, textarea {
font-size: 11px;
font-family: Tahoma;
font-weight: bold;
color: #666666;
line-height: 13px;
vertical-align: top;
padding: 0px;
}
img {border:0px;}
table {width:100%;}
.vam { vertical-align:middle}
.bg{background:url(images/bg_line.gif)}
.jamp1{ width:143px; height:18px; color:#464646; font-size:10px; padding-left:2px; font-family:Tahoma;}
.jamp2{ width:143px; height:18px; color:#464646; font-size:10px; padding-left:2px; font-family:Tahoma;}
.header td {color:#999999; vertical-align:middle; text-transform:uppercase; font-size:12px; font-weight:bold; font-family:Arial}
.header span {color:#999999; font-size:11px;}
.header b {color:#999999; text-decoration:underline}
.header a {color:#ffffff; text-decoration:none; font-size:11px; }
.header a:hover {color:#999999;text-decoration:underline}
.header strong {color:#b9215c; }
/* -box_body- */
.box_body td{ color:#f07f7f}
.box_body span.productSpecialPrice { color:#ffffff; font-size:14px; font-weight:bold}
/* meniul*/
.box_body del {color:#ffffff; font-size:14px; font-weight:bold}
.box_body span a {color:#999999; font-size:12px; text-decoration:underline; font-weight:bold}
.box_body span a:hover {color: #1e2222;text-decoration: none;}
.box_body ul {padding:0; margin:0 0 0 0px; list-style:none; }
.box_body .bg_list {}
.box_body .bg_list a {color:#999999; padding-left:10px; background:url(images/arrow.gif) top left no-repeat; background-position:0 3px; text-decoration: underline; line-height:23px; text-transform:uppercase; font-size:14px; font-family:Arial; font-weight:bold}
.box_body .bg_list a:hover {color:#1e2222; text-decoration:none;}
.box_body .bg_list_un {}
.box_body .bg_list_un a {color:#ffffff; padding-left:20px; background:url(images/arrow_3.gif) top left no-repeat; background-position:0 3px; text-decoration:none; line-height:18px; font-weight:bold}
.box_body .bg_list_un a:hover {color:#ffffff; text-decoration:none;}
.box_body .bg_list_sub {}
.box_body .bg_list_sub a {color:#999999; padding-left:10px; background:url(images/arrow_sub.gif) top left no-repeat; background-position:0 3px; text-decoration: underline; line-height:23px; text-transform:uppercase; font-size:14px; font-weight:bold; font-family:Arial; margin-left:2px}
.box_body .bg_list_sub a:hover {color:#1e2222; text-decoration:none;}
/* Category Box*/
/* -1- */
.box_heading_table {}
.box_heading_table .box_heading_td {background:#e6e6e6 url(images/box_heading_c.gif) top repeat-x; padding:1px 10px 1px 5px;}
.box_heading_table .box_heading_td {color: #1e2222;font-weight: bold;font-size: 14px;text-transform: uppercase;}
.box_heading_tall_t {background:#e6e6e6 url(images/box_heading_t.gif) top repeat-x;}
.box_heading_tall_b {background:#e6e6e6 url(images/box_heading_b.gif) bottom repeat-x;}
.box_heading_tall_l {background:#e6e6e6 url(images/box_heading_l.gif) no-repeat left top;}
.box_heading_tall_r {background:#e6e6e6 url(images/box_heading_r.gif) no-repeat right top;}
.box_body_table .box_body_tall_l {background:url(images/box_heading_c.gif) left repeat-y;}
.box_body_table .box_body_tall_r {background:url(images/box_heading_t.gif) right repeat-y;}
.box_body_table .box_body_tall_b {background:url(images/box_heading_t.gif) bottom repeat-x;}
.box_body_table .box_body_td {padding:20px 20px 20px 20px;}
.box_body_table_2 .box_body_td_2 {padding:15px 20px 15px 20px;}
/* -2- */
.box_heading_table_2 {}
.box_heading_table_2 .box_heading_td_2 {background:#a20085 url(images/box_heading_c_2.gif) top repeat-x; padding:1px 10px 1px 5px;}
.box_heading_table_2 .box_heading_td_2 {color:#152222; font-weight:bold; font-size:14px; text-transform:uppercase }
.box_heading_tall_t_2 {background:#a20085 url(images/box_heading_t_2.gif) top repeat-x;}
.box_heading_tall_b_2 {background:#a20085 url(images/box_heading_b_2.gif) bottom repeat-x;}
.box_heading_tall_l_2 {background:#a20085 url(images/box_heading_l_2.gif) no-repeat left top;}
.box_heading_tall_r_2 {background:#a20085 url(images/box_heading_r_2.gif) no-repeat right top;}
/* -3- */
.box_heading_table_3 {background:#9D5868 url(images/heading_c_1_3.gif) top repeat-x;}
.box_heading_table_3 .box_heading_td_3 {background:url(images/heading_bg_1_3.jpg) top right no-repeat; padding:13px 10px 8px 0px;}
.box_heading_table_3 .box_heading_td_3 {color:#FFFFFF; font-weight:bold; font-size:12px; text-transform:uppercase }
.box_body_table_3 {background-color:#ff4d8d; font-size:10px;}
.box_body_table_3 .box_body_tall_l_3 {background:url(images/body_tal1_3.gif) left repeat-y;}
.box_body_table_3 .box_body_tall_r_3 {background:url(images/body_tal2_3.gif) right repeat-y;}
.box_body_table_3 .box_body_tall_b_3 {background:url(images/body_tal3_3.gif) bottom repeat-x;}
.box_body_table_3 .box_body_td {padding:18px 29px 0px 19px;}
/* -4- */
.box_heading_table_4 {background:#9D5868 url(images/heading_c_1_4.gif) top repeat-x;}
.box_heading_table_4 .box_heading_td_4 {background:url(images/heading_bg_1_4.jpg) top right no-repeat;padding:13px 10px 8px 0px;}
.box_heading_table_4 .box_heading_td_4 {color:#FFFFFF; font-weight:bold; font-size:12px; text-transform:uppercase }
.box_body_table_4 {background-color:#9d398d; font-size:10px;}
.box_body_table_4 .box_body_tall_l_4 {background:url(images/body_tal1_4.gif) left repeat-y;}
.box_body_table_4 .box_body_tall_r_4 {background:url(images/body_tal2_4.gif) right repeat-y;}
.box_body_table_4 .box_body_tall_b_4 {background:url(images/body_tal3_4.gif) bottom repeat-x;}
.box_body_table_4 .box_body_td {padding:18px 29px 0px 19px;}
/* ------------------------ CONTENT ---------------------------- */
.cont_heading_table { }
.cont_heading_td {padding:13px 17px 9px 10px; font-size:14px; text-transform:uppercase; font-weight:bold; color:#fffffe; }
.cont_heading_td a {font-weight:bold; color:#fffffe; text-decoration:none; }
.cont_heading_td a:hover {font-weight:bold; color:#fffffe; text-decoration:underline; }
.cont_body_table {background:#2a2a2a;}
.cont_body_tall_t {background:#2a2a2a url(images/cont_body_corn_t.gif) top repeat-x;}
.cont_body_tall_b {background:#2a2a2a url(images/cont_body_corn_b.gif) bottom repeat-x;}
.cont_body_tall_l {background:#2a2a2a url(images/cont_body_corn_l.gif) left repeat-y;}
.cont_body_tall_r {background:#2a2a2a url(images/cont_body_corn_r.gif) right repeat-y;}
/* PRODUCT */
.product td { color:#999999; font-size:12px}
.product a {font-weight:bold; font-size:12px; color:#8E013B; text-decoration:none;} /* for sub_categories (index-1.html) */
.product a:hover {text-decoration:underline;}
.product span a {font-weight:bold; font-size:12px; color:#999999; text-decoration:underline;}
.product span a:hover {text-decoration:none;}
span.productSpecialPrice {font-size:14px; font-weight:bold; color:#ffffff; }
.product div a {color:#999999; font-size:12px; font-weight:normal; text-decoration:underline; text-transform:none;}/* ??? click to enlarge */
.product div a:hover {color: #7d0311;text-decoration: none;}
/* IMAGE */
.pic {}
.table_pic_width {width:1px;}
.image {width:100%; background:#ffffff;}
.pic_corn_c {background:#FFFFFF;}
.pic_corn_t {background:#FFFFFF url(images/pic_corn_t.gif) top repeat-x;}
.pic_corn_b {background:#FFFFFF url(images/pic_corn_b.gif) bottom repeat-x;}
.pic_corn_l {background:#FFFFFF url(images/pic_corn_l.gif) left repeat-y;}
.pic_corn_r {background:#FFFFFF url(images/pic_corn_r.gif) right repeat-y;}
.shop_cart td.remove {width:20%;}
.shop_cart td.product {width:45%;}
.shop_cart td.qty {width:15%;}
.shop_cart td.total {width:20%;}
/* popup */
.popup {color:#fffff2; font-size:12px;}
/* footer meniu jos */
.footer { width:100%}
.footer td {color:#ffffff; font-size:11px;}
.footer a {color:#ffffff; font-size:11px; text-decoration:none;}
.footer a:hover {color:#ffffff;text-decoration:underline;}
.footer span {color:#ffffff; font-size:14px;}
.footer span a {color:#ffffff; font-size:11px; text-decoration:none;}
.footer span a:hover {color:#ffffff;text-decoration:underline;}
.footer b, .footer b a {color:#ffffff; font-size:11px; font-weight:bold; text-decoration:underline;}
.footer b a:hover {color:#7d0311; text-decoration:none;}
.box_width_left { width:194px;}
.box_width_right { width:0px;}
.box_width_cont { width:100%;}
.col_left {}
.col_center { width:100%;}
.col_right {}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
.result {margin:0px 0px 0px 0px;}
.result td {width:50%; vertical-align:middle; padding:11px 10px;}
.result_right {text-align:right;}
.result td {font-size:11px; font-family:Arial, Helvetica, sans-serif; color:#999999;}
.result b {color:#7d7d7d; font-weight:normal;}
.result_right b {color:#ffffff; font-size:12px; font-weight:bold;}
.result_right a.pageResults {color:#ffffff; font-size:12px;text-decoration:underline; }
.result_right a.pageResults:hover {color:#ffffff; text-decoration:none; }
.result_right a.pageResults u {color:#ffffff; font-size:12px; text-decoration:underline;}
.result_right a.pageResults u:hover {color:#ffffff; text-decoration:none;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
.box_body td{ color:#ffffff}
.box_body span {color:#ffffff; font-size:11px; font-weight:normal; font-family:Tahoma}
.box_body a {color:#ffffff; font-family:Tahoma; font-size:11px; text-decoration:none;}
.box_body a:hover {color:#ffffff; text-decoration:underline}
.box_body em a {color:#ffffff; font-family:Tahoma; font-size:11px; font-weight:bold; text-decoration:underline; font-style:normal;}
/* ------------------------------------------------- -------------------------------------------------------- */
.cont_header_txt em {color:#E50029; font-size:14px; font-weight:bold; font-style:normal;vertical-align:middle;text-decoration:none;}
.product em {font-weight:bold; font-size:14px; color:#999999; text-decoration:underline; font-style:normal;}
.title_info {width:270px;}
.title_info td {vertical-align:middle; height:38px;}
.prod_info {width:100px; float:left; margin-right:15px;}
.prod_info td {text-align:center;}
/* ------------------------------------------------- -------------------------------------------------------- */
.product .shop_cart {text-align:center; vertical-align:middle;height:39px;background:url(images/bg4.gif); color:#fffff2; font-weight:bold;}
/* heading */
.remove {width:15%;}
.products {width:50%;}
.quantity {width:15%;}
.total {width:20%;}
/* heading */
.bg_line_x {background:url(images/line_bg.gif) left center repeat-x;}
.bg_line_y {background:url(images/line_bg.gif) center top repeat-y;}
.cart_line_x {background:url(images/line_bg.gif) left center repeat-x;}
.cart_line_y {background:url(images/line_bg.gif) center top repeat-y;}
.cart_total_left {width:80%; text-align:right; vertical-align:middle;height:38px;}
.cart_total_right {width:20%; text-align:center;vertical-align:middle;}
/* ------------------------------------------------- -------------------------------------------------------- */
SPAN.newItemInCart {font-family: Verdana, Arial, sans-serif;font-size:10px;color: #fb0707;}
.box_body a SPAN.newItemInCart {font-family: Verdana, Arial, sans-serif;font-size:10px;color: #fb0707; text-decoration:underline;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
.smallText a {color:#ffffff; font-size:11px; text-decoration:none;} /* advanced_search.php */
.smallText a:hover {color:#ffffff; font-size:11px; text-decoration:underline;}
.smallText a u {color:#ffffff; font-size:11px; text-decoration:none;}
.smallText a:hover u {color:#ffffff; font-size:11px; text-decoration:underline;}
TD.fieldKey {font-family: Verdana, Arial, sans-serif;font-size: 12px;font-weight: bold;}
TD.fieldValue {font-family: Verdana, Arial, sans-serif;font-size: 12px;}
.main a b {color:#5D5F60;font-size: 10px; text-decoration:underline;}
.main a:hover b {color:#5D5F60;font-size: 10px; text-decoration:none;}
/* ------------------------------------------------- -------------------------------------------------------- */
span.txt_1 {font-size:10px; text-transform:none; color:#000000;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
.bg_input input {background:none;}
/* ------------------------------------------------- -------------------------------------------------------- */
/* ------------------------------------------------- -------------------------------------------------------- */
.padd_1 {padding:0px 10px 0px 10px;}
.padd_22 {padding:8px;}
td.padd2 {padding:8px; padding-left:4px;}
.line_h {line-height:16px;}
/* ------------------------------------------------- -------------------------------------------------------- */
.product div {padding:8px 0px 5px 0px;}
div.padd3 {text-align:left; padding-top:0px; margin-left:0px; margin-right:0px;}
.padd33 img, .padd33 input {margin:1px;}
/* ------------------------------------------------- -------------------------------------------------------- */
.box_width_left { width:206px;}
.box_width_right { width:0px;}
.box_width_cont { width:100%;}
.col_left {}
.col_center { width:100%;}
.col_right {}
/* ------------------------------------------------- -------------------------------------------------------- */
.heading_top_1 {margin-top:0px;}
.heading_top_1 .padd_11 {padding:10px 0px 5px 0px;}
.heading_top_2 {margin-top:0px;}
.heading_top_2 .padd_22 {padding:0px 20px 0px 20px;}
.heading_top_3 {margin-top:0px;}
.heading_top_3 .padd_33 {padding:0px 0px 0px 0px;}
.heading_top_4 {margin-top:0px;}
.heading_top_4 .padd_44 {padding:0px 0px 0px 0px;}
.tableBox_output {margin-top:0px;}
.tableBox_shopping_cart {margin-top:0px;}
.tep_draw_separate {height:11px;}
.tep_draw_prod_top {padding:0px 0px 0px 0px;}
.tep_draw_box_prod {}
/* */
This is My Index.Php
<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
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 HTML 4.01 Transitional//EN">
<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">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="col_left">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</td>
<!-- body_text //-->
<?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="col_center">
<? tep_draw_heading_top();?>
<? new contentBoxHeading_ProdNew($info_box_contents);?>
<? tep_draw_heading_top_3();?>
<table border="0" cellspacing="0" cellpadding="0" align="center" class="box_width_cont product">
<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']);
$p_pic_sub = '<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) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';
$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
echo '
<td align="center" width="' . $width . '">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="vam" style="height:50px " align="center"><span>'.$p_name_sub.'</span></td>
</tr>
</table>'.tep_draw_prod_pic_top().''.$p_pic_sub.''.tep_draw_prod_pic_bottom().'
</td>
' . "\n";
if ($col!=(MAX_DISPLAY_CATEGORIES_PER_ROW-1)){
echo '
<td class="bg_line_y">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
';
}
else{
if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
echo '
</tr><tr><td colspan="'.(MAX_DISPLAY_CATEGORIES_PER_ROW + MAX_DISPLAY_CATEGORIES_PER_ROW -1).'">'.tep_draw_separator('spacer.gif', '1', '10').'</td></tr>' . "\n";
echo ' <tr>' . "\n";
}
}
if ($col==MAX_DISPLAY_CATEGORIES_PER_ROW-1){
$col=0;
}else{
$col++;
}
}
// needed for the new products module shown below
$new_products_category_id = $current_category_id;
?>
</table>
<?php tep_draw_separate(); ?>
<? tep_draw_heading_bottom_3();?>
<? tep_draw_heading_bottom(); ?>
<?php tep_draw_separate(); ?> <!-- ///////// -->
<? tep_draw_heading_top(); ?>
<? new contentBoxHeading_WHATS_NEW($info_box_contents, true, false);?>
<? tep_draw_heading_top_3();?>
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
<? tep_draw_heading_bottom_3();?>
<? tep_draw_heading_bottom();?>
</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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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);
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_MODEL':
$listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_NAME':
$listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_QUANTITY':
$listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_IMAGE':
$listing_sql .= " order by pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
$listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
}
}
?>
<td width="100%" class="col_center">
<? tep_draw_heading_top();?>
<?php
// optional Product List Filter
/* if (PRODUCT_LIST_FILTER > 0) {
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
} else {
$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
}
$filterlist_query = tep_db_query($filterlist_sql);
if (tep_db_num_rows($filterlist_query) > 1) {
echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
} else {
echo tep_draw_hidden_field('cPath', $cPath);
$options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
}
echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
while ($filterlist = tep_db_fetch_array($filterlist_query)) {
$options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
}
echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
echo tep_hide_session_id() . '</form></td>' . "\n";
}
}
*/
// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$image = tep_db_fetch_array($image);
$image = $image['manufacturers_image'];
} elseif ($current_category_id) {
$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$image = tep_db_fetch_array($image);
$image = $image['categories_image'];
}
?>
<?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>
<? tep_draw_heading_bottom_3();?>
<? tep_draw_heading_bottom();?>
</td>
<?php
} else { // default page
?>
<td width="100%" class="col_center">
<?php /* require(DIR_WS_BOXES . 'panel_top.php'); */ ?>
<? tep_draw_heading_top();?>
<? /* new contentBoxHeading_ProdNew($info_box_contents); */ ?>
<? tep_draw_heading_top_3();?>
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
<?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?>
<? tep_draw_heading_bottom_3();?>
<? tep_draw_heading_bottom();?>
</td>
<?php
}
?>
<!-- body_text_eof //-->
<td class="col_right">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //--></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Thank You Adrian