Prev | Current Page 560 | Next

Emilian Balanescu and Cristian Darie

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

The most common tasks are to mark
a placed order as either verified or canceled and to mark a verified order as completed when
the shipment is dispatched. Take a look at Figure 14-5 to see the admin_order_details template
in action.
The site administrator marks an order as verified when the payment for that order is confirmed
by PayPal and marks the order as completed when the order is assembled, addressed,
and mailed to the purchaser. The administrator can mark an order as canceled if, for example,
PayPal does not confirm the payment in a reasonable amount of time (the exact meaning of
???reasonable??? is up to the administrator).
The other buttons??”Edit, Update, and Cancel??”allow the administrator to manually edit
any of the details of an order. When the Edit button is clicked, the select box and the text boxes
become editable.
Now that you have an idea of what this componentized template will do, let??™s implement
it in the usual style by starting with the data tier.
Exercise: Administering Order Details
1. Use phpMyAdmin to create the three stored procedures described in the following steps: orders_get_order_
info, orders_get_order_details, and orders_update_order. Don??™t forget to set the $$ delimiter
before executing the code of eachstep.
2. Execute this code, which creates the orders_get_order_info stored procedure. This stored procedure
returns the information necessary to fill the form in the admin_order_details componentized template,
such as the total amount, date created, date shipped, and so on.


Pages:
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572
remanent Golec uOrkiestra 3 ABC jednoreki bandyta Toruń hotele