public double getTotal(){
		
		double total = 0;
		
		for(Entry<Product, Double> entry : products.entrySet()){
			Product p = entry.getKey();
			double quantity = entry.getValue();
			
			if(p.getDiscount() != null)
				total += p.getDiscount().getDiscountedPrice((p.getPrice())) * quantity;
			else
				total += p.getPrice() * quantity;
		}
		
		if(this.discount != null){
			if(total >= discount.getMinimumPurchaseAmount()){
				return discount.getDiscountedPrice(total);
			}
		}
		
		return total;
	}