How Do Filters Work?

Hi, so I'm working on adding a custom feature for my site that lets vendors specify a list of cities/areas that they deliver to because the current shipping system in CS Cart doesn't work for what I'm going for right now. Also, I've tried the maps and gelocation addon, but that's not exactly what I'm looking for either.

Anyway, I was thinking of having custom fields for vendors where they can input a list of where they deliver to and then in the search or categories page, those places will appear in the filters and they can select where they are, so that they don't have to bother looking at products that can't get to them anyway.

I'm pretty confident that I'll be able to add the fields in the vendor panel and be able to retrieve them from the database, I know how to do that much. But, I don't know how the filtering works, usually you can only filter by feature, price, vendor, etc. I'd like to know how that works or at least I'd like to know which file I should study, is there a controller file for that? Is it one of the fn. files? Any help would be much appreciated, thanks.

Send me a PM, Although my site isn't multivendor, i created a system that i think can be applied to your situation.

I use the feature and feature tabs to create one hidden filter, and one visible one. So in categories customers can filter by their printer model or industry, and on each product i have made a compatibility tab so each product shows what printer its compatible with.

I imagine this could easily work for location on a per product basis so only products compatible with their printer show, but i can use the invisible one for logistics and the visible one for customers to see and use for filtration.