Dennis_gull Posted March 24, 2007 Share Posted March 24, 2007 Hello, im trying to redirect the customer back to the main page if the shopping cart is empty (but only if the customer is on the shopping_cart.php page of course). So I placed this code in shopping_cart.php: tep_redirect(tep_href_link(FILENAME_DEFAULT)); But I just get an error saying: Warning: Cannot modify header information - headers already sent by (output started at .... So I thought I would try to write the code in application_top.php and it looked like this: if (basename ($PHP_SELF,".php") != 'shopping_cart') { if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } } But nothing happens if I do it that way, what could I do to solve this issue? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.