No description, website, or topics provided.
JavaScript HTML CSS Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
.sass-cache/47be8be807ebfd4783a26c08bbeb8e220d0fe79e
backend
compass
css
img
js
slick
views
.DS_Store
.gitignore
Readme.md
index.html
server.js

Readme.md

Ecommerce site in node.js, express, mongodb and angular. Full stack MEAN

front-end is entirely angular.js, HTML, and CSS

back-end is an api driven by Express.js and mongodb in node.js

Alt text

This is an application created for the marketing and sale of products produced by Sheena Moore.

Visit here: Sheena's Pickles

Built with:

- Html
- CSS
- Bootstrap
- SASS
- AngularJS
- Express 
- NodeJS
- MongoDB

Sample Code

The following code was created inside the mainController to take the users selected items and store the in the cookies as a cart that can then be accessed for amount and price calculation for checkout.

$scope.addToCart = function(idOfitem, quantity, amount){
	var oldCart = $cookies.get('cartItems');
	if (oldCart === undefined){
		var newCart = idOfitem
	}
	else {
		newCart = oldCart + "," + idOfitem;
	}
	console.log(oldCart);
	console.log(newCart);
	
	var oldQuantity = $cookies.get('cartQuantity');
	if (oldQuantity === undefined){
		var newQuantity = quantity;
	}
	else {
		newQuantity = oldQuantity + "," + quantity;
	}
	
	var oldAmount = $cookies.get('cartAmount');
	if (oldAmount === undefined){
		var newAmount = amount;
	}
	else {
		newAmount = oldAmount + "," + amount
	}

	$cookies.put('cartItems', newCart);
	$cookies.put('cartQuantity', newQuantity);
	$cookies.put('cartAmount', newAmount);
	
	newQuantity = newQuantity.split(",");
	console.log(quantity);
	console.log(newQuantity);
	var cartItems = newCart.split(",");
		$scope.item = $cookies.get('cartItems').split(',');
		$scope.quantity = $cookies.get('cartQuantity').split(',');
		$scope.amount = $cookies.get('cartAmount').split(',');
		var carts = [];
		for(var i = 0; i < cartItems.length; i++){
			carts.push({
					item: cartItems[i],
					quantity: newQuantity[i],
					amount: newAmount[i]
			})
			console.log(carts);	
		}
		$scope.carts = carts;
}

Site Features

Alt text

Alt text

Alt text

Alt text

Future Add-ons

  • Admin portal for access to customer purchases.
  • Ability for visitors to send messages directly from the site to owner.
  • An enhanced UX/UI design that encourages more visitors.

Please visit my personal profile to see more current projects.