This UML class diagram for an E-commerce website outlines the interactions between key entities such as User, Product, ShoppingCart, Order, Payment, Shipping, and Admin. Users can log in and place orders, with each order containing multiple products. ShoppingCart allows users to add or remove items before placing an order. Orders are associated with both payment and shipping processes, ensuring payment is made and the order is shipped to the provided address. Admins have control over managing users, products, and orders, including adding or removing products. Payments and shipping are linked directly to orders to complete the transaction flow.

ecommerce-website-class.png

Edit this diagram in Gleek

E-commerce website diagram code in Gleek

User

    +Username

    +Password

    +Login()

    +Logout()

Product

    +ProductID

    +ProductName

    +ProductDescription

    +ProductPrice

    +AddProduct()

    +RemoveProduct()

ShoppingCart

    +CartID

    +AddToCart()

    +RemoveFromCart()

Order

    +OrderID

    +OrderDate

    +OrderStatus

    +PlaceOrder()

Payment

    +PaymentID

    +PaymentType

    +PaymentStatus

    +MakePayment()

Shipping

    +ShippingID

    +ShippingAddress

    +ShippingStatus

    +ShipOrder()

Admin

    +AdminID

    +AdminName

    +AdminPassword

    +Login()

    +Logout()

User {1}--{*} Order

Order {1}--{*} Product

ShoppingCart {1}--{*} Product

Order {1}--{1} Payment

Order {1}--{1} Shipping

Admin {1}--{*}Product

Admin {1}--{*}Order

Admin {1}--{*}User

Payment -.-> Order

Shipping -.-> Order

About class diagrams

Class diagrams are used in software engineering to describe the structure of a system. A class diagram uses Unified Modeling Language (UML) to show the classes, attributes, methods (or operations), and their relationships to each other in the system. Class diagrams prove valuable in object-oriented modeling. Class diagrams can be used to model the data structure or to design a system in detail.

Similar class diagram examples

Online shopping system class diagram

Restaurant management system class diagram

Order processing system class diagram

Hotel management system

Passport automation system class diagram

Railway reservation system