Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Do I Remove The Product Notifications Info Box?


theknivery

Recommended Posts

Hello, I'm trying to remove the product notifications info box from the right-hand column but so far I am only half successful as now it is showing up only to guests, not members. The following is what my column_right.php file looks like right now:

 

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
  $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
  $check = tep_db_fetch_array($check_query);
  if ($check['count'] > 0) {
	include(DIR_WS_BOXES . 'best_sellers.php');
  } 
} else {
  include(DIR_WS_BOXES . 'product_notifications.php');
}
 } else {
include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
include(DIR_WS_BOXES . 'specials.php');
 }

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
require(DIR_WS_BOXES . 'paypal.php');
include(DIR_WS_BOXES . 'languages.php');
include(DIR_WS_BOXES . 'currencies.php');
 }
?>

 

Could someone please tell me what this file should look like to correctly disable the Product Notifications box? Thanks for any and all help as it is greatly appreciated.

 

TheKnivery

Link to comment
Share on other sites

Comment out this part:

 

  
else {
include(DIR_WS_BOXES . 'product_notifications.php');
}

 

I hate to sound like a stooge but I'm not sure how to do that. Does that mean just remove that particular bit of code or does it mean that I actually have to enter some new code around that code?

Link to comment
Share on other sites

I hate to sound like a stooge but I'm not sure how to do that. Does that mean just remove that particular bit of code or does it mean that I actually have to enter some new code around that code?

 

to disable your product notifacation change this:

 

} 
} else {
  include(DIR_WS_BOXES . 'product_notifications.php');
}
 } else {

 

to this:

 

} 
} else {
  //include(DIR_WS_BOXES . 'product_notifications.php');
}
 } else {

 

and see that will do it

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

mtechama has it right. For php if you use // at the beginning of a line it makes the server pass over it and ignore any commands. It's really useful to learn how to comment out things when working with OSC so you can test things with no danger. To comment out HTML you would use the following:

 

<!-- stuff to comment out -->

 

For the record I'd be tempted to comment out the entire 'else' part above, so mine would look like this:

 

//else {
//	include(DIR_WS_BOXES . 'product_notifications.php');
//	}

 

...but that's just personal preference! I'm a neat freak :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...