Skip to content

kitsaels/Basic-Shopping-Cart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Shopping Cart - Job Application Task

About

This is a simple task assigned to me during a job interview. The task was to write a PHP class for a shopping cart.

Requirements

  • The cart will need to keep its “state” during page loads / refreshes
  • List Products – these should be listed at all times to allow adding of products
  • Products should be listed in this format: product name, price, link to add product
  • Must be able to add a product to the cart
  • Must be able to view current products in the cart
  • Cart products should be listed in this format: product name, price, quantity, total, remove link
  • Product totals should be tallied to give an overall total
  • Must be able to remove a product from the cart
  • Adding an existing product will only update existing cart product quantity (e.g. adding the same product twice will NOT create two cart items)
  • All prices should be displayed to 2 decimal places
  • Error checking will be set to strict for viewing completed code
  • Project will work as expected in PHP 7.0+

Achievements

  • All requirements achieved.
  • Tested with PHP 7.3.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 90.1%
  • CSS 9.9%