Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Without session_is_registered?


shmekera

Recommended Posts

This is the code:

	function display_wholesale($products_wholesale, $products_tax, $quantity = 1) {
$let_them_see_prices = 0;
$get_id = array();
$get_id_query = tep_db_query("select customers_wholesale from customers where customers_id = '".$customer_id. "'");

  while ($their_id = tep_db_fetch_array($get_id_query))
  {
   if ($their_id['customers_wholesale']== 1) {$let_them_see_prices = 1;}
  }

	if( (tep_session_is_registered('customer_id')) && ($let_them_see_prices == 1) )
	{
	return $this->format(tep_add_tax($products_wholesale, $products_tax) * $quantity);	
	} else {
	return 'no access.';
	}
}

 

But I want the code without session_is_registered function? Thanks!

Link to comment
Share on other sites

well the code you are asking for is simple - just remove the session_is_registered:

	function display_wholesale($products_wholesale, $products_tax, $quantity = 1) {
$let_them_see_prices = 0;
$get_id = array();
$get_id_query = tep_db_query("select customers_wholesale from customers where customers_id = '".$customer_id. "'");

  while ($their_id = tep_db_fetch_array($get_id_query))
  {
   if ($their_id['customers_wholesale']== 1) {$let_them_see_prices = 1;}
  }

	if( $let_them_see_prices == 1 ) 
	{
	return $this->format(tep_add_tax($products_wholesale, $products_tax) * $quantity);	
	} else {
	return 'no access.';
	}
}

but i doubt that it'll do what you are expecting it to do.

 

Perhaps if you explained what contrib you are using and what the problem is we might be able to help you more.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...