Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is there a way to not have categories?


random183

Recommended Posts

Posted

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

Posted
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?

Posted
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

Posted
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.

Posted

<?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.

Posted

No worries - I just noticed a little mistake;

 

add a

<ul>

after the

<td>

 

and

 

add a

</ul>

before the

</td>

 

Gary

Archived

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

×
×
  • Create New...