sort the products and types.