/** Product data object **/ function ProductData(dataTable) { this.id = dataTable['id']; this.regularPrice = dataTable['rpr']; this.actionPrice = dataTable['apr']; this.color = dataTable['color']; } ProductData.prototype.getId = function() { return this.id; }; ProductData.prototype.getRegularPrice = function() { return this.regularPrice; }; ProductData.prototype.getActionPrice = function() { return this.actionPrice; }; ProductData.prototype.getColor = function() { return this.color; }; ProductData.prototype.getActivePrice = function() { return this.actionPrice!=null?this.actionPrice:this.regularPrice; }; /** End Product data object **/