Wednesday 14 January 2004 4:20:12 am
Hi, Trying to create a new workflow event, I get the error "Page can not be displayed" (generated by IE) when I click the "New workflow" button in the workflowlist view of the workflow module, which I'm guessing is due to some error in the code syntax. Here's the content of the ezcreateaccounttype.php file: <?php
include_once( 'kernel/classes/ezworkflowtype.php' ); include_once( "kernel/classes/ezorder.php" ); define( "EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID", "ezcreateaccount" );
class eZCreateAccountType extends eZWorkflowEventType
{
/*!
Constructor
*/
function eZCreateAccountType()
{
$this->eZCreateAccountType( EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID, "Create account" ); }
function execute( &$process, &$event )
{
// order fetch parameters
$offset = 0;
$limit = 1;
$sortField = 'created';
$sortOrder = 'asc';
// fetch most recent order in an array
$orderArray =& eZOrder::active( true, $offset, $limit, $sortField, $sortOrder );
// for each order id (only one)
foreach($orderArray as $k => $v) {
$order_id = $v['order_nr'];
}
// fetch order
$order = eZOrder::fetch($order_id);
// save data used by account creation process
$address = $order[account_information][address];
// email me the order address to make sure it's A-OK
mail('user@domain.com', 'Adressen er ' . $address, 'Body', 'From: user@domain.com');
return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
} } eZWorkflowEventType::registerType( EZ_WORKFLOW_TYPE_CREATEACCOUNT_ID, "ezcreateaccounttype" ); ?> And here's the content of the workflow.ini.append.php file:
[EventSettings]
ExtensionDirectories[]=createaccount AvailableEventTypes[]=event_ezcreateaccount Any idea what I could be doing wrong? Thanks in advance ! Sincerely, Eirik Johansen
Sincerely,
Eirik Alfstad Johansen
http://www.netmaking.no/
|