nitro7 Posted June 17, 2003 Posted June 17, 2003 Hello here is the error I am getting when I try to checkout. Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/data/oswholesalelaptops.com/catalog/includes/classes/ups.php:160) in /usr/local/www/data/oswholesalelaptops.com/catalog/checkout_payment.php on line 32 And here is the snippet of code it is referring to with line numbers included. Any help greatly appreciated. We are using PHP/4.3.2. 2 <? 3 if (getenv(HTTPS)) { 4 $connection = 'SSL'; 5 } else { 6 $connection = 'NONSSL'; 7 } 8 if ($cart->count_contents() == 0) { 9 header('Location: ' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL')); 10 tep_exit(); 11 } 12 if (!tep_session_is_registered('customer_id')) { 13 header('Location: ' . tep_href_link(FILENAME_LOGIN, 'origin=' . FILENAME_CHECKOUT_PAYMENT . '&connection=' . $connection, 'NONSSL')); 14 tep_exit(); 15 } 16 $sendto = $HTTP_POST_VARS['sendto']; 17 if ($sendto == '') { 18 $sendto = '0'; 19 $shipping_quote_all = '1'; 20 } 21 if ($sendto == '0') { 22 $address = tep_db_query("select customers_postcode as postcode, customers_country_id as country_id from customers where customers_id = '" . $cust omer_id . "'"); 23 } else { 24 $address = tep_db_query("select entry_postcode as postcode, entry_country_id as country_id from address_book where address_book_id = '" . $sendto . "'"); 25 } 26 $address_values = tep_db_fetch_array($address); 27 $total_weight = $cart->show_weight(); 28 $total_count = $cart->count_contents(); 29 $action = 'quote'; 30 include(DIR_WS_MODULES . 'shipping.php'); 31 if ($shipping_quoted == '' && SHIPPING_MODULES != '') { // Null if no quotes selected 32 header('Location: ' . tep_href_link(FILENAME_CHECKOUT_ADDRESS, '' , $connection)); 33 tep_exit(); 34 } 35 ?> Thank you, Clint
chfields Posted June 17, 2003 Posted June 17, 2003 Open up /catalog/includes/classes/ups.php and delete any blank spaces after the last ?> in the file. that should solve your problem.
nitro7 Posted June 17, 2003 Author Posted June 17, 2003 DUH bad thing is this question has already been answered. Thank you and sorry for repeat questions. Clint
Recommended Posts
Archived
This topic is now archived and is closed to further replies.