Years back I had a client who had only a few products in his store. Rather than use the category infoBox I rewrote it to simply give a direct link to each product.
It’s funny that I was looking at that store the other day (it’s on the Hot 100 list), and today someone in the osCommerce Forum asked for exactly the same thing.
Rather than try to find the file I used on that old site, I just rewrote the script. 2 minutes later, and here we are;
[php]
new infoBoxHeading($info_box_contents, false, false);
$products_list = ‘
- ‘;
- ‘ . $products[‘products_name’] . ‘
while ($products = tep_db_fetch_array($products_query)) {
$products_list .= ‘
‘;
}
$products_list .= ‘
‘;
$info_box_contents = array();
$info_box_contents[] = array(‘text’ => $products_list);
new infoBox($info_box_contents);
?>
[/php]
What this script will do is simply list all your products in a long list, instead of the category box. Easy as 123, eh?
Obviously if you use this script, you will need to set a style on the <ul and maybe the <li – depends upon what you want the list to look like 😉
Hi Gary,I have a potential client that only offers 1 product to sell. This looks like it could work for this situation. Thanks for the tip!
Ron
ps – I like this blog…lots of good info here.
Ron – should work just fine – let me know?
Thanks. I am meeting with him next week so I will keep you posted.