Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Workshop 8 - Using jQuery and Promise-based AJAX to make a single-page shopping cart app.

Resources

You'll once again need jQuery's AJAX functions, this time utilize the promises the shorthand functions return to handle errors. The server will randomly error, you should handle the errors and let the user know what is going on.

jQuery Deferred

jQuery AJAX

jQuery GET

jQuery GETJSON

Exercise - Shopping Cart Stories

Search for products

As a user, I want to search for an item in the shopping cart so eventually I could buy something.

Acceptance

Show product categories

As a user I want to see product categories so I can eventually filter products.

Acceptance

Search by categories

As a user, I want to see products by categories.

Acceptance

Create an order

  • As a user, I want to select products and create an order with the selected products so I can enjoy the products.

Acceptance

Format

{
	{
	    "items": [{
	        "name": "Third Product",
	        "description": "The very best product",
	        "price": 11.5,
	        "image": "https://www.batleys.co.uk/img/general/bestin-product-range.jpg",
	        "categories": [
	            "First",
	            "Second",
	            "Third"
	        ]
	    }]
	}
}

Search for order by unique identifier

  • As a user, I want to search for an order by the unique ID I was given when the order was created, so that I can eventually can update the order.

Acceptance

Add items to the order

  • As a user I want to add items to or remove items from the order.

Acceptance

Format

{
	{
		"items": [{
			"name": "Third Product",
			"description": "The very best product",
			"price": 11.5,
			"image": "https://www.batleys.co.uk/img/general/bestin-product-range.jpg",
			"categories": [
				"First",
				"Second",
				"Third"
			]
		}]
	}
}