This should be just before your html code:
<?php
// WA eCart Redirect
if ($BPeCart->redirStr != "") {
header("Location: ".$BPeCart->redirStr);
}
?>
And also be sure this is or something like it is in there above that someplace:
$Redirect_redirStr="index.php";