andyshep Posted February 18, 2006 Posted February 18, 2006 hi all, i have a promblem with the categories page in oscommerce. when you view the page i get a series of "n" s going down the page. i think i can see the code that is causing the prob: from index.php, // 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 can anyone explain to me why im getting these n's displayed? cheers in advance
vasttech Posted February 18, 2006 Posted February 18, 2006 Sounds like you are using the osCommerce File Manager to edit your files. It is very buggy and I would highly recommend using a PHP/HTML editor to make changes to your pages then uploading them to your site. You can search the forums for some good, free editors that are out there. I would also recommend getting one that displays the line numbers (it makes editing and adding contributions much easier). Lastly, get yourself a decent FTP program for uploading files to the site. osCommerce Knowledge Base osCommerce Documentation Contributions
andyshep Posted February 19, 2006 Author Posted February 19, 2006 Sounds like you are using the osCommerce File Manager to edit your files. It is very buggy and I would highly recommend using a PHP/HTML editor to make changes to your pages then uploading them to your site. You can search the forums for some good, free editors that are out there. I would also recommend getting one that displays the line numbers (it makes editing and adding contributions much easier). Lastly, get yourself a decent FTP program for uploading files to the site. im using dreamweaver 8 to edit the files... still, anyone got an explaination of the code i posted or why im getting the n's in the page?
Guest Posted February 19, 2006 Posted February 19, 2006 looks like your CRs arent escaped. Should be: echo ' </tr>' . "\n";
andyshep Posted February 21, 2006 Author Posted February 21, 2006 looks like your CRs arent escaped. Should be: echo ' </tr>' . "\n"; seems to have solved the problem. unsure why they wasnt escaped. it was a fresh installation. Cheers
Recommended Posts
Archived
This topic is now archived and is closed to further replies.