A responsive e-commerce website with shopping cart functionality built using vanilla JavaScript, HTML, and CSS.
Home Page | Cart Overlay | Checkout Page |
---|---|---|
![]() |
![]() |
![]() |
- Product listing with grid layout
- Shopping cart functionality with persistent storage
- Real-time search functionality
- Quantity selection and editing
- Dynamic cart total calculation
- Responsive design for all devices
- Cart item deletion
- Checkout page with order summary
- Vanilla JavaScript (No frameworks)
- CSS Grid and Flexbox
- LocalStorage for cart persistence
- REST API integration
- Responsive images
- Error handling
The project uses the Platzi Fake Store API which sometimes returns invalid image URLs:
// Image error handling with fallback
img.setAttribute("onerror", "this.src='https://via.placeholder.com/300'")
project/
├── images/
│ ├── Home.png
│ ├── cart overlay.png
│ ├── checkout.png
│ └── error image.png
├── index.html
├── pages/
│ └── checkOut.html
├── styles/
│ └── styles.css
└── scripts/
├── index.js
├── checkOut.js
└── objects.js
- Add image URL validation and cleaning
- Implement better error handling for API responses
- Add loading states while images are fetching
- Consider implementing image lazy loading
- Add local image caching
- Add user authentication
- Implement payment gateway integration
- Clone the repository
- Open index.html in a modern browser
- No build process required - vanilla JavaScript project
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Feel free to open issues and pull requests!
MIT License - feel free to use this project for learning purposes.