Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Detecting single vs multiple categories


Guest

Recommended Posts

Hello,

 

I am currently working on porting my existing site over to OsCommerce. I am keeping the look and layout of the existing site and adding the functionality of OsCommerce. It is going fairly smoothly, however I have run into something that I am having difficulty figuring out, and I can't find anything on the forums or contributions sections that would solve my problem.

 

The way the existing site works is the user clicks on a link on the side of the page, and the index.php file loads the required content into a central content cell. Currently, I only have a couple of products and have no need for multiple categories, but that will change in the future. Right now, if you look at the half-ported site, clicking on the Products button on the left loads the categories box into the content area. You then have to click on the Products category to get to the products listing page. I would like to add code to the main Products button on the left such that it would be able to query the database and do one of two things:

 

1 - If there is only one category (Products) then don't display the categories box, just show the contents of that category in the content area.

 

2 - If there are multiple categories, then show the categories box in the content area, and the user can select a category.

 

The site currently does #2 only.

 

Here's a link to the half-ported site:

 

http://www.glasstoneamps.com/oscom/index.php

 

Thanks in advance for any help that may be offered!

 

Brian

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...