Skip to content

AboveAlljnr/CodeAlpha_-Simple-E-commerce-Store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShopAlpha E-commerce Store

A full-featured e-commerce web application built with PHP, MySQL, and vanilla JavaScript.

Features

  • Product browsing — category filter, search with live suggestions, featured products, related products
  • Product detail — image, price, stock indicator, description, quantity selector, AJAX add-to-cart, star ratings with reviews
  • Shopping cart — session-based, add/update/remove items, quantity controls, subtotal/total calculation
  • Checkout — address form, order notes, order placement with stock validation
  • Order management — order history with accordion view, printable invoice
  • User accounts — register, login, logout, profile editing (name, email, password)
  • Reviews — star rating picker, AJAX submission, average score display
  • Admin panel — dashboard stats, product CRUD (with image upload), order status management, review moderation, category management, user management
  • Password reset — forgot password flow with time-limited tokens
  • Pagination — page navigation on product listings
  • Contact & FAQ pages — static support pages

Quick Start

  1. Import schema.sql into your MySQL database.
  2. Configure credentials in config/database.php.
  3. Run seed.php to populate demo data.
  4. Access the site at your local domain.

Demo Credentials

Role Email Password
Admin admin@shopalpha.com admin123
User test@example.com password123

Tech Stack

  • Backend: PHP 8+, PDO/MySQL, custom MVC-like structure
  • Frontend: Vanilla JS, CSS custom properties, Font Awesome 6
  • Auth: Session-based with bcrypt password hashing

Security

  • Prepared statements with PDO (no SQL injection)
  • CSRF tokens on all POST forms
  • Open redirect validation on login
  • Bcrypt password hashing
  • Admin routes enforce isAdmin() check

Project Structure

├── admin.php              # Admin dashboard & management
├── index.php              # Homepage with featured/products grid
├── product.php            # Product detail with reviews
├── forgot_password.php    # Password reset request
├── reset_password.php     # Password reset with token
├── contact.php            # Contact page
├── faq.php                # Frequently asked questions
├── cart.php               # Shopping cart
├── checkout.php           # Order checkout
├── orders.php             # User order history
├── invoice.php            # Printable invoice
├── login.php              # User login
├── register.php           # User registration
├── profile.php            # User profile (name, email, password)
├── 404.php                # Custom 404 error page
├── privacy.php            # Privacy policy
├── seed.php               # Demo data seeder
├── schema.sql             # Database schema
├── classes/
│   ├── Product.php        # Product model
│   ├── Cart.php           # Cart model
│   ├── Order.php          # Order model
│   ├── User.php           # User model
│   └── Review.php         # Review model
├── api/
│   ├── cart_add.php       # Add to cart endpoint
│   ├── cart_update.php    # Update cart endpoint
│   ├── submit_review.php  # Submit review endpoint
│   └── search.php         # Product search endpoint
├── config/
│   └── database.php       # DB connection & site config
├── includes/
│   ├── header.php         # Site header & nav
│   ├── footer.php         # Site footer
│   └── auth.php           # Auth guard
└── assets/
    ├── css/style.css      # Stylesheet
    └── js/app.js          # Frontend scripts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors