Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 - Unknown column 'p.products_id' in 'on clause'


NothingButRomance

Recommended Posts

1054 - Unknown column 'p.products_id' in 'on clause'

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join 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 = '1' and p2c.categories_id = '9'

[TEP STOP]

 

I get that when I click on any of the categories.

Here is my site if you want to see the actual page : www.NothingButRomance.com

 

I just installed the Register Patch yesterday so that I could get into my Admin. I do not know, however, if this category issues already existed or is part of my handy work with the patch <_<

 

This is a site that was painstakingly create several years ago and then put aside, I really hope to be able to "stock the shelves" and get it going before Christmas, so any detailed help would be greatly appreciated :D

 

Thanks so much,

Lalla

Link to comment
Share on other sites

All from this link applies to you but for your immediate problem, the part about "MySQL 5.0 Compatibility" is what you need.

 

http://www.oscommerce.com/ext/update-20051113.html

 

Well, you have saved me hours of searching, thank you! I have been finding this same 1054 error and it is frustrating. The only way a customer can view my products is to click on the "What's New" arrow on the left side bar.

 

I'm hoping that I can easily make the changes to the proper areas and import them without further hassle, but will make a back-up first, just in case. If you want to see what I am up against, please visit my issues (LOL) at http://www.watsonlanding.com/shop

Link to comment
Share on other sites

Oops ... there was no option to edit my first post, please excuse a second post before a reply has occured.

 

I have successfully made the changes and no longer receive a 1054 error. Now, I can live with the little "n" that appears in a vertical row on some of the categories, but would rather fix it properly. I would assume this might be due to not understanding how to do the last part of the fix that was given for the 1054 error.

 

The part I mean is:

The following SQL queries need to be performed:

 

 

ALTER TABLE whos_online MODIFY COLUMN last_page_url VARCHAR(255) NOT NULL;

 

ALTER TABLE customers MODIFY COLUMN customers_default_address_id INTEGER;

 

ALTER TABLE customers_basket MODIFY COLUMN final_price DECIMAL(15,4);

 

If you can help with how to do these queries, I would be very grateful. Thanks so much for any and all help.

Link to comment
Share on other sites

Oops ... there was no option to edit my first post, please excuse a second post before a reply has occured.

 

I have successfully made the changes and no longer receive a 1054 error. Now, I can live with the little "n" that appears in a vertical row on some of the categories, but would rather fix it properly. I would assume this might be due to not understanding how to do the last part of the fix that was given for the 1054 error.

 

The part I mean is:

The following SQL queries need to be performed:

 

 

ALTER TABLE whos_online MODIFY COLUMN last_page_url VARCHAR(255) NOT NULL;

 

ALTER TABLE customers MODIFY COLUMN customers_default_address_id INTEGER;

 

ALTER TABLE customers_basket MODIFY COLUMN final_price DECIMAL(15,4);

 

If you can help with how to do these queries, I would be very grateful. Thanks so much for any and all help.

see post number 5 here

Link to comment
Share on other sites

Wow ... that was fast, thank you very much.

 

I did manage to find the SQL query and execute all 3 queries successfully, according to the result after pressing "GO"

 

I am still getting those vertical "n"'s running down some of the pages ... example as here.

 

Livable, yes, but annoying. Do you have any suggestions for this issue?

Thanks so very much, again.

Link to comment
Share on other sites

Wow ... that was fast, thank you very much.

 

I did manage to find the SQL query and execute all 3 queries successfully, according to the result after pressing "GO"

 

I am still getting those vertical "n"'s running down some of the pages ... example as here.

 

Livable, yes, but annoying. Do you have any suggestions for this issue?

Thanks so very much, again.

Probably caused by something like (as an example only)

 

define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n');

 

The \n\n mean new line, by in your case do not have the \ in front of the n.

Link to comment
Share on other sites

Oh wow, that even makes sense, but I wouldn't know where to look for that. I doesn't appear to happen on all pages. I guess I will need to read each of the areas that I changed with the updated codes and see if I have a duplicate there.

 

