Guest Posted December 17, 2005 Share Posted December 17, 2005 Hello I need some help with my set up of oscommerse for selling calling cards. Last part, for sending mail gives me an error "Call to undefined function tep_db_fetch_row() in /http/htdocs/os/checkout_process.php on line 224". I'm not shure for exact place and also right syntax:( Please help me . Thanks I use the following code: http://www.oscommerce.com/forums/index.php?showtopic=60504 CODE -------------------------------------------------------------------- CREATE TABLE `call_nums` ( `call_nums_card` VARCHAR( 20 ) NOT NULL , `call_nums_pin` VARCHAR( 10 ) NOT NULL , `calling_card_value` VARCHAR(10) NOT NULL, `customers_id` INT( 11 ) DEFAULT '0' NOT NULL , `call_nums_issued` TIMESTAMP , PRIMARY KEY ( `call_nums_card` ) , INDEX ( `customers_id` ) ) COMMENT = 'Stores numbers and pins for calling cards'; --------------------------------------------------------------------- In includes/database_tables.php, add CODE define('TABLE_CALL_NUMS', 'call_nums'); --------------------------------------------------------------------- To assign the card to someone (PHP code for checkout_process.php): CODE tep_db_query("update " . TABLE_CALL_NUMS . " set customers_id='" . (int)$customer_id . "', call_nums_issued=now(), calling_card_value='" . $order->products[$i]['price'] . "' where customers_id='0' limit 1"); ---------------------------------------------------------------------- To get the info to put into the email: CODE $call_nums_query = tep_db_query("select call_nums_card, call_nums_pin from " . TABLE_CALL_NUMS . " where customers_id='" . (int)$customer_id . "' order by call_nums_issued desc limit 1"); $call_nums_array = tep_db_fetch_row($call_nums_query); $email_order .= $call_nums_array; Any help will be apreciated Thanks again Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2005 Share Posted December 17, 2005 there is no tep_db_Fetch_row function with the default osc. If you integrated a contribution re-check the installation steps in case you forgot to add that function. Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 there is no tep_db_Fetch_row function with the default osc. If you integrated a contribution re-check the installation steps in case you forgot to add that function. Thanks for answer. I tried to define in database.php but without any success - do you have any idea how to define it ? Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 OK I define it but now get the folowing for $call_nums_query - Resource id #70 and $call_nums_array - array ? Any ideas why ? Thanks Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 Ok, I checked that old post, can you replace the tep_db_fetch_row with tep_db_fetch_array function and see if it helps. The tep_db_fetch_array is already defined in the database.php Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 Ok, I checked that old post, can you replace the tep_db_fetch_row with tep_db_fetch_array function and see if it helps. The tep_db_fetch_array is already defined in the database.php I tried but got the follow $call_nums_query - Resource id #70 and $call_nums_array - array I made the following: $sql="SELECT call_nums_card, call_nums_pin from call_nums where customers_id='" . (int)$customers_id . "' order by call_nums_issued desc limit 1"; $ok=mysql_query($sql) or die(mysql_error()); while ($r=mysql_fetch_assoc($ok)) { $user=$r["call_nums_card"]; $pass=$r["call_nums_pin"]; } $email_order .= $user . "\n"; $email_order .= $pass; and it works for me :D now I try to load payment module based on price of products. Why - I have free accounts and want when price is 0 to load my rewriten module very similar of Cash on delivery and when price is greater than 0 the other module for my epay company. I'm trying to understand what value checkout_payment.php sends for each module selection. ideas with that ? Thanks to all in advance Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.