Skip to content

ManjunathDharappanavar/e-commerce-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Alibaba E-Commerce Application

Alibaba Logo

A modern, responsive e-commerce web application featuring product browsing, search functionality, and shopping cart management

Features β€’ Demo β€’ Installation β€’ Usage β€’ Contributing

License Stars Forks Issues


πŸ“‹ Table of Contents

Click to expand

πŸš€ About

This e-commerce application provides a complete online shopping experience with a focus on electronics and tech products. The application features a clean, modern interface that allows users to browse products, search for specific items, manage their shopping cart, and view detailed product information.

The project demonstrates modern web development practices using vanilla JavaScript, CSS3, and HTML5, with localStorage integration for persistent cart functionality across browser sessions.

Key Highlights

The application includes comprehensive product management with 11 different electronic products ranging from smart watches to laptops. Users can interact with products through an intuitive interface that includes hover effects and smooth transitions. The shopping cart functionality provides real-time updates and automatic subtotal calculations, while the search and sorting features enable efficient product discovery.


✨ Features

Core Shopping Features

  • Product Catalog: Browse 11+ electronics and tech products
  • Shopping Cart: Add/remove items with persistent storage
  • Real-time Search: Filter products by name with instant results
  • Price Sorting: Sort products by price (low to high)
  • Subtotal Calculation: Automatic cart total computation

User Experience Features

  • Responsive Design: Optimized for all device sizes
  • Interactive UI: Hover effects and smooth transitions
  • Local Storage: Cart persistence across browser sessions
  • Clean Navigation: Intuitive multi-page navigation
  • Visual Feedback: Alerts for cart operations

πŸ–₯️ Demo

Application Screenshots

Home Page

Home page featuring product categories and navigation

Product Catalog

Product catalog with search and sorting functionality

Shopping Cart

Shopping cart with item management and subtotal display

Live Demo

Project Link: https://manjunathdharappanavar.github.io/e-commerce-project


πŸ› οΈ Technologies Used

HTML5 CSS3 JavaScript LocalStorage

Technical Implementation

  • Frontend: Vanilla JavaScript ES6+ with DOM manipulation
  • Styling: CSS3 with Flexbox and Grid layouts
  • Data Storage: Browser localStorage for cart persistence
  • Images: External CDN integration for product images
  • Architecture: Multi-page application with shared JavaScript modules

πŸ“¦ Installation

Prerequisites

No special software installation required. The application runs in any modern web browser that supports:

Feature Requirement Purpose
JavaScript ES6+ Modern browser Core functionality
localStorage API Supported browser Cart persistence
CSS3 Grid/Flexbox Recent browser Layout rendering

Quick Start

# Clone the repository
git clone https://github.com/ManjunathDharappanavar/e-commerce-project.git

# Navigate to project directory
cd e-commerce-project

# Option 1: Open directly in browser
open index.html

# Option 2: Serve with a local server (recommended)
# Using Python 3
python -m http.server 8000

# Using Node.js (if you have live-server installed)
npx live-server

# Using PHP (if available)
php -S localhost:8000

Deployment Options

Deploy to GitHub Pages
# Ensure your repository is public
# Go to Settings > Pages in your GitHub repository
# Select source: Deploy from a branch
# Choose branch: main
# Your site will be available at: https://username.github.io/repository-name

πŸš€ Usage

Navigation Structure

The application consists of three main pages, each serving specific functionality:

Home Page (index.html): Displays product categories including Mobile Phones, Laptops, and Tech Items with visual galleries for each category.

Product Catalog (product.html): Features the complete product listing with search functionality, price sorting options, and detailed product cards with add-to-cart functionality.

Shopping Cart (cart.html): Provides cart management capabilities including item removal, quantity display, and automatic subtotal calculation.

Core Functionality

Product Management

// Products are defined in the script.js file
const products = [
    {id: 1, name:"Smart Watch", price: "449", Image: "product-url"},
    // Additional products...
];

// Render products dynamically
renderProducts(products, "productList");

Shopping Cart Operations

// Add item to cart
addToCart(productId);

// Remove item from cart
removeFromCart(productId);

// View cart contents
renderCart();

Search and Filter

// Search products by name
searchProducts("Smart Watch");

// Sort products by price
sortProducts("price");

User Interactions

