i checked out these 2 posts

http://www.zen-cart.com/forum/showpo...&postcount=814
http://www.zen-cart.com/forum/showpo...postcount=1019

i can't seem to get this to work i get the following error when i try to print batch invoices
 
Fatal error: Call to a member function on a non-object in /home/www/gorillagear.ca/store/admin/super_invoice.php on line 38


files i edited super_stylesheet.css, super_batch_forms, super_packingslip, super_invoice and super_shipping_label

step1: i replaced all instances of require with require_once in super_batch_forms, super_packingslip, super_invoice and super_shipping_label

step 2: in super_batch_forms at around line 229 i replaced everything from function to closing php tag with this code

Code:
function batch_forms($target_file, $selected_oids, $num_copies = 1)
{
	// begin error handling
	if (!is_array($selected_oids)) { exit(ERROR_NO_ORDERS); }
	if (!is_file($target_file)) { exit(ERROR_NO_FILE); }
	// end error handling
	
	unset($batch_order_numbers);
	foreach ($selected_oids as $order_number => $print_order)
	{
	  $batch_order_numbers[] = $order_number;
	}
	sort($batch_order_numbers);
	
	if (file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/'. $target_file))
	{
		include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/'. $target_file);
	}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
		<title><?php echo TITLE; ?></title>
		<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
		<script language="javascript" src="includes/menu.js"></script>
	</head>
	<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<?php
	$_GET['pagebreaks'] = 1;

	foreach ($batch_order_numbers as $order_number)
	{
		$_GET['oID'] = $order_number;
		for ($copies = 1; $copies <= $num_copies; ++$copies)
		{
		  include($target_file);
		  echo '<div style="page-break-after: always;"></div>';
		}
	}
?>
	</body>
</html>
<?php
	require(DIR_WS_INCLUDES . 'application_bottom.php');
}
step 3: at the bottom of the super_stylesheet.css i added the pagebreak
Code:
.endline {
page-break-after: always;
}
step 4: added the pagebreak inside the </body> tag
Code:
<div class="endline">------------ pagebreak --------------</div>
so what did i do wrong