How can customers sort products by location for pickup orders?

Is there a way to allow customers to shop by location? For pickup orders, many customers have issues getting to checkout only to find they have items in their cart from multiple physical locations. Some items are available at all, some, or a single location. It currently shows on the product page which locations, but that does not stop them from adding something to their cart only to cause issues at checkout.