Subversion Repositories SmartDukaan

Rev

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

Rev 17828 Rev 17829
Line 128... Line 128...
128
			totalCartValue = totalCartValue + (unitPrice * newVal);
128
			totalCartValue = totalCartValue + (unitPrice * newVal);
129
			cartItems[sku.toString()]=itemDetail;
129
			cartItems[sku.toString()]=itemDetail;
130
		}else{
130
		}else{
131
			totalCartValue = totalCartValue - (cartItems[sku.toString()].quantity * cartItems[sku.toString()].unitprice) + (unitPrice * newVal);
131
			totalCartValue = totalCartValue - (cartItems[sku.toString()].quantity * cartItems[sku.toString()].unitprice) + (unitPrice * newVal);
132
			if(newVal==0){
132
			if(newVal==0){
133
				$("div.cartdetailscard[data-id='"+sku+"']").parent().addClass('hidden');
133
				//$("div.cartdetailscard[data-id='"+sku+"']").parent().addClass('hidden');
134
				//delete cartItems[sku.toString()];
134
				//delete cartItems[sku.toString()];
135
			}else{
135
			}else{
136
				cartItems[sku.toString()].quantity = newVal;
136
				cartItems[sku.toString()].quantity = newVal;
137
				cartItems[sku.toString()].unitprice = unitPrice;
137
				cartItems[sku.toString()].unitprice = unitPrice;
138
			}
138
			}