added table name to scoped_by helper, added view types for product types