Skip to content

This is a simple console-based Online Shopping Cart system built using Object-Oriented Programming (OOP) in Python. It allows users to browse products (physical & digital), add items to the cart, update quantities, remove items, and checkout – all with persistent storage using JSON files.

Notifications You must be signed in to change notification settings

urbimangal/python_shopping_cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Online Shopping Cart (Python OOP Project)

A simple console-based shopping cart system using Object-Oriented Programming in Python. You can browse, add, remove, and update products with JSON-based file persistence.


✨ Features

  • View physical and digital products
  • Add, update, and remove items from cart
  • View cart summary with total price
  • Auto-save and load cart using JSON
  • Clean beginner-friendly OOP design

🧠 OOP Concepts Used

  • Inheritance – Product subclasses for physical/digital items
  • Encapsulation – Uses private attributes
  • Polymorphism – Custom __str__() for products
  • Abstraction – Logic hidden in methods
  • Magic Methods – __init__, __str__, etc.

πŸš€ How to Run

  1. Make sure Python 3.x is installed.
  2. Run the script:
python shopping_cart.py
  1. Follow the menu in terminal.

πŸ“ Project Files

  • shopping_cart.py – Main Python script
  • cart_data.json – Cart persistence (auto-generated)
  • README.md – Project overview

πŸ™‹β€β™€οΈ Why Try This?

  • Practice real-world OOP in Python
  • Understand file handling with JSON
  • Great for DSA + Python beginners

πŸ‘€ Author

Urbi Mangal – Made with ❀️ in Python.

About

This is a simple console-based Online Shopping Cart system built using Object-Oriented Programming (OOP) in Python. It allows users to browse products (physical & digital), add items to the cart, update quantities, remove items, and checkout – all with persistent storage using JSON files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages