shmekera Posted November 13, 2008 Share Posted November 13, 2008 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 More sharing options...
Guest Posted November 13, 2008 Share Posted November 13, 2008 why? Link to comment Share on other sites More sharing options...
shmekera Posted November 13, 2008 Author Share Posted November 13, 2008 Because with this function I can't see the wholesale prices.. Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2008 Share Posted November 13, 2008 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 More sharing options...
shmekera Posted November 14, 2008 Author Share Posted November 14, 2008 Thanks! It works :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.