Prev | Current Page 675 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

Processing continues when the supplier confirms that the goods have been
shipped.
Customer notification: An e-mail is sent notifying the customer that the order has been
shipped and thanking the customer for using the TShirtShop web site.
?– Note In terms of implementation, as you??™ll see shortly, there are more stages than this because the stock
check and shipping stages actually consist of two pipeline sections??”one that sends the e-mail and one that
waits for confirmation.
As orders flow through this pipeline, entries are added to a new database table called audit.
These entries can be examined to see what has happened to an order and are an excellent way to
identify problems if they occur. Each entry in the orders table is also flagged with a status, identifying
which point in the pipeline it has reached.
To process the pipeline, we??™ll create classes representing each stage. These classes carry out
the required processing and then modify the status of the order in the orders table to advance
the order. We??™ll also need a coordinating class (or processor), which can be called for any order
and executes the appropriate pipeline stage class. This processor is called once when the order
is placed and, in normal operation, is called twice more??”once for stock confirmation and once
for shipping confirmation.
To make life easier, we??™ll also define a common interface supported by each pipeline stage
class.


Pages:
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687
sem Pozycjonowanie pozycjonowanie stron katalog warszawa podgrzewacze wody