A modern, responsive e-commerce website built with HTML, CSS, and JavaScript, featuring Odoo's signature design aesthetic.
- Product Catalog: Browse 8 sample products with detailed descriptions and pricing
- Shopping Cart: Add, remove, and modify quantities of products
- Real-time Updates: Cart count and total price update instantly
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Odoo-inspired Styling: Authentic color scheme with purple/teal gradients
- Modern Interface: Clean, professional layout with smooth animations
- Interactive Elements: Hover effects, button feedback, and smooth transitions
- Card-based Layout: Elegant product cards with hover animations
- Sidebar Cart: Slide-out cart panel from the right
- Quantity Controls: Increase, decrease, or remove items
- Price Calculation: Automatic total calculation with tax
- Empty State: User-friendly empty cart messaging
- One-click Checkout: Simple checkout process with confirmation
- HTML5: Semantic markup and modern structure
- CSS3: Custom styling with CSS Grid, Flexbox, and animations
- Vanilla JavaScript: No external dependencies
- Responsive Design: Mobile-first approach with CSS media queries
โโโ index.html # Main HTML file containing all code
โโโ README.md # This documentation file
โโโ (No external files required)
- Any modern web browser (Chrome, Firefox, Safari, Edge)
- No server or build tools required
- Download the
index.htmlfile - Open it in any web browser
- Start shopping immediately!
# Clone or download the file
# Navigate to the directory
# Open with any web browser
open index.html- Browse the product catalog
- Click "Add to Cart" on any product
- See the cart count update in the header
- Products are added with quantity 1 (or increased if already in cart)
- Click the "Cart" button in the header to open the cart sidebar
- Use +/- buttons to adjust quantities
- Click ร button to remove items completely
- View real-time total at the bottom
- Open the cart sidebar
- Review your items and total
- Click "Proceed to Checkout"
- Confirmation message will appear
- Cart will be cleared after successful checkout
:root {
--primary-color: #875a7b; /* Purple - main brand color */
--secondary-color: #017e84; /* Teal - accent color */
--accent-color: #f0ad4e; /* Orange - highlights */
--success-color: #5cb85c; /* Green - success states */
--danger-color: #d9534f; /* Red - danger/delete */
}Edit the products array in the JavaScript section:
const products = [
{
id: 9, // Unique ID
name: "New Product", // Product name
description: "Description", // Product description
price: 99.99, // Price in dollars
emoji: "๐" // Display emoji
}
];- All CSS is contained in the
<style>section - Uses CSS custom properties for easy theming
- Responsive breakpoints at 768px for mobile
- Desktop: Multi-column product grid with sidebar cart
- Tablet: Adjusted grid layout with optimized spacing
- Mobile: Single-column layout with full-width cart overlay
- Hover Effects: Product cards lift and shadow on hover
- Button Feedback: "Add to Cart" buttons show success state
- Smooth Animations: CSS transitions for all interactive elements
- Loading States: Visual feedback for user actions
- Persistent State: Cart data maintained during session
- Quantity Controls: Intuitive +/- buttons for adjustments
- Price Calculation: Automatic totaling with proper decimal formatting
- Empty State Handling: Graceful display when cart is empty
- Chrome: 60+ โ
- Firefox: 60+ โ
- Safari: 12+ โ
- Edge: 79+ โ
- Mobile Browsers: iOS Safari 12+, Chrome Mobile 60+ โ
- Touch-friendly buttons and controls
- Optimized tap targets (44px minimum)
- Full-screen cart on mobile devices
- Responsive typography and spacing
- Smooth scrolling and animations
- No External Dependencies: Faster loading, no CDN reliance
- Lightweight: Single HTML file under 50KB
- Optimized CSS: Efficient selectors and minimal repaints
- Smooth Animations: Hardware-accelerated transforms
- In-Memory Storage: All cart data stored in JavaScript variables
- Session-based: Data persists only during browser session
- No Cookies: Privacy-friendly, no data persistence
- No External APIs: Fully self-contained application
- E-commerce Prototyping: Quick mockups and demos
- Educational Projects: Learning web development basics
- Portfolio Pieces: Showcasing front-end skills
- Template Base: Starting point for larger projects
This is a single-file application perfect for:
- Adding new product categories
- Implementing payment integration
- Adding user reviews and ratings
- Expanding with more interactive features
Open source - feel free to use, modify, and distribute as needed.
Potential features that could be added:
- Product search and filtering
- Product categories and navigation
- Image galleries for products
- User reviews and ratings
- Wishlist functionality
- Multi-currency support
- Payment gateway integration
- Order history and tracking
For questions or issues:
- Check browser console for any JavaScript errors
- Ensure you're using a modern browser
- Verify the HTML file is complete and unmodified
Built with โค๏ธ using modern web technologies