JulieQ Posted February 27, 2009 Share Posted February 27, 2009 Hi, I am getting this error after hitting "confirm order" on the Order Confirmation page in the checkout process: Fatal error: Call to a member function call_api() on a non-object in /home/xxxxx/public_html/store/checkout_process.php on line 127 I'm using the Check/Money Order module for payment. This is what line 127 of checkout_process.php says (in red bold): $sql_data_array = array('orders_id' => $insert_id, 'title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'class' => $order_totals[$i]['code'], 'sort_order' => $order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } Any ideas anyone???? Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2009 Share Posted February 27, 2009 what changes have been made to the site recently? Have you tried uploading your backups from before the changes were made? -jared Link to comment Share on other sites More sharing options...
JulieQ Posted March 2, 2009 Author Share Posted March 2, 2009 The site has moved hosts. A fresh install of OSC (from cpanel using fantastico) was done about three weeks ago. The data from the old host was restored to the new database without problem. A new SSL has just been installed and the site has had a graphical revamp. That's about it... Any ideas/help would be appreciated. Thanks Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2009 Share Posted March 2, 2009 How was the "graphical revamp" done? Was a template system installed? Which files were changed? If you revert (temporarily) to the files _before_ the "graphical revamp" does the error go away? -jared Link to comment Share on other sites More sharing options...
JulieQ Posted March 2, 2009 Author Share Posted March 2, 2009 Thanks Jared for steering me in the right direction. I appreciate your help and responses. After looking at checkout_process.php more closely it seemed to be the code immediatley before line 127 relating to the "buy safe" module that was creating problems. I simply removed this bit of code and now everything works fine. I note that the "Buy Safe" module seems to be a new feature in OSC since this store was originally built (in 2007) so maybe this was what confused it. Also, I can't remember if I selected Buy Safe or not when installing OSC but note that in the code it has "//" in front of it although the module's enablement is set to true. Not 100% sure what conflicts if any this created but at least it was solved by removing it. I admit that I don't really understand what the Buy Safe module actually does and probably need to investigate it further. This is the offending piece of code: // {{ buySAFE Module $buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1); $checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id); $checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params); if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true') { $update_data_array = array('buysafe_cart_id' => $buysafe_cart_id, 'buysafe_client_ip' => tep_get_ip_address(), 'buysafe_session_id' => tep_session_id()); tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'"); } // }} Thanks again! Link to comment Share on other sites More sharing options...
drofla Posted March 5, 2009 Share Posted March 5, 2009 i also have the same problem. i've just added the new sts-modernrc2a template. can anyone help to solve e problem without taking away e buysafe module? Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2009 Share Posted March 5, 2009 Well, the crux of the matter is this: Those lines of code attempt to use a function called call_api. This function has to be defined somewhere. One of two things is going on: 1 - the call_api() function gets installed as part of the BuySafe module, and you don't have the module installed properly 2 - the call_api() function does not get installed as part of the BuySafe module, and the add-on is flawed. You have to define a function before you can use it. -jared Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.