The store administration user interface is used to check the status of orders once they are created and also to manage the list of products that are available for sale in the store. There are two key aspects for the store administration user interface:
◆ The administrator should be able to add, remove, and manage products
◆ The administrator should be able manage order and change statuses using this interface
Perform the following steps for creating the Store Admin interface:
1. Create a new controller for store administration, and name it
StoreAdminController.
2. This controller will have the following basic actions:
‰ indexAction(): Used for listing all products
‰ addProductAction(): Used for adding a new product
‰ deleteProductAction(): Used for deleting an existing product
‰ listOrdersAction(): Used for listing all orders
‰ viewOrderAction(): Used for viewing a specific order
‰ updateOrderStatusAction(): Used for updating order status
3. Create the necessary views, and map the actions accordingly.
4. Open phpMyadmin and create test records in both the store_products and
store_orders tables to test the functionality for the administration UI.
5. Open your favorite browser, log in to the application, and open the eStore Admin interface. The interface should look like the following one. The Manage Products page lets you add, remove, and edit products from the administration interface:
The orders listing page lists all orders placed in the store and allows you to view orders and modify their statuses:
A screenshot of the Order Information page listing the order information and providing options to change their status is shown as follows:
Không có nhận xét nào:
Đăng nhận xét