Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I disable the right column for just product listing page?


sidd

Recommended Posts

Hi,

 

I need to disable the right column just for the product listing page. I've searched the entire forum but couldn't find an answer which I thought was a pretty obvious question!

 

Any pointers greatly appriciated.

 

 

-Sidd

Link to comment
Share on other sites

That's because the product listing in on the index.php page. To disable the right column on index.php will affect a few pages, no just the product listing page.

 

Open up /catalog/index.php and scroll to the bottom where it says:

 

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

 

And temporally replace it with

 

<!--//
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
//-->

 

Just to get an idea.

 

The only other idea I can think of is to try and hack it a bit. Like doing something like:

 

At the top of the page, place some code that will show the right column for everything on this page.

 

$hide_right_column = 'false';

 

 

Then find the product listing include: <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>

 

And add this right after it:

 

<?php $hide_right_column = 'true'; ?>

 

So it looks like:

 

<?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>

<?php $hide_right_column = 'true'; ?>

 

 

Then go down to your right column code and do something like:

 

<?php
 if ($hide_right_column == 'false') {
?>

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<?php
 }
?>

 

I havn't tested this, but it should work. Just tossing out some ideas.

Link to comment
Share on other sites

That's because the product listing in on the index.php page. To disable the right column on index.php will affect a few pages, no just the product listing page.

 

Open up /catalog/index.php and scroll to the bottom where it says:

 

<? if (!isset($_GET['cPath'])) { ?>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...