Β The main product catalog page. Displays all items with name, price (discounted), image, and stock status in the dark theme. Includes pagination and a search bar.
Β High-contrast search bar that allows filtering of products by item name. Integrated directly into the main product catalog page.
Β Opens when a customer taps on a product. Shows a larger image, full description, and clear display of original vs. discount price.
Β Displays selected items, quantity controls, and calculates the total price using the discount price. The final button initiates the two-step checkout process.
Β The mandatory final step showing the order summary, total price, and the PAY NOW & CONFIRM ORDER button which triggers transactional stock deduction.
Β This feature provides a **seamless and secure instant payment** option. When selected, the system instantly generates a unique QR code. Customers can scan this code with any UPI app (like Google Pay or PhonePe), and the application will automatically pre-fill the **exact total amount** of the order, allowing for a quick, error-free transaction with a single tap.
Β Displays essential shopping details such as cart items, total price, quantity updates, remove item option, and checkout flow. Styled in the same dark/yellow theme for consistency. It ensures a smooth shopping experience with real-time updates.
Β Final confirmation page shown after a successful transaction. Confirms that stock has been deducted and prompts the user to continue shopping (clearing the local storage cart).
ShopZone is a modern Django project that provides:
β A high-contrast, dark-themed online product catalog.
β A secure, transactional checkout system with atomic stock deduction.
β Comprehensive inventory and product management (via Django Admin).
This is not a simple template β it is a secure e-commerce solution focusing on premium presentation and data integrity.
β’ **Atomic Stock Deduction:** Uses Django transactions to guarantee stock reduction or full rollback.
β’ **Concurrency Safety:** Employs select_for_update() to prevent overselling during simultaneous checkouts.
β’ **Discount Logic:** Checkout automatically validates and applies the discount_price if it's lower than the original price.
β’ **Stock Tracking:** Stock is checked client-side and verified again server-side at checkout.
β’ High-Contrast UI: Dark theme accented by vibrant Orange/Yellow for a premium feel.
β’ Persistent Cart: Uses local storage (JS/jQuery) to maintain cart items across sessions.
β’ Price Clarity: Clearly displays original price with a strike-through next to the discounted price.
β’ Two-Step Checkout: Provides an Order Summary step before final payment confirmation.
Backend: Django 5 (Python)
Database Safety: django.db.transaction + select_for_update
Frontend: Bootstrap 5 + Custom CSS (Dark Theme/Orange Accents)
Client Cart: JavaScript (localStorage) / jQuery
Database: SQLite (Development)
git clone https://github.com/SanjayMarathi/ShopZone.git
cd ShopZone
python -m venv venv
Windows
.\venv\Scripts\activate
macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations myapp
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
App opens at:
http://127.0.0.1:8000/
1. Login to Admin Panel β http://127.0.0.1:8000/admin/
2. **Manage Products:** Add, edit, or delete items, setting price, discount, and stock.
3. **Monitor Database:** All successful transactions lead to atomic stock deduction.
Dashboard:
http://127.0.0.1:8000
1. Login to Admin Panel β http://127.0.0.1:8000/admin/
2. **Manage Products:** Add, edit, or delete items, setting price, discount, and stock.
3. **Monitor Database:** All successful transactions lead to atomic stock deduction.
ShopZone/
βββ shop/
βΒ Β βββ templates/shop/
βΒ Β βΒ Β βββ index.html # Product Catalog
βΒ Β βΒ Β βββ cart.html # Cart Management
βΒ Β βΒ Β βββ checkout.html # Summary / Status Page
βΒ Β βΒ Β βββ detail.html # Individual Product View
βΒ Β βββ static/shop/
βΒ Β βΒ Β βββ style.css # Custom Dark Theme
βΒ Β βββ models.py # Products (with stock and discount_price)
βΒ Β βββ views.py # Transactional Checkout logic
β
βββ ecomsite/
βΒ Β βββ settings.py
βΒ Β βββ urls.py
Developed by: Sanjay Marathi
GitHub: https://github.com/SanjayMarathi







