/**
 * Functions for the ajax shopping cart
 * @author Andrew Masri
 */


////////////////////  SHOPPING CART /////////////////////////


var Cart = new Object();

Cart.insert = function(productId, qty, option1, option2) {
	qty = (typeof qty != 'undefined' && qty) ? '&qty='+qty : '';
	option1 = (typeof option1 != 'undefined' && option1) ? '&option1='+option1 : '';
	option2 = (typeof option2 != 'undefined' && option2) ? '&option2='+option2 : '';
	Post.Send('productId='+productId+qty+option1+option2, site_url('cart/insert', true));
}




Cart.update = function(cartRowId, qty) {
	Post.Send('cartRowId='+cartRowId+'&qty='+qty, site_url('cart/update', true));
}



