GithubHelp home page GithubHelp logo

shopping-cart's Introduction

About The Project

The application displays the list of products. Allows users to view product details when clicking on each product. User can add or remove items in the shopping cart and view order details. The following promotions are applied: • Get 10% off bulk drinks – any drinks are 10% off the listed price (including already reduced items) when buying 10 or more • £5.00 off your order when spending £50.00 or more on Baking/Cooking Ingredients • £20.00 off your total order value when spending £100.00 or more and using the code “20OFFPROMO”

  • Users can view the products and their category, price, and availability information.
  • Users can add a product to their shopping cart.
  • Users can remove a product from their shopping cart.
  • Users can view the total price for the products in their shopping cart.
  • Users can apply a voucher to their shopping cart.
  • Users can view the total price for the products in their shopping cart with discounts
  • Users can be alerted when I apply an invalid voucher to their shopping cart.
  • Users can unable to Out of Stock products to the shopping cart.

Inside that directory, it details about project:

shopping_cart
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    └─── components 
    │       ├─── AlertMessage.js
    │       ├─── Cart.js
    │       ├─── Header.js
    │       ├─── OrderSummary.js
    │       ├─── Product.js
    │       └─── Voucher.js
    ├─── hooks
    │      └─── product-context.js
    ├─── pages
    │       ├─── ProductDetail.js
    │       ├─── Products.js
    │       └─── ShoppingCart.js
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    ├── serviceWorker.js
    └── setupTests.js

The main of this application:

/components:

- Contains components.
─ AlertMessage.js: This component displays the Alert Message message
─ Cart.js: This component displays on ShoppingCart Page, the Cart details about each item information and price.
─ Header.js: This component displays the Header of the Application
─ OrderSummary.js: This component displays order summary details about the price of all of the items.
─ Product.js: This component displays Product information on the List Product Page.
─ Voucher.js: This component displays the form input voucher code.

/hooks:

- Contains logic about the function of the shopping cart.
─ product-context.js: this file handles logic about the function of the shopping cart.

/pages:

- Contains components page.
─ ProductDetail.js: This component displays the product detail page.
─ Products.js: This component displays a list product page.
─ ShoppingCart.js: This component displays the shopping cart page.

Prerequisites

You’ll need to have Node 10.16.0 or later version on your local development machine (but it’s not required on the server). We recommend using the latest LTS version. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

Install the Yarn global binary to its latest version:

npm install -g yarn

Installation:

  1. In the project directory, you can run to Install packages:

yarn install

  1. In the project directory, you can run to start application:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

shopping-cart's People

Contributors

duongvancuong avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.