random183 Posted April 3, 2008 Posted April 3, 2008 Hi, I've setup osCommerce on the website, all working and happy with it, but I'm setting this up for my local club who want to see a few items to members, all the same sort of thing (club clothing), so categories really aren't needed. Does anyone know of a way of not having the categories, and just listing all the items in the "root" of the shop? Ideally, the items would be listed in the categories box as separate items. I've hunted through these forums for days, and typed as many different searches into Google as i can think of to no avail... :( Any ideas anyone? Cheers Mat
Guest Posted April 3, 2008 Posted April 3, 2008 Hi, I've setup osCommerce on the website, all working and happy with it, but I'm setting this up for my local club who want to see a few items to members, all the same sort of thing (club clothing), so categories really aren't needed. Does anyone know of a way of not having the categories, and just listing all the items in the "root" of the shop? Ideally, the items would be listed in the categories box as separate items. I've hunted through these forums for days, and typed as many different searches into Google as i can think of to no avail... :( Any ideas anyone? Cheers Mat Did you just try putting them in as products without having any categories?
random183 Posted April 3, 2008 Author Posted April 3, 2008 Did you just try putting them in as products without having any categories? Yes gave that a go (And just tried it again just to be sure). I end up with products with no "home"! I can see them in "Whats new" but the category list is empty, I was hoping it would put the products in there... Mat
Guest Posted April 3, 2008 Posted April 3, 2008 Yes gave that a go (And just tried it again just to be sure). I end up with products with no "home"! I can see them in "Whats new" but the category list is empty, I was hoping it would put the products in there... Mat OK, never tried that myself.
burt Posted April 3, 2008 Posted April 3, 2008 <?php /* $Id: categories.php osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License Copyright (c) www.clubosc.com */ $products_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name "); ?> <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); new infoBoxHeading($info_box_contents, false, false); $products_list = ''; while ($products = tep_db_fetch_array($products_query)) { $products_list .= '<li><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></li>'; } $info_box_contents = array(); $info_box_contents[] = array('text' => $products_list); new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> Style the <li> appropriately.
random183 Posted April 3, 2008 Author Posted April 3, 2008 Cheers Burt ! That worked perfectly, just the job! :D Thanks Mat
burt Posted April 3, 2008 Posted April 3, 2008 No worries - I just noticed a little mistake; add a <ul> after the <td> and add a </ul> before the </td> Gary
Recommended Posts
Archived
This topic is now archived and is closed to further replies.