Hi
To cut a long story short I want to add something to admin to test the order confirmation emails. Rather than having to create a new order to generate an email I want to press a button (i've successfully modified my orders.php to achieve this) which then regenerates the confirmation email for that order.
Please stop me now if I'm re-inventing the wheel but I haven't seen anything that does this.
So, can someone tell me why the following doesn't work ? Basically I get a fatal error at the
$order->send_order_email($oID, 3);
which is the most important bit.
The "3" is me hijacking the 2nd passed variable to let the function know to send the email to admin only (not the customer).
---------------------------------------------------------------------------
<?php
require('includes/application_top.php');
$oID = zen_db_prepare_input($_GET['oID']);
$orders = $db->Execute("select orders_id
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$oID . "'");
include(DIR_WS_CLASSES . 'order.php');
$order = new order($oID);
?>
<!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">
<!-- body_text //-->
<?php
$order->send_order_email($oID, 3);
?>
<!-- body_text_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Reply With Quote
