Whlst working on an improved version of the OSCommerce mod "Browse by Categories" for a client, I came up with the following which might help you folks out a bit in the future.
I had to turn off the columns, both on the index page, right on the index page when nested and none off when viewing the index products page.
http://www.mdjl-demo.co.uk/demo for example.
First:
Add the following to your template.php file found in your template folder, just before the last ?> will be ok.
Code:
$view_left_column = 'true';
$view_right_column = 'true';
Now open your main_page_tpl.php file found in the same folder and find around line 87:
Code:
if (DISPLAY_COLUMN_LEFT == 'yes' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false')) {
Replace with:
Code:
if ($view_left_column == 'true' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false')) {
Find around line 121:
Code:
if (DISPLAY_COLUMN_RIGHT == 'yes' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false')) {
Replace with:
Code:
if ($view_right_column == 'true' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false')) {
Save and close.
Now, for example to turn off the right and left columns on the index page, open index.php found in your root folder.
Find around line 16:
Code:
$category_depth = 'top';
add below:
Code:
$view_right_column = 'false';
$view_left_column = 'false';
To turn off the right column when viewing sub categories (Nested) find around line 32:
Code:
$category_depth = 'nested'; // navigate through the categories
Add below:
Code:
$view_right_column = 'false';
$view_left_column = 'true';
to display both columns when on the index products page, find around line 24
Code:
$category_depth = 'products'; // display products
Add below:
Code:
$view_right_column = 'true';
$view_left_column = 'true';
Also find around line 37
Code:
$category_depth = 'products'; // category has no products, but display the 'no products' message
Add below:
Code:
$view_right_column = 'true';
$view_left_column = 'true';
To turn off the columns on any other page, open up the file relating to the page you want to turn the columns off on, in your root folder, again example for product info page would be product_info.php.
Find:
Code:
$javascript = 'popup_window.js';
Add below:
Code:
$view_right_column = 'false';
$view_left_column = 'true';
and so on you can now turn off any column on any poage you like.