Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

right column on index but not on cPath


Paulz

Recommended Posts

Posted

Ive managed to hide the right column on the cPath pages of the index.php page as below:

 

<?php

if($PHP_SELF == '/indexBUP.php' AND $HTTP_GET_VARS[cPath] != NULL){

}else{

require(DIR_WS_INCLUDES . 'column_right.php');

}; ?>

 

I now need to reduce the width of the hidden column the cpath page to 0 so i can have full products listed to the right of the page.

 

this is the code that needs editing:

<td class="setbox2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

Ive tried but cant get it to work

Posted

This is the default code for column_right:

 

<!-- body_text_eof //-->
<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>

To remove the table (making your product area wider) using your code, it should be something like this:

 

<!-- body_text_eof //-->
<?php
if ($PHP_SELF == '/indexBUP.php' AND $HTTP_GET_VARS[cPath] != NULL) {
} else{
?>
<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>
<?php
};
?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

<?php
if($PHP_SELF == '/indexBUP.php' AND $HTTP_GET_VARS[cPath] != NULL){
}else{
require(DIR_WS_INCLUDES . 'column_right.php');
}; ?>

 

BETTER:

<?php if ($category_depth == "top") require(DIR_WS_INCLUDES . 'column_right.php'); ?>

 

 

In index.php find this:

 

	<td width="<?php echo BOX_WIDTH; ?>" valign="top" id="left"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->

 

Remove it. Open up /includes/column_right.php

Add that same code to the very top of it!

 

Back to index.php. Find this:

<!-- right_navigation_eof //-->
</table></td>

Remove it. Back to includes/column_right.php Add the code to the very bottom of this file.

 

That should do it.

Archived

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

×
×
  • Create New...