wiki:UseCase007

Version 1 (modified by 232012, 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

  1. User selects a specific Product and chooses the option to add it to Order.
  1. System checks the current stock level of the product in the Product table to ensure availability.
  1. System retrieves the current price of the product to establish the price_at_purchase for the transaction.
  1. System creates or identifies an active Order record associated with the consumer’s user_id.
  1. System creates a new entry in the OrderItem table, linking the product_id to the order_id.
  1. System records the specific quantity requested by the User and saves the price_at_purchase to the OrderItem record.
  1. System updates the user's view to reflect that the item has been added to their Order total.
Note: See TracWiki for help on using the wiki.