Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

displaying categories list on main page


vazash

Recommended Posts

Hi guys,

 

Can someone please tell me if this is possible.

 

I would like to display, the list of categories that appears when someone clicks on the categories link in the left column.

 

for eg. in the left column i have a link called 'supplies'. When i click on the link, i am taken to a page which displays all the subcategories that I have under it. Is there any way I can display this list on the index page rather than have it come in another page that too only after someone clicks on the main category link.

 

Please let me know if this is possible.

 

-vazash

Link to comment
Share on other sites

 

Hi Enigma,

 

I downloaded the contribution you mentioned here, but it was not the one i was looking for. This one only shows main categories, while instead I wanted sub categories. So I did a search in the contributions pages and downloaded the below contribution which gave me main categories as well as sub categories.

 

http://www.oscommerce.com/community/contri...main+categories

 

I managed to find the code that caused the main categories to appear and so I can now see only the sub categories ... yipeee... but i face one more problem.

 

The sub categories appear one after the other unlike how it appears on the actual page which shows the sub categories...you know column wise. I would like to display it in the same manner but do not know how to do it. Please help

 

I also found two variables $ col and $ row. both have been given a value of '0'. When i change the values to any number, all the sub categories disappear. Please help.

Link to comment
Share on other sites

the original catalog\index.php splits the categories in columns. Look into that file and copy the code from the "nested" section.

Link to comment
Share on other sites

the original catalog\index.php splits the categories in columns. Look into that file and copy the code from the "nested" section.

 

 

Could you help me out a little more with exactly what is it that I have to copy, as when i took this code

 

<?php

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

$category = tep_db_fetch_array($category_query);

?>

 

I got the last box of the left column displayed in this area.

 

So can you please help me and let me know if this is all i have to copy, and also if you could please tell me where i have to post it

 

Thanks

 

-vazash

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...