Skip to content

This is a console-based shopping cart system implemented using Object-Oriented Programming (OOP) principles in Python. It simulates a basic e-commerce workflow where customers can add products to their cart, view details, apply discounts, and complete checkout.

Notifications You must be signed in to change notification settings

TheMLengineer07/Online_Shopping_Cart_System--Python-OOP-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›’ Online Shopping Cart System

A simple command-line-based Python project that simulates a basic online shopping experience. This system allows customers to add products to their shopping cart, apply discounts, view the cart, and checkout.

๐Ÿ“Œ Features

  • Add/remove products from the cart
  • Apply discount to specific products
  • View cart contents with subtotal and total
  • Checkout with summary
  • Handles product stock and availability
  • Object-oriented structure with classes: Product, ShoppingCart, and Customer

๐Ÿงฉ Project Structure

โœ… How to Run

 ```bash python shopping_cart.py ``` 

No setup required โ€“ runs directly in terminal or any Python IDE.

๐Ÿ‘จโ€๐Ÿ’ป Example Output

1 x Laptop added to the cart.
2 x Mouse added to the cart.

Alice's shopping cart:
cart contains
Laptop (ID: P001) -โ‚น60000 | in stock:4 | Quantity: 1 | Subtotal: โ‚น60000
Mouse (ID: P002) -โ‚น800 | in stock:8 | Quantity: 2 | Subtotal: โ‚น1600
Total: โ‚น61600

Alice's Checkout Summary:
cart contains
Laptop (ID: P001) -โ‚น60000 | in stock:4 | Quantity: 1 | Subtotal: โ‚น60000
Mouse (ID: P002) -โ‚น800 | in stock:8 | Quantity: 2 | Subtotal: โ‚น1600
Total: โ‚น61600
Thank you for shopping!

๐Ÿ› ๏ธ Technologies Used Python 3

Object-Oriented Programming (OOP)

๐Ÿ“‚ Classes Overview Product: Represents a product with price, stock, and discount capabilities.

ShoppingCart: Handles all cart operations like adding, removing, applying discount, and totaling.

Customer: Represents a customer with a unique cart and checkout process.

๐Ÿ“ˆ Future Enhancements Add product categories

Save cart to file or database

Add login/signup functionality

GUI version using Tkinter or Web framework

๐Ÿ“„ License This project is open-source and available under the MIT License.

About

This is a console-based shopping cart system implemented using Object-Oriented Programming (OOP) principles in Python. It simulates a basic e-commerce workflow where customers can add products to their cart, view details, apply discounts, and complete checkout.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published