Thanks again!

Link to comment
Share on other sites

Oh wow, that even makes sense, but I wouldn't know where to look for that. I doesn't appear to happen on all pages. I guess I will need to read each of the areas that I changed with the updated codes and see if I have a duplicate there.

 

Thanks again!

I would start looking in the language files.

Link to comment
Share on other sites

The n n n n's only occur on your top level cats so probably come from the root level index.php file. At a guess, I would say you have this:

 

	  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";

 

which should be this:

 

	  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";

 

 

Only use a plain text editor to edit your files, not something like Word or your admin file manager.

Link to comment
Share on other sites

WOW ... now I have to go find out how you knew I was being lazy. LOL ... I should have thought about that myself, I did use the command console to edit the page. However, following your suggestion to change the index.php in Notepad, I have the same result.

 

Now, I have checked the other pages and I have come up with what may be a suggestion to the solution. Do you think it is possible that the pages (3) that are showing the "n" could possibly be the parent category, when their are child categories with no products as yet? Seems that the child categories are the ones that are showing correctly. As a matter of testing this theory, I will go put product in the empty child folders and see what happens.

 

You guys are amazing, truly!. Not only do I get real answers to my questions, but they are in a quick fashion. Thank you very much.

Link to comment
Share on other sites

If you have made the changes to index.php - so now a standard file should have 4 instances of \n - then it probably didn't overwrite the one on your server, when you uploaded it.

Check the file to make sure you have indeed got it how it should be then before you upload it, rename the index.php file on your server to index.php.bak. That will ensure the upload will work.

Link to comment
Share on other sites

Hi,

I'm having a problem editing the catalog/advanced_search_result.php file. Mine doesn't look EXACTLY like the one on the solution page...so I'm not sure what to do.

Here is what my area of that file looks like :

 

$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
  $customer_country_id = STORE_COUNTRY;
  $customer_zone_id = STORE_ZONE;
}
$from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')";
 }

 //XX $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";
 //XX Use above with categories_id OR below if no categories_id
 $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' ";

 // Never show Zero-quantity items
 $where_str .= " and p.products_quantity > 0";

 

I think that's the right place :blink:

Help! :huh:

Link to comment
Share on other sites

I should add that I went thru the steps originally and while it then allowed me to get into my Categories, I couldn't get into my Series (orig. Manuf list) List. I'm guessing since I had some "extra" work done on my site, that I edited something I wasn't supposed to. I have reset the files from the MYSQL 5.0 Campatibility fix and wanted to start over....when I realized the code I have doesn't match what's in the fix. Don't want to break it any further...so have left them unedited.

Can someone please compare my code to the code on that fix page and let me know how to edit it correctly?

 

Thanks so much!

Link to comment
Share on other sites

Hi NothingButRomance ... here is the codes from my advanced_search_result.php page. I hope that might be what you are looking for.