Users can browse products on the home page through categorized galleries, search for specific products using the search bar on the product page, sort products by price using the dropdown selector, add products to cart with single-click functionality, and manage cart contents including item removal and subtotal viewing.


πŸ“ File Structure

e-commerce-project/
β”œβ”€β”€ index.html          # Home page with product categories
β”œβ”€β”€ product.html        # Product catalog with search/sort
β”œβ”€β”€ cart.html           # Shopping cart management
β”œβ”€β”€ script.js           # Core JavaScript functionality
β”œβ”€β”€ style.css           # Application styling
β”œβ”€β”€ image.png           # Logo image
β”œβ”€β”€ alibaba.png         # Favicon
β”œβ”€β”€ banner11.png        # Homepage banner
└── README.md           # Project documentation

Core Files Description

script.js contains all application logic including product data, cart management functions, search and sort functionality, and localStorage integration.

style.css provides comprehensive styling including responsive design, hover effects, grid layouts, and cross-page consistency.

HTML files structure the application pages with semantic markup and proper navigation links.


πŸ”§ API Reference

JavaScript Functions

Product Management

renderProducts(products, containerID)

Description: Renders product list in specified container

Parameters:

  • products (Array): Array of product objects
  • containerID (String): DOM element ID for rendering

Usage:

renderProducts(products, "productList");
searchProducts(query)

Description: Filters products based on search query

Parameters:

  • query (String): Search term for filtering

Returns: Filtered products rendered in UI

Usage:

searchProducts("Smart Watch");

Cart Management

addToCart(productId)

Description: Adds product to shopping cart and localStorage

Parameters:

  • productId (Number): Unique product identifier

Side Effects: Updates localStorage, displays alert, refreshes cart display

removeFromCart(productId)

Description: Removes product from cart and updates storage

Parameters:

  • productId (Number): Product ID to remove

Side Effects: Updates localStorage, displays confirmation, refreshes cart


🌐 Browser Compatibility

Browser Version Support Level
Chrome 60+ βœ… Full Support
Firefox 55+ βœ… Full Support
Safari 12+ βœ… Full Support
Edge 79+ βœ… Full Support
Internet Explorer 11 ⚠️ Limited Support

Compatibility Notes

The application uses modern JavaScript features including arrow functions, template literals, and localStorage API. CSS Grid and Flexbox are utilized for layout management. Some features may require polyfills for older browser versions.


🀝 Contributing

Contributions are welcome from the community. Please follow the established code style and testing practices when submitting pull requests.

Development Guidelines

  1. Fork the repository from the main branch
  2. Create a feature branch with descriptive naming (feature/search-enhancement)
  3. Implement changes following existing code patterns
  4. Test functionality across different browsers
  5. Submit a pull request with detailed description

Code Style Standards

Maintain consistent JavaScript formatting with proper indentation and semicolon usage. Follow established CSS naming conventions and maintain responsive design principles. Ensure HTML semantic structure and accessibility compliance.

Areas for Contribution

Potential improvements include enhanced product filtering options, user authentication system, checkout and payment integration, product reviews and ratings, mobile app development, and performance optimization.


πŸ“ˆ Future Enhancements

Planned Features
  • Version 2.0

    • User authentication and profiles
    • Product categories and subcategories
    • Advanced search filters
    • Wishlist functionality
  • Version 2.1

    • Payment gateway integration
    • Order history and tracking
    • Product reviews and ratings
    • Admin dashboard for product management
  • Future Releases

    • Mobile application development
    • Real-time inventory management
    • Multi-language support
    • Advanced analytics and reporting

πŸ“ž Contact

Project Maintainer: Manjunath Dharappanavar

Email GitHub LinkedIn

Project Repository: https://github.com/ManjunathDharappanavar/e-commerce-project


πŸ™ Acknowledgments

Special thanks to the web development community and open-source contributors who have provided guidance and inspiration for this project.

  • MDN Web Docs - Comprehensive web development documentation
  • Amazon Product Images - Product image resources
  • CSS Grid and Flexbox - Modern layout techniques
  • localStorage API - Client-side data persistence

⭐ Show Your Support

Give a ⭐️ if this project helped you learn web development concepts!

Star Repo


Built with ❀️ using Vanilla JavaScript, HTML5, and CSS3

About

Its is a Front-end project using HTML, CSS & JS. It is a demo E-commerce website

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published