var gt_products = new Array();

function product(ref, label, description,commercial,brand, price, discount, file) {
	this.ref = ref;
	this.label = label;
	this.description = description;
	this.commercial = commercial;
	this.brand = brand;
	this.price = parseFloat(price);
	this.discount = discount;
	this.file = file;
}

function basketItem( product, quantity, page ) {
	this.product = product;
	this.quantity = parseInt(quantity);
	this.page = parseInt(page);
	
	this.total = function calc( a_length ){
		var li_price = parseFloat(this.product.price) * this.quantity;
		var ls_price = li_price.toFixed( a_length );
		return ls_price;
	}
	
	this.toText = function _toText(){
		return this.product.ref + ":" + this.quantity + ":" + this.page;
	}
}