<?php
/*
 $Id: advanced_search_result.php,v 1.72 2003/06/23 06:50:11 project3000 Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

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

 $error = false;

 if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) &&
   (isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) &&
   (isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) &&
   (isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) &&
   (isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) ) {
$error = true;

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
 } else {
$dfrom = '';
$dto = '';
$pfrom = '';
$pto = '';
$keywords = '';

if (isset($HTTP_GET_VARS['dfrom'])) {
  $dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']);
}

if (isset($HTTP_GET_VARS['dto'])) {
  $dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']);
}

if (isset($HTTP_GET_VARS['pfrom'])) {
  $pfrom = $HTTP_GET_VARS['pfrom'];
}

if (isset($HTTP_GET_VARS['pto'])) {
  $pto = $HTTP_GET_VARS['pto'];
}

if (isset($HTTP_GET_VARS['keywords'])) {
  $keywords = $HTTP_GET_VARS['keywords'];
}

$date_check_error = false;
if (tep_not_null($dfrom)) {
  if (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) {
	$error = true;
	$date_check_error = true;

	$messageStack->add_session('search', ERROR_INVALID_FROM_DATE);
  }
}

if (tep_not_null($dto)) {
  if (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) {
	$error = true;
	$date_check_error = true;

	$messageStack->add_session('search', ERROR_INVALID_TO_DATE);
  }
}

if (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) {
  if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) {
	$error = true;

	$messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE);
  }
}

$price_check_error = false;
if (tep_not_null($pfrom)) {
  if (!settype($pfrom, 'double')) {
	$error = true;
	$price_check_error = true;

	$messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM);
  }
}

if (tep_not_null($pto)) {
  if (!settype($pto, 'double')) {
	$error = true;
	$price_check_error = true;

	$messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM);
  }
}

if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {
  if ($pfrom >= $pto) {
	$error = true;

	$messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);
  }
}

if (tep_not_null($keywords)) {
  if (!tep_parse_search_string($keywords, $search_keywords)) {
	$error = true;

	$messageStack->add_session('search', ERROR_INVALID_KEYWORDS);
  }
}
 }

 if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) {
$error = true;

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
 }

 if ($error == true) {
tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false));
 }

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false));
?>
<!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; ?>">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<title><?php echo TITLE; ?></title>
<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="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<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_2; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_2, 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>
<?php
// 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_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;
}
 }

 $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, 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 ";

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
$select_str .= ", SUM(tr.tax_rate) as tax_rate ";
 }

 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
  $customer_country_id = STORE_COUNTRY;
  $customer_zone_id = STORE_ZONE;
}
$from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')";
 }

 $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 if (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) {
if (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) {
  $subcategories_array = array();
  tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']);

  $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'";

  for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
	$where_str .= " or p2c.categories_id = '" . (int)$subcategories_array[$i] . "'";
  }

  $where_str .= ")";
} else {
  $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'";
}
 }

 if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
$where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
 }

 if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
$where_str .= " and (";
for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
  switch ($search_keywords[$i]) {
	case '(':
	case ')':
	case 'and':
	case 'or':
	  $where_str .= " " . $search_keywords[$i] . " ";
	  break;
	default:
	  $keyword = tep_db_prepare_input($search_keywords[$i]);
	  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'";
	  if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= ')';
	  break;
  }
}
$where_str .= " )";
 }

 if (tep_not_null($dfrom)) {
$where_str .= " and p.products_date_added >= '" . tep_date_raw($dfrom) . "'";
 }

 if (tep_not_null($dto)) {
$where_str .= " and p.products_date_added <= '" . tep_date_raw($dto) . "'";
 }

 if (tep_not_null($pfrom)) {
if ($currencies->is_set($currency)) {
  $rate = $currencies->get_value($currency);

  $pfrom = $pfrom / $rate;
}
 }

 if (tep_not_null($pto)) {
if (isset($rate)) {
  $pto = $pto / $rate;
}
 }

 if (DISPLAY_PRICE_WITH_TAX == 'true') {
if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";
if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")";
 } else {
if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")";
if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")";
 }

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
$where_str .= " group by p.products_id, tr.tax_priority";
 }

 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';
	$order_str = ' order by pd.products_name';
	break;
  }
}
 } else {
$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
$sort_order = substr($HTTP_GET_VARS['sort'], 1);
$order_str = ' order by ';
switch ($column_list[$sort_col-1]) {
  case 'PRODUCT_LIST_MODEL':
	$order_str .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_NAME':
	$order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : "");
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$order_str .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$order_str .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_IMAGE':
	$order_str .= "pd.products_name";
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_PRICE':
	$order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
}
 }

 $listing_sql = $select_str . $from_str . $where_str . $order_str;

 require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
  </tr>
</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

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

 

I'm still having issues with my <b>index.php</b> in as much that I am not sure where the referred 4 instances of the /n should be. I might be miscounting, but I only have 3 that I can find.

<?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 (c) 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="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></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%" 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"><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>
<?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 '</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'];
}
?>
		<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, 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><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
  </tr>
</table></td>
<?php
 } else { // default page
?>
<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 . 'table_background_default.gif', HEADING_TITLE, 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="0">
	  <tr>
		<td class="main"><?php echo tep_customer_greeting(); ?></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_MAIN; ?></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>
<?php
include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
	</table></td>
  </tr>
</table></td>
<?php
 }
?>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

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

Link to comment
Share on other sites

I see 4 \n in your code. I looked at mine and I see 4 as well. I can post my index I guess if you want to see if they are in the right places. :)

 

 

I just went thru your code searching for all of the n ('s) and I didnt' see anything out of line. Are you sure the problem lies in your Index.php?

Link to comment
Share on other sites

Thanks, I appreciate the extra eyes. I honestly have no idea where the issue is. It was suggested to look in the index.php and also the languages.php, but I haven't been able to locate the issue.

 

I had thought that have category folders, that were not loaded with product yet, might be the issue. Testing that theory by adding product to one of the empty folders resulted in no difference when I looked.

 

I also noticed that I had 8 empty attributes mysteriously loaded into my product attributes after running the queries. Not sure what that was about, but no difference when I edited them to include real attributes.

 

Currently, I have 13 <b>n</b>'s running vertical down the parent page of my categories. HERE

 

There are 8 n's running vertically down the child category HERE.

 

There is only 1 n running vertically down the category HERE. Being this is the original page from the loaded osCommerce (computer area), I have no idea if I have done something, or if it was always there.

Link to comment
Share on other sites

Currently, I have 13 <b>n</b>'s running vertical down the parent page of my categories. HERE

 

There are 8 n's running vertically down the child category HERE.

 

There is only 1 n running vertically down the category HERE. Being this is the original page from the loaded osCommerce (computer area), I have no idea if I have done something, or if it was always there.

 

OK, I found your N's but not sure where to go to fix them. What I did was right click on the page with 13 and clicked the View Source and searched for N's. Here is the code that needs to be edited :

 

href="http://www.watsonlanding.com/shop/index.php?cPath=22_23"><img src="images/CustomBaskets.jpg" border="0" alt="Baskets" title=" Baskets " width="100" height="57"><br>Baskets</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_24"><img src="images/bathsalts.jpg" border="0" alt="Bath Products" title=" Bath Products " width="100" height="57"><br>Bath Products</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_31"><img src="images/3wick6x6.jpg" border="0" alt="Candles" title=" Candles " width="100" height="57"><br>Candles</a></td>n			  </tr>n			  <tr>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_25"><img src="images/meltingpots.jpg" border="0" alt="Containers" title=" Containers " width="100" height="57"><br>Containers</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_26"><img src="images/pedestalsmallDP.jpg" border="0" alt="Dipped Plush" title=" Dipped Plush " width="100" height="57"><br>Dipped Plush</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_30"><img src="images/pedestal3_floral.jpg" border="0" alt="Floral" title=" Floral " width="100" height="57"><br>Floral</a></td>n			  </tr>n			  <tr>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_27"><img src="images/incensesticks.jpg" border="0" alt="Incense" title=" Incense " width="100" height="57"><br>Incense</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_28"><img src="images/CitronellaBucket.jpg" border="0" alt="Seasonal" title=" Seasonal " width="100" height="57"><br>Seasonal</a></td>n				<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.watsonlanding.com/shop/index.php?cPath=22_29"><img src="images/weddding.jpg" border="0" alt="Wedding" title=" Wedding " width="100" height="57"><br>Wedding</a></td>n			  </tr>

 

You can see 13 there nad the N is outside of the code.

I do think this is in the Categories file. It seems to list a N for however many cats show on that page.

I hope this helps!

Link to comment
Share on other sites

If you have made the changes to index.php - so now a standard file should have 4 instances of \n - then it probably didn't overwrite the one on your server, when you uploaded it.

Check the file to make sure you have indeed got it how it should be then before you upload it, rename the index.php file on your server to index.php.bak. That will ensure the upload will work.

 

As I said, are you certain the index.php file you uploaded has been corrected?

 

Look at this portion of code:

 

	  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";

 

Notice a new line after every closing cell tag, after every closing row tag and every new row tag:

 

</td>' . "\n";
	echo '			  </tr>' . "\n";
	echo '			  <tr>' . "\n";

 

Also notice the extra large space before the tags. Now look at your source code and first notice no new lines, then where the erroneous n n n's are, after the tags, plus the extra large spaces before the tags:

 

</a></td>n				<td align="center" class="smallText" width="33%" valign="top"></td>n				<td align="center" class="smallText" width="33%" valign="top"></td>n			  </tr>n			  <tr>n

 

So unless your code is being sanitised or there is a big coincidence, I don't think the file on your server is fixed. Download index.php and check it.

Link to comment
Share on other sites

NothingButRomance ... thank you for finding the n's in the source codes. I am used to writing HTML and have never understood PHP coding.

 

Peter ... honest, I swear, I really did upload (into root/httpsdocs/shop)a new text document index.php, along with changing the original to index.php.bak ... they are identical files. I put the index.php codes in Post #15 last night, and that is identical as well.

 

Okay, I haven't lost my mind ... first, I went to load the file in a RAR so that I could link it to you and you could look at it. I found something odd. All along, I had been working on the file in the root/httpsdocs/shop directory ... turns out that the SAME files are located in httpdocs/shop directory. I have uploaded the index.php into there now, and upon refresh of my store ... no N's!!

 

I can't thank you enough, seriously, I was starting to get frustrated.

 

Okay, off to search for how to add Local "Pick up" at $0.00 to my delivery options.

Link to comment
Share on other sites

Okay, now I feel sick ... the 13 n's are gone from the main page, but most of the rest of my categories are back to the 1054 - Unknown column 'p.products_id' in 'on clause'.

 

I am totally baffled as to why this is now happening again. Would there be any reason to have to run the SQL queries again? Is it possible that my httpdocs/shop/admin folder is the reason? This folder only has the index.php file in it, nothing else, therefore the fix for compatibility can't be performed in this folder, on the catalog/admin/categories.php file.

 

The root/httpsdocs/shop/admin folder is the only place that the categories.php file is showing, and I had already fixed that as per the compatibility update.

 

I will continue, again, to check to see if the suggested new codes are still in place in the files.

Link to comment
Share on other sites

Okay, now I feel sick ... the 13 n's are gone from the main page, but most of the rest of my categories are back to the 1054 - Unknown column 'p.products_id' in 'on clause'.

 

I am totally baffled as to why this is now happening again. Would there be any reason to have to run the SQL queries again? Is it possible that my httpdocs/shop/admin folder is the reason? This folder only has the index.php file in it, nothing else, therefore the fix for compatibility can't be performed in this folder, on the catalog/admin/categories.php file.

 

The root/httpsdocs/shop/admin folder is the only place that the categories.php file is showing, and I had already fixed that as per the compatibility update.

 

I will continue, again, to check to see if the suggested new codes are still in place in the files.

 

D'OH!!!!!

 

No, you need to fix index.php. Make the MySQL 5 updates to the index file in the httpdocs directory and you should be ok.

Link to comment
Share on other sites

My dearest Peter, you have been an angel to hold my hand while this has been coming together. The twin directory thing ... which one doesn't belong (feels like a Sesame Street riddle). The codes are still corrected and I really can't find the problem now that the errors are back. Will you share some more wisdom with me please? I wish I could just let you in there to see for yourself, other than pictures, I don't know how to show you what's up.

 

I will check into the link you gave me, I was having a ball with all the stuff I found last night, and have managed to completely personalize my site. It looks great ... providing you don't use the categories link to try to go anywhere. LOL

Link to comment
Share on other sites

I've never experienced it personally, I think the system is a bit antiquated, but the twin directories are used for SSL and NonSSL connections. As far as I am aware, the files meant to have an SSL connection should be the ones that go into the httpsdocs directory. So, you should have a complete set of files in the NonSSL, httpdocs directory. You definitely have a full set in one as I can navigate to all files and see all images from the NonSSL links but if I use https, all images are missing and also the language constants are stock osC. I'll PM you a link so you know what I mean.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...