Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Layout question


Recommended Posts

I will try and ask this as clearly as possible but I am sorry if it comes out confusing.


On the left is the list of categories. When you click on a category it takes you to a page listing the items within that category. Is there any way to put text in there?

What I want is for them to click the category then when the page opens there is a little blurb about the producst before the listing.


Here is an example:

This is my site using OS Commerce



You will see when you click on one of my categories how it looks.


Here is my friend's site using Zencart



You will see when you click on hers (graphic sets) for example. It has information.


Is this possible in OSCommerce?


Thanks so much

Link to comment
Share on other sites

Short answer is yes it can be done. Requires a little tweaking. With ZenCart it is just a simple setting (but ZenCart discussion is forbidden here). With osCommerce you can do it though to answer your question. The biggest difference though is that with your friend's site she only has one product in each category where you have multiple. Doing this will only work if you have one product in the category otherwise you will get a list of all products in the category like you do now.

Link to comment
Share on other sites

Yes that contribution will work as well if that is what you want to have. I thought you meant go to a category, click on the link, and are taken to a product page where you can order like your friend has. The contribution allows you to create category descriptions with 255 characters or less, but will still list all the products below it like you are seeing now.

Link to comment
Share on other sites



You may be looking for this contribution by Andreas Thyholdt:


This mod will take you directly to product info when the clicked category only has one product.


Its simple to implement, only one file to change.

  1. open catalog/index.php
  2. Find on line 20 on a stock OSC MS2.2 installation:

if ($cateqories_products['total'] > 0) {


Insert the following code directly below the above line:



if (tep_count_products_in_category($cPath) == 1) {

$oneprodquery = tep_db_query("select DISTINCTROW p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "'");

$oneprod = tep_db_fetch_array($oneprodquery);

tep_redirect(FILENAME_PRODUCT_INFO . "?cPath=" . (int)$current_category_id . "&products_id=" . $oneprod['products_id'] . "&osCsid=" . tep_session_id()); 



That's it. Any category selected that has only one product will now take you directly to the products page, saving the customer an extra click.


I used this recently for a client who was using the latest osC release 060817 so I know it works quite nicely.


Hope this helped,


Bill Kellum


Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Thanks so much for the replies !!


Wow - Thanks Squalid, I was looking through the contributions the other day (for something else) but don't recall seeing this one at all. - Great, Thanks again.


vasttech - Zen what? Never been there, seen it, done it, heard of it (grin).


bkellum - Thanks so much. Am gonna peek at the one mentioned above and log this one and see what is what. I should be able to make something work :)


Thanks again!

Link to comment
Share on other sites

Tried teh contribution and screwed it alllllll up lol. I swear I followed it exacvtly and it made a mess of my site with errors all over :(

Guess I'll try the next suggestion now.

Link to comment
Share on other sites

Why your product list looks different than your friends.


Zen cart links directly to the 1 product info page if there isn't a listing of more that 1 product in that catagorie.


Once your friend has more than one product in that catagorie She will get the page that lists all the products in that catagorie either in 1 2 or 3 columns whichever she sets it for.

Link to comment
Share on other sites


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

  • Create New...