"\n" . $body);
}
}
// Gets current pipeline section
private function _GetCurrentPipelineSection()
{
$this->_mOrderProcessStage = 100;
$this->_mCurrentPipelineSection = new PsDummy();
}
}
?>
6. Create the IPipelineSection interface in a new file named business/i_pipeline_section.php as
follows:
interface IPipelineSection
{
CHAPTER 18 ?– IMPLEMENTING THE ORDER PIPELINE: PART 1 578
public function Process($processor);
}
?>
7. Add a new file in the business directory called ps_dummy.php with the following code. The PsDummy
class is used in this chapter for testing purposes in place of the real pipeline sections that we??™ll implement in
the next chapter.
class PsDummy implements IPipelineSection
{
public function Process($processor)
{
$processor->CreateAudit('PsDoNothing started.', 99999);
$processor->CreateAudit('Customer: ' .
$processor->mCustomerInfo['name'], 99999);
$processor->CreateAudit('Order subtotal: ' .
$processor->mOrderInfo['total_amount'], 99999);
$processor->MailAdmin('Test.', 'Test mail from PsDummy.', 99999);
$processor->CreateAudit('PsDoNothing finished', 99999);
}
}
?>
8. Add the following code to include/config.php, customizing the data with your own e-mail addresses:
// Constant definitions for order handling related messages
define('ADMIN_EMAIL', 'Admin@example.com');
define('CUSTOMER_SERVICE_EMAIL', 'CustomerService@example.
Pages:
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696