Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Comic Shop

A responsive PHP and MySQL comic book shop built for XAMPP. Customers can browse comics, view product details, manage a cart, place orders, track order status, subscribe to the newsletter, and download PDF invoices. Admin users can manage products and orders from protected admin pages.

Features

  • Responsive homepage, shop, product, cart, checkout, order, admin, about, contact, and FAQ pages
  • Product catalog with Marvel, DC, and other comic categories
  • Product detail pages with publisher, writer, format, age rating, and long descriptions
  • Sorting by name, price, newest, oldest, and category
  • Session cart with item count in the navbar and quantity limits
  • User signup, login, logout, and protected customer order pages
  • Checkout with saved delivery details and order totals
  • Order tracking with status, item details, and invoice download
  • PDF invoice generation with FPDF
  • Newsletter subscription for logged-in user emails
  • Protected admin panel for product and order management
  • Admin order status updates for processing, shipped, delivered, and cancelled orders

Tech Stack

  • PHP
  • MySQL / MariaDB
  • PDO
  • FPDF
  • HTML
  • CSS
  • JavaScript
  • XAMPP

Project Structure

  • api/ - JSON endpoints for login and signup
  • assets/css/ - existing stylesheets for layout, navbar, admin, cart, contact, product, slider, and skew sections
  • assets/js/ - browser scripts
  • config/ - database connection
  • database/ - SQL export for project setup
  • fpdf/ - local FPDF runtime files for server-side invoice generation
  • images/ - static images, icons, banners, and product images
  • includes/ - shared PHP classes, helpers, header, footer, and session start
  • pdf/ - generated invoices, ignored by Git except .gitkeep

Database

The database name is:

comic_book_store

The SQL export is included here:

database/comic_book_store.sql

It contains the current schema and sample data for:

  • categories
  • newsletter_subscribers
  • orderitems
  • orders
  • products
  • users

Setup

  1. Copy this project into your XAMPP htdocs folder.
  2. Start Apache and MySQL from XAMPP.
  3. Open phpMyAdmin or the MySQL CLI.
  4. Import database/comic_book_store.sql.
  5. Open the site:
http://localhost/The-Comic-Shop/

Database settings are in:

config/database.php

Default local settings:

host: localhost
user: root
password:
database: comic_book_store

Main Pages

  • index.php - homepage
  • shop.php - full comic catalog
  • viewProduct.php - product details
  • cart.php - shopping cart
  • checkout.php - checkout form
  • orders.php - customer order tracking
  • orderDetails.php - order details
  • pdfCheckout.php - invoice generation and download
  • admin.php - admin product panel
  • adminOrders.php - admin order panel
  • adminOrderDetails.php - admin order details
  • about.php - about page
  • contact.php - contact page
  • faqs.php - FAQs page

Notes

  • Generated invoice PDFs are written to pdf/ and are ignored by Git.
  • Product images are stored under images/products/.
  • FPDF stays local because invoice PDFs are generated by PHP on the server.
  • Admin access is controlled through the logged-in user's role.

License

MIT

About

A PHP/MySQL comic book store for browsing comics, managing a cart, placing orders, generating PDF invoices, and administering products.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages