| Version 1 (modified by , 2 weeks ago) ( diff ) |
|---|
UseCase007 - Add Product to Order
Initiating actors:
- Logged-In Consumer
- Logged-In Admin
The goal of this use case is to allow an authenticated user to select a specific product and add it to an active order. This process captures the current price and quantity of the item, ensuring that the product is reserved for the transaction before the final purchase is completed.
Scenario
- User selects a specific
Productand chooses the option to add it toOrder.
- System checks the current
stocklevel of the product in theProducttable to ensure availability.
- System retrieves the current
priceof the product to establish theprice_at_purchasefor the transaction.
- System creates or identifies an active
Orderrecord associated with the consumer’suser_id.
- System creates a new entry in the
OrderItemtable, linking theproduct_idto theorder_id.
- System records the specific
quantityrequested by theUserand saves theprice_at_purchaseto theOrderItemrecord.
- System updates the user's view to reflect that the item has been added to their
Ordertotal.
Note:
See TracWiki
for help on using the wiki.
