Subversion Repositories SmartDukaan

Rev

Rev 17827 | Rev 17839 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17827 Rev 17831
Line 129... Line 129...
129
			totalCartValue = totalCartValue + (unitPrice * newVal);
129
			totalCartValue = totalCartValue + (unitPrice * newVal);
130
			cartItems[sku.toString()]=itemDetail;
130
			cartItems[sku.toString()]=itemDetail;
131
		}else{
131
		}else{
132
			totalCartValue = totalCartValue - (cartItems[sku.toString()].quantity * cartItems[sku.toString()].unitprice) + (unitPrice * newVal);
132
			totalCartValue = totalCartValue - (cartItems[sku.toString()].quantity * cartItems[sku.toString()].unitprice) + (unitPrice * newVal);
133
			if(newVal==0){
133
			if(newVal==0){
134
				//delete cartItems[sku.toString()];
134
				cartItems[sku.toString()].quantity = 0;
-
 
135
				cartItems[sku.toString()].unitprice = unitPrice;
135
			}else{
136
			}else{
136
				cartItems[sku.toString()].quantity = newVal;
137
				cartItems[sku.toString()].quantity = newVal;
137
				cartItems[sku.toString()].unitprice = unitPrice;
138
				cartItems[sku.toString()].unitprice = unitPrice;
138
			}
139
			}
139
			
